Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-05-26 13:58:12

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 699
Website

oui_cookie - Set, read, reset or delete cookies

Documentation & download

Examples
Manual cookie setting
<txp:oui_cookie name="favourite_fruit" value="apricot" />
<txp:oui_cookie name="favourite_fruit">
    My favourite fruit is the apricot.
</txp:oui_cookie>
Cookie setting through a fruits HTTP variable
<txp:oui_cookie name="fruits" values="apple, pear, apricot" />

Then call an url like http://my-website.com/?fruits=apricot.
You can also add a default value here.

Reading
<txp:oui_cookie name="favourite_fruit" />
Deletion
<txp:oui_cookie name="favourite_fruit" delete="1" />
Cookie checking
<txp:oui_if_cookie name="favourite_fruit">
    My favourite fruit is the <txp:oui_cookie name="favourite_fruit" />.
<txp:else />
    I don't have any favourite fruit.
</txp:oui_cookie>

You can also add a value to check against the cookie value here.

Last edited by NicolasGraph (2016-06-22 06:34:31)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#2 2016-05-28 13:55:42

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 699
Website

Re: oui_cookie - Set, read, reset or delete cookies

I updated the github documentation for clarity. Updates will be included in the next release.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#3 2016-05-29 11:10:31

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 699
Website

Re: oui_cookie - Set, read, reset or delete cookies

oui_cookie v.0.1.3 is ready to go…


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#4 2016-06-21 07:17:10

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 699
Website

Re: oui_cookie - Set, read, reset or delete cookies

oui_cookie v.0.2.3 includes important changes; please, check the first post of this thread or the plugin documentation.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

Board footer

Powered by FluxBB