Jump to content

Cookies in IPB

Featured Replies

Posted

Can we have documentation on how to use cookies the way IPS uses them? :3

inb4marchermakesfunofme

Can we have documentation on how to use cookies the way IPS uses them? :3

inb4marchermakesfunofme

To be honest there's not much to write about them. You have IPSCookie::get() and IPSCookie::set().

So an example:

IPSCookie::set('Rimi', 'value goes here', 0, 999);

$cookie = IPSCookie::get('Rimi');

There's a class reference here: http://community.invisionpower.com/resources/doxygen/class_i_p_s_cookie.html :smile:

  • Author

This site is lagging so bad right now so I couldn't edit my post.

I wanted to add that I understand how to set and get cookies with IPSCookie, it's actually pretty simple. But I like Brandon's documentation because it's very well explained is all and I would like to read up on it to see how exactly is the correct way of approaching cookies.

I also wanted to add that my request was more focused on protoype cookies than js cookies. I'm completely lost in prototype. A documentation similar to the one for modal popups would be appreciated. You're right that the php docs cover IPSCookie fairly well and I can figure it out myself from that. But I'm lost on prototype cookies and that's what I want to use right now.

I eat mine with a big glass of cold milk! it's the only way to properly do cookies! :)

  • Author

I eat mine with a big glass of cold milk! it's the only way to properly do cookies! :)

The get method should be renamed gotMilk....
  • Author

Beautiful, and more information than what I was looking for which was also very helpful. Thanks so much!

I guess no one but Rimi realizes that I was serious when I said to tell us explicitly what they want to see documented. I don't have time to sit and write documentation all day, but putting up an article once a day or once every other day is easy enough - when I know exactly what to focus on...

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.