View Full Version : styleswitcher

10-26-2008, 07:24 PM
I'm using styleswitcher to switch between backgrounds on my website and it is working perfectly, thank you. I'm using joomla for my site and I've added smf as a forum. Both run in seperate folders in the root of my server and have there own templates. I have linked them in the main menus with external links to create the appearance of one site. I would like to know whether it is possible to have my backgrounds change on the forum when it is changed on the site?
As far as I can understand the selected background is stored in a cookie, I do not know much about cookies or js. for that matter, so I added styleswitch.js to my forums template folder and put the header script in index.php and imported the stylesheets into the header from the sites template folder changing the url paths to full url's but I'm missing something, because it does not work. Am I being a total noob or can it not get the cookie from my site?
Any help to try and understand this will be greatly appreciated.

10-26-2008, 07:34 PM
Is the base URL of your forum the same as your main site?

10-26-2008, 10:05 PM
Yes it's the same. joomla in 1 folder and smf in 2 folder, both in root dir.

10-27-2008, 07:10 AM
If I move the original styleswitch.php file from my site's template folder to the root folder on the server and use the include command in both template_index files, changing only the path to the new styleswitch.php location will it work then?

10-27-2008, 07:24 AM
Are you talking about the Style Sheet switcher script on DD? If so, please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

10-27-2008, 05:06 PM

Sorry ddadmin. Yes the link is above. The template I am using in joomla has it as a php file but it is still exactly the same, only wrapped in php tags and included in die templateindex.php file.