let guests change theme?

Forum
Last Post
Threads / Messages

AlexC

Moderator
Moderator
Joined
Dec 17, 2009
Messages
742
Points
0
Age
28
Location
Canada
Mysidian Dollar
43,036
I was wondering if it was possible to alter a file somewhere that would allow guests to change the theme?

I'd like to be able to let my guests change the theme of my site, as well as my members.

I deleted part of the changestyle.php file and that let the guests change it, but it won't stay. The moment I change the page, it goes back to the default.
 
That's because when users change the theme, it's recorded in the database what theme they picked. Guests don't have this so the information isn't stored and it goes back to the default. The only option really is to create a new table and store guest IP and theme settings, although personally I think it's a waste of space.:eye:
 
It's for a very special project I'm working on. Changable themes for guests is a highly massive part of it.

Could you show me how to do that? Would there be any way to perhaps delete it every week or so that it doesn't get burdened with entries?
 
I can explain it for you.

What you'll need is a new table in your database with a couple fields. 1 for an IP, 1 for the theme name and 1 for the date. Then you'll want the coding to detect if someone is a guest and if they are insert a new entry into the table with the information. Simple as that. You'll also want a cron job to run weekly and erase entries over 1-2 weeks old depending on how many guests you get per day.
 
Okay - I can do the mySQL part, but not the coding part. I'm not good at creating code from scratch. I'll see what I can do about the crib job. (don't know anything about cookies).
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,280
Messages
33,134
Members
1,604
Latest member
grandcorsair
BETA

Latest Threads

Top