Firefox PHP

Cookies in phorum

Posted by Tapolyai 
Cookies in phorum
December 01, 2001 06:54PM
I am working on a solution that would allow my users to manage the flat/threaded and new flag "externally" from Phorum. This would also take care a big problem for traveling users (which is about 99% of my members), and for systems where Phorum is not the user managing system.

When the users log in through my system I will drop the cookies that phorum supposed to have on the machines, and set the expiration to the end session.

Questions about the cookies.

I understand what is the purpose of the following cookies

phorum name <xxx>
phorum email <xxx>
phorum-flat-<forum> 0|1
phorum-collapse-<forum> 0|1
phorum-new-<forum> <nnn>

The first two is obvious, name and e-mail.

The rest are just simple flags to show if the single thread should be flat or threaded, and if the specific forum should be collapsed or uncollaped.

phorum-new-<forum> always holds the highest topic number that was read, so the "mark all read" can be used (this could also have been a simple 0|1 instead of holding the number since phorum-haveread-<forum> would already hold the highest number in it).

Here are my questions:

phorum-haveread-<forum> shows the specific topic numbers the user has read separated by periods. i.e. 1.2.4.3 which means user read, in this particular order topics 1,2,4, and finaly 3 within <forum>.

What happens with the phorum-haveread-<forum> cookie when it runs out of space? i.e. when there are so many topics that the concatenation of all the topic numbers do not fit in the cookie's value field?

At 100 topics it's 291 byte long, at 1,000 it's 3,892 and at 5,000 23,892.
Re: Cookies in phorum
December 13, 2001 04:37PM
well if they have read 5000 different threads (which is alot) the files size is 23,892 bytes which may seem alot but that is only 23kb which takes no time to download or upload, even on a 56k modem.
Sorry, you do not have permission to post/reply in this forum.