[Pmwiki-users] store last visited page

Patrick R. Michaud pmichaud
Sun Feb 1 15:40:32 CST 2004

You can probably use PHP's $_SESSION variable to do something like this.

Try adding the following to local.php:

  if (!$pagename && @$_SESSION['lastpage']) Redirect($_SESSION['lastpage']);
  $_SESSION['lastpage'] = $pagename;

What this does is create a PHP session variable that keeps track of the 
last page the user visited in $_SESSION['lastpage'].  If the user comes
back to PmWiki without specifying a pagename (e.g., via a URI ending in
'pmwiki.php' with no pagename), the browser is automatically redirected 
to the last page the user was on within the wiki.

Let me know if this works/helps.


On Mon, Feb 02, 2004 at 12:16:34AM +0800, Alex Ho wrote:
> Dear all,
> i am newbie in pmwiki, we just port a new pmwiki on our portal for help
> facilities and i am assigned to developed a feature that can store the user
> last visited page on pmwiki so that user can immediately get back the page
> after from the our portal page.
> does pmwiki provide such variables so that i can use and store in session
> ..?? or can anyone give me a direction how to do so?
> Regards,
> Alex
> ----- Original Message ----- 
> From: "J. Perkins" <jason at sim8.com>
> To: "pmwiki-users-L" <pmwiki-users at pmichaud.com>
> Sent: Friday, January 30, 2004 3:38 AM
> Subject: [Pmwiki-users] User security management
> > Hello all,
> >
> > I have been playing around with a user-based security addon for PmWiki.
> > This would allow a site admin to set per-user access to wiki groups and
> > pages, and would also open up the possibility of author tracking. I've
> > got the basic logon working, now I'm working on managing authorizations.
> > I've got two big issues and not a lot of good ideas, and I'm hoping you
> > good folks can help me out.
> >
> > I plan to allow for a pluggable user authentication function. That is,
> > the wiki will display a form and get the username and password, then
> > hand it off to a custom function to decide if the credentials are any
> > good. My current project, the one I am writing this addon for, uses an
> > LDAP database to manage users. This is overkill for most wiki
> > installations, so I would like to provide a default authentication
> > system that is more wiki-like. I am thinking that I would allow users to
> > register themselves, and then write credentials to a text file
> > (something like Apache's .htpasswd files). So the first problem is how
> > to allow user's to register with the wiki.
> >
> > Now, assuming that I have a validated username, how do I know what that
> > user is allowed to read/edit/etc.? Again, I would like the management of
> > authorizations to be as wiki-like as possible, but I'm having trouble
> > coming up a system that is secure and also easy to manage. It seems like
> > it ought to be possible to list permissions on a wiki page, but should
> > this be per group? Per user? How is access controlled? Lots of questions.
> >
> > Any thoughts on this subject would be much appreciated.
> >
> > Thanks,
> > Jason
> >
> >
> >
> >
> >
> >
> > -- 
> > Pmwiki-users mailing list
> > Pmwiki-users at pmichaud.com
> > http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com
> >
> -- 
> Pmwiki-users mailing list
> Pmwiki-users at pmichaud.com
> http://pmichaud.com/mailman/listinfo/pmwiki-users_pmichaud.com

More information about the pmwiki-users mailing list