[pmwiki-users] restricting cookies to a field

H. Fox haganfox at users.sourceforge.net
Sun Jan 15 19:00:11 CST 2006


On 1/12/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Thu, Jan 12, 2006 at 02:36:01PM -0700, H. Fox wrote:
> > On 1/12/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > > If you're talking about cookies being stored by recipes, they
> > > probably ought to be making use of $CookiePrefix.  :-)
> >
> > How would a recipe author make use of $CookiePrefix so cookies are
> > field-specific?
>
> As an example, if a recipe currently has
>
>     setcookie('lightview', $sv, $ViewCookieExpires, '/');
>
> then change it to read
>
>     setcookie($CookiePrefix.'lightview', $sv, $ViewCookieExpires, '/');
>
> See scripts/author.php and scripts/prefs.php for some examples of
> using $CookiePrefix.

Thanks.  I get the idea, which seems to be "always use prepend cookie
names with $CookiePrefix".

I've updated the Light Skin accordingly.

Hagan

p.s.: Other Light Skin changes for this release:
* Now inserting Atom and RSS 2.0 feed links to enable autodiscovery of feeds.
* Now displaying a few more GUI Edit buttons on the Edit Page.
* Now removing rel='nofollow' attribute from external links when in CMS Mode.
* Improved stylesheet loading order (light2.css is now via $HTMLStylesFmt .)
* Now turning Backlinks link on/off with PHP instead of CSS.
* Now turning Print link on/off with PHP instead of CSS.  It's off by default.




More information about the pmwiki-users mailing list