Home  Extras  MODx Add-Ons  CookieMonster

Product:

CookieMonster


Forums Support Thread Votes: 48
Tags: Forms, Personalization, Content, Cookies, Set Cookie, Interactive
Submitted: Jan 16, 2010
Released: Jan 18, 2010
Downloads: 124
License: GPLv2

Works with:
Evolution-1.0.2
Evolution-1.0.1
Evolution-1.0.0
0.9.6.3
0.9.6.2

CookieMonster 0.1-rc1 | Author: bbusenius

CookieMonster is a simple snippet that allows users to interact with cookies. Its primary function is to display a custom chunk if a designated cookie has been set. It can be used to set new cookies or it can be used to interact with cookies that already exist. A cookie that already exists could be a cookie already set by CookieMonster on a previous page or it could be a cookie set by another script/application e.g. jquery. The required parameter is &cookie_name. This parameter can be one of two things: 1. It can be the name of the cookie you wish to interact with if a cookie is already set. 2. It can be the name of a cookie you want to set if you are using CookieMonster to set a cookie. Optional parameters include: &message, &noSet, &redirect, &setCookieTpl. The definitions of these parameters and their possible values, as well as example calls can be found in the comments at the top of the CookieMonster.txt file.


Download


Description

CookieMonster is a snippet that allows users to interact with cookies. It uses a simple form to set a cookie and then displays custom messages on pages if the designated cookie is set. CookieMonster can also interact with cookies that have already been set by other scripts or applications so you are not dependant on setting the cookie with CookieMonster if you don't want to.

Instructions

1. Create a new snippet called CookieMonster and paste the contents of CookieMonster.txt into it. 2. Call the snippet where you wish to interact with a cookie. Examples: [!CookieMonster? &cookie_name=`yourCookieName` &message=`yourMessage` !] The above call sets a cookie called "yourCookieName" and displays a custom message in a chunk called "yourMessage" after the cookie is set. It will use the default template for setting cookies and will "redirect" to the current page after the form is submitted. [!CookieMonster? &cookie_name=`yourCookieName` &message=`yourMessage` &noSet=`1` !] The above call does not set a cookie. Instead, it displays a custom message in a chunk called "yourMessage" if the "yourCookieName" cookie has been set. This is most useful if you have already set a cookie on another page and only want to display a custom message or if you are interacting with a cookie that already exists. In either case the cookie could have been set previously by CookieMonster or it could have been set by a different snippet or script. Note: If you wish to use your own custom form to set a cookie, you can put it in a custom chunk and call it by using &setCookieTpl parameter. Look at the setCookieTpl_example.txt file to see a simple example. You can use the [+CookieMonsterName+] placeholder in your custom template. For more examples look at the comments at the top of the CookieMonster.txt file.




Released Versions

Releases that are grayed out are deprecated.

Version Released Author Downloads
Total Versions: 1 Total Downloads: 124
0.1-rc1 Jan 18, 2010 bbusenius 124

Download Statistics

Package downloads per day since tracking began on June 27th, 2010. Weekends are colored. Plot below shows an overview.


Top Countries

This is a list of the countries most downloading this Extra.

Country Downloads
United States 16
United Kingdom 5
Poland 4
Czech Republic 3
Russian Federation 2
France 2
South Africa 1
Netherlands 1
Switzerland 1
Germany 1
 
 
 

Contact Us | Advertise | Team Blog | FAQ | Credits

© 2005-2010 MODx, LLC. All rights reserved. Privacy Policy | Terms of Service