Loading...
 
Skip to main content

Themes


Theme Selection by Hyperlink

Hi community,

i would like to do an intro page (like index.html) before visitors come to see the site. On this Page i'd like them to make a choice between a "fantasy" and a "science fiction" look of my page, so new visitors are not repelled by the less stylish working theme the team uses orby a theme contrary to what they expect.

Manipulating the style selector box did not work, and I would not like to have a huge headline "ignore this page, click..."

I tried to link from index.html to mysite/tiki-switch_theme.php?theme=xxx.css which seems to work, but causes a reload of the current page (in this case inde.html).

In IRC chat, it was suggested to add

Image
Copy to clipboard
in lib/setup/theme.php add in line 20 elseif (isset($_REQUEST['style']) {$prefs['style'] = $_REQUEST['style'];}

which worked.... kind of. I can link to any page now with &style=xxx.css but: as soon as a visitor does click any link, the default theme is loaded.

.......

Any other sugestions? I am already thinking of insane things like linking to a frameset, one part being a 1px frame with a auto-refresh to switch-theme target _top, so the page re-loaded would be... nah. would not work either.

HELP!

If using links isn't easy to figure out, why not use a variation of the Switch Theme module where you let them choose between the two styles. Then the choice stays with the visitor because it uses the standard cookie.

If you want to use them, here are the files for the Theme-O-Rama module used at themes.tikiwiki.org:http://zukakakina.com/tiki-download_file.php?fileId=38Question http://zukakakina.com/tiki-download_file.php?fileId=39Question. The php file goes in /modules and the tpl file goes in templates/modules. You should edit them to suit your site and themes, of course. (These work with TikiWiki 1.9.*. Tiki 1.10 uses a different method and I haven't looked at that yet. If you're using 1.10, you could compare to the 1.10 theme-switching module and see about making the needed adjustments.

-- Gary


Thanks for the files... i was thinking about abusing the switch theme box too, yes. Found no way to do it. I only need to switch between planetfall and codex.

Unfortunately i upgraded to 1.10 today. Will try to figure it out by myself, but i don't think i can.