Problems withtemplate switching... Again.

Creating and modifying plugins.
Post Reply
Martin
Regular
Posts: 90
Joined: Mon Sep 27, 2004 1:30 am
Location: Oslo
Contact:

Problems withtemplate switching... Again.

Post by Martin »

I know this has come up before, but I've tried all the fixes I read about here, plus a couple other.

The long and short of it is this: I use a custom dropdown box as described by Garvin here, but I have also tested with the default plugin and the experience is the same.

I select a new template, and nothing happens. I've checked my rewrite rules and I've given each of the relevant stylesheets a different name and hard coded them into the index.tpl files. Still I'm unable to switch the templates.

If anyone can help solve this I'll be most grateful.

-m

*EDIT: Fixed. I need to stop asking questions at the end of 12 hours of coding*
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Glad you got it fixed. Care to share the solution? Caching problem?
Judebert
---
Website | Wishlist | PayPal
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

Hi,

well, I discovered the same issue, so I switched back to the templatechooser sidebar plugin and changed info.txt to xinfo.txt in each of my unwanted templates.
This definitely works!

Ian
Martin
Regular
Posts: 90
Joined: Mon Sep 27, 2004 1:30 am
Location: Oslo
Contact:

Post by Martin »

Nah...
It was just me not realizing that removing the sidebar plugin also removed the event plugin. :roll:

But while we're on the topic; Anyone know how one would go about to set a cookie to remember a users preferred theme? I don't know if the regular plugin does this, but my homebrew one doesn't seem to remember very well.
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu »

the sidebar plugin does remember!

Ian
Martin
Regular
Posts: 90
Joined: Mon Sep 27, 2004 1:30 am
Location: Oslo
Contact:

Post by Martin »

Yeah... But I don't wanna use the sidebar plugin unless I have to.
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

If you have access to the Serendipity functions, you can use serendipity_setCookie(name, data) -- that's what the templatechooser plugin does. You can retrieve the cookie from $serendipity['COOKIE']['name'] when you need it back.
Judebert
---
Website | Wishlist | PayPal
Post Reply