WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Add a back from an event page (15 posts)

  1. Gwentrac
    Member
    Posted 1 year ago #

    Hello,

    From my event list page, the user open an event by clicked on the placeholder #_EVENTLINK.
    In my event list page, I used selection region and states dropdown list.

    I want to add a "back return" from my events page to the events list page and keeping the selection made by the user previously in the event list page.

    I try:
    Retour -> KO!
    <input type="button" value="Précédent" onclick="history.back()"> ->KO!
    ">Go back -> KO!

    Does anyone have an idea?

    Best regards,

    Gwen

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

    Hi,

    you can either try to used template file at wp-content/plugins/events-manager/templates/templates/events-list.php and/or event-single.php then add an href tag with PHP $_REQUEST

    to use templates: http://wp-events-plugin.com/documentation/using-template-files/

  3. Gwentrac
    Member
    Posted 1 year ago #

    Hello,

    I already have and used a template file for event-single.php.

    But what you mean by "add an href tag with PHP $_REQUEST"? Is it linked with Cookies?

  4. Gwentrac
    Member
    Posted 1 year ago #

    Hello,

    Do you mean I have to had something like that in my event-single.php file?

    $region=$_REQUEST['region'];
    $states=$_REQUEST['states'];

    And then, I have the link:

    Retour

    I will try that!
    Best regards,

    Gwen

  5. Gwentrac
    Member
    Posted 1 year ago #

    Hello,

    I tried it but It doesn't work.
    I loose the value of $_REQUEST['region'], $_REQUEST['states']... the the event page.

    Best regards,

    Gwen

  6. agelonwl
    Member
    Posted 1 year ago #

    reading your first post; have you tried something like

    <a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true"><img src="http://yourlinktoyourimage.jpg" alt"Go Back" /></a>
  7. Gwentrac
    Member
    Posted 1 year ago #

    Hello,

    I try but I doesn't work!

  8. Gwentrac
    Member
    Posted 1 year ago #

    Could you tell me were I can find where the placeholder #_EVENTLINK is define.
    Thanks that, I could make some modification.

    Best regards,
    Gwen

  9. Gwentrac
    Member
    Posted 1 year ago #

    Agelonwl,

    Thank a lot.

    With your solution I get the error page "WEB page expired"?
    Do you know how can change it? If I make F5 I come back in the previous page with the good selection.

    Best regards,

  10. agelonwl
    Member
    Posted 1 year ago #

    seems that it is working fine when I tested it; here's what I did

    1. modify template file at /wp-content/plugins/events-manager/templates/templates/event-single.php

    2. copied the template above to my theme directory at /wp-content/themes/YOUR_CURRENT_THEME/plugins/events-manager/templates/event-single.php

    3. edit the file and save

    4. here is my actual template

    <?php
    global $EM_Event;
    /* @var $EM_Event EM_Event */
    echo $EM_Event->output_single();
    ?>
    <a href="javascript:history.go(-1)" onMouseOver="self.status=document.referrer;return true"><span>Back</span></a>
  11. Gwentrac
    Member
    Posted 1 year ago #

    Hello,

    I did exactly the same.
    But now, the problem is a have an "Web page expired" when I click on "Back". I need to press F5 and I don't want to ask my user to do it each time they want to go back in the event list page when they are in an event page.

    Any idea? A cache problem, maybe?

  12. agelonwl
    Member
    Posted 1 year ago #

    Do you have a sample link for us to see?

  13. Gwentrac
    Member
    Posted 1 year ago #

    Sorry, my website is not online for the moment. However, I can show you what can of page I get. check the below link.

    http://www.google.fr/imgres?q=experied+web+page&um=1&hl=fr&sa=N&tbo=d&rls=com.microsoft:fr&biw=1280&bih=599&tbm=isch&tbnid=Iu8jD4ZnF6CRJM:&imgrefurl=http://lennilobel.wordpress.com/2009/07/26/defeat-the-evil-back-button-in-your-asp-net-applications/&docid=vG7zvFoaLD049M&imgurl=http://lennilobel.files.wordpress.com/2009/07/expired1.jpg%253Fw%253D780&w=741&h=442&ei=sOvJULbsLMOA4gSjwoGABw&zoom=1

    On the web, I read sometimes about:

    session_cache_limiter('private');
    $cache_limiter = session_cache_limiter();
    session_cache_expire (30);
    But I don't know where to put this code.

    Best regards,

    Gwen

  14. Gwentrac
    Member
    Posted 1 year ago #

    Hello agelonwl,

    I think I find a solution. I add the following code in my functions.php template file.

    function myStartSession() {
    if(!session_id()) {
    session_cache_expire(10); // in minutes
    ini_set('session.cache_limiter', 'private');
    session_start();
    }
    }

    Best regards,

    Gwen

  15. agelonwl
    Member
    Posted 1 year ago #

    thanks for updating.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic