GK contact plugin new page after submitting message

Feel free to talk about everything related to our Joomla Products
Rate this topic: Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.Evaluations: 0, 0.00 on the average.
GK User
Wed Jan 29, 2014 5:32 pm
Hello there!
Could you give me a hint how to configure the GK contact plugin, in this way that after submitting a message the message
your message has been sent
' (or something like that) appears on a new blank page. In my current configuration (Creativity template J3!) this message appears in the homepage after reloading; and that's not very clear!

Kind regards.
User avatar
Fresh Boarder

GK User
Sat Feb 01, 2014 2:06 am
Hello,

You can specify the redirect in the plugin code, but in this case you will have to prepare some articles with messages about errors/success.
User avatar
Administrator

GK User
Sat Feb 01, 2014 5:57 pm
Hello dziudek,
thanks for your answer. I suppose the redirect has to be put in the following area of the plg_gkcontact.php
in the following lines:
Code: Select all
// sending and redirecting
               $send = $mailer->Send();
               //
               if ( $send !== true ) {
                  $app->redirect($post['return'], JText::_('PLG_GKCONTACT_MESSAGE_SENT_ERROR') . $send->message, "error");
               } else {
                   $app->redirect($post['return'], JText::_('PLG_GKCONTACT_MESSAGE_SENT_INFO'), "information");
               }
            } else {
               $app->redirect($post['return'], JText::_('PLG_GKCONTACT_MESSAGE_EMPTY_ERROR'), "error");
            }
         } else {
             $app->redirect($post['return'], JText::_('PLG_GKCONTACT_NO_RECIPENT_INFO'), "error");


Could you give me a clue how/where to put the url's of the pages?

Many thanks,
User avatar
Fresh Boarder

GK User
Sun Feb 02, 2014 2:38 pm
Please replace variable:

Code: Select all
$post['return']


to your own URLs.
User avatar
Administrator

GK User
Fri Feb 07, 2014 10:26 pm
I managed to solve it. Just for the ones who are struggling with the same thing: replace not only the
Code: Select all
$post['return''],
with your own URL's; but remove also the rest of the code for instance
Code: Select all
 JText::_('PLG_GKCONTACT_NO_RECIPENT_INFO), "error")
. Otherwise it didn't work with me.

Thanks for your help!
User avatar
Fresh Boarder

GK User
Wed Feb 24, 2016 10:59 am
Hi aschultinga,

can you give an example on how should the
Code: Select all
$post['return''],
look like afterwards?
User avatar
Fresh Boarder


cron