[Pmwiki-users] store last visited page

Alex Ho isalex
Sun Feb 1 23:47:48 CST 2004


Dear pm,

just add the code segment in local.php at root of pmwiki, it works.
but all link text at main page become 1LinkText, i have no idea on what
happen :<???
1LinkText

Key ESM Terms:

  1.. 1LinkText
  2.. 1LinkText
  3.. 1LinkText?
  4.. 1LinkText?
  5.. 1LinkText
  6.. 1LinkText
  7.. 1LinkText?
alex
> In general you should never need to modify the pmwiki.php code directly.
> Most modifications belong in a file called "local.php" which goes
> in the local/ subdirectory that was created when PmWiki was installed.
>
> If you don't already have a local.php file, then just create one.
> For the code I recommended, your local.php file would read:
>
> <?php
>   session_start();
>   if (!$pagename && @$_SESSION['lastpage'])
>     Redirect($_SESSION['lastpage']);
>   $_SESSION['lastpage'] = $pagename;
> ?>
>
> Make sure there are no blanks or other characters before or after the
> <? and ?> in the file.
>
> For more details about the local.php file, see
> http://www.pmichaud.com/wiki/PmWiki/InitialSetupTasks.  This is also
> an appropriate place to put debug code.
>
> Pm
>
> On Mon, Feb 02, 2004 at 12:23:33PM +0800, Alex Ho wrote:
> > Dear pm
> > > You can probably use PHP's $_SESSION variable to do something like
this.
> > >
> > > Try adding the following to local.php:
> > >
> > >   session_start();
> > >   if (!$pagename && @$_SESSION['lastpage'])
> > Redirect($_SESSION['lastpage']);
> > >   $_SESSION['lastpage'] = $pagename;
> >
> > may i know where to place the above code. i have tried at the beginning
of
> > file pmwiki.php but it doesn't work, i mean it doesn't redirect to
> > $_SESSION['lastpage']. just remain at the main page when click the link
> > http://url/pmwiki/pmwiki.php without specifying a pagename
> >
> > also i  try to print out the $pagename by using echo $pagename at
beginning
> > of pmwiki.php , but it shows me the header already by sent error, so
where
> > is the right place to place "debug" code so that i can explorer in deep
of
> > pm wiki
> >
> > >
> > > 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.
> > >
> > > Pm
> > >
> > >
> > > 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
> > >
> >
> >
> > -- 
> > 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