[pmwiki-users] restricting cookies to a field

Patrick R. Michaud pmichaud at pobox.com
Thu Jan 12 15:44:36 CST 2006


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.

Pm




More information about the pmwiki-users mailing list