Jump to content

how to put some info into cookies


Recommended Posts

I want to put something like this on my forum:




instantly to change css with a press of a button :)


Now i was thinking some stupid things how to do this, but now i know the easyest way to do this via cookies.


Im checking my cookies now, and i see this:




So how to make html code put in cookies info about what css user have chosen?


Also im thinking about situation when member log's in without cookies, he will have default css, but i want him asap he logs in to have his color.


Maybe new field in member table? :o

Link to comment
Share on other sites

  • Management

Yes, if you want to store prefs for each user and have them automatically applied when they login you need a new column in members table.


Also to setup a cookie from IPB code you need to use:

$this->ipsclass->my_setcookie( 'cookie_name', value );

Board Rules - Available Products - Need a Custom Work?


< Don't PM me for support, post in the forum or submit a ticket from the client area instead! >

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.