PDA

View Full Version : setting style for custom page


Jakeman
11-12-2002, 06:33 AM
take this simple "vB integrated" script for example:


<?php

include("global.php");
eval("dooutput(\"".gettemplate("template_name")."\");");

?>


i want to make it so when users visit this page it will use a different style... just like when you set a forum to use a different style.

i have tried adding this code to the script (4 is the id for both the template set and replacement set i want to use):


$templatesetid = 4;
$replacementsetid = 4;


this doens't work. the page will use the replacement set i specify but not the template set... the result is a messed up looking page (template and replacement sets crossing).

ideas?

Erwin
11-12-2002, 07:53 AM
Try this?


$styleid=4;


Making the replacement and template 4 as a style with id 4. If you put &styleid=4 at the end of the URL it works for sure.

Jakeman
11-12-2002, 08:00 AM
actually, i tried $styleid also... didn't work.

yes, i could set the style in the url but i don't want to do that because that sets a styleid in the user's cookie and makes everything that style. i experimented with this a while back and it caused intermitant style changes when browsing my forums until i nuked my cookie and relogged in.

so i would rather set it in the script itself.

Jakeman
11-16-2002, 07:43 AM
bump