WordPress.org

Ready to get started?Download WordPress

Forums

LogMyTrip
[resolved] User switch (3 posts)

  1. klimam
    Member
    Posted 2 years ago #

    Hi, how can I please create "cookie to switch user"? :) IsnĀ“t possible to prepare small switch to choose the user which posts to draw into the map? Thanks!

    http://wordpress.org/extend/plugins/logmytrip/

  2. oddknack
    Member
    Posted 2 years ago #

    Hi there, I am also trying to resolve the same issue. Have you had any luck creating a cookie, or otherwise switching user for logmytrip?

    Many thanks

    oddknack

    oddknack@hotmail.com

  3. ajohnwaters
    Member
    Plugin Author

    Posted 2 years ago #

    Locate the file index.php in the WordPress home directory of your webserver and open it in an editor. Add the line below on a new line just after all the comments (lines that begin with *) in this file. Save the file and revisit your website using your browser. You may have to refresh a couple of times on the site to ensure the cookie is set and that you are not looking at a cached copy of the site.

    To set the userid to 2 for example:

    setcookie("tid", "2", time()+60*60*24*100,"/");

    This sets the cookie for 100 days every time you visit the site, so it should never effectively expire.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags