Problems withtemplate switching... Again.

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

Problems withtemplate switching... Again.

Post by Martin » Sun Dec 10, 2006 12:51 am

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*

User avatar
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert » Sun Dec 10, 2006 5:10 am

Glad you got it fixed. Care to share the solution? Caching problem?
Judebert
---
Website | Wishlist | PayPal

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu » Sun Dec 10, 2006 9:57 am

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

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

Post by Martin » Sun Dec 10, 2006 2:41 pm

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.

User avatar
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Post by Timbalu » Sun Dec 10, 2006 3:37 pm

the sidebar plugin does remember!

Ian

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

Post by Martin » Sun Dec 10, 2006 3:49 pm

Yeah... But I don't wanna use the sidebar plugin unless I have to.

User avatar
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert » Mon Dec 11, 2006 4:22 pm

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