View Single Post
  #1  
Old 20th August 2008, 12:29
kp380lv's Avatar
kp380lv kp380lv is offline
Senior Member
 
Join Date: May 2008
Latvia
Posts: 388
Thumbs up Changing the design from usermenu
Mod for YSE PRE 6

This is Theme changer the same have used in PRE 7 for BoLaMn;)

The user at any time can change the design from Tracker userbar. Used to whom this little known place in functions.php

In stdhead.php your theme, for example, after

Code:
show_blocks("l");
Insert:

Code:
//change style - by qwertzuiop
if($CURUSER){
$qstyle = sql_query("SELECT id, name FROM stylesheets ORDER by id DESC") or die;
while ($styles = mysql_fetch_array($qstyle)) {
  $id = $styles["id"];
  $name = $styles["name"];

$styleopt .= "<option value=\"$id\" ".($id == $CURUSER[stylesheet] ? "selected" : "").">$name</option>";
}
$stylechanger = "<select onchange=\"location.href='?styleid='+this.options[this.selectedIndex].value\">".$styleopt."</select>";
}
//////////////////////////////////

below, for example, after find:

Code:
	<font color=\"#FF6600\">".$tracker_lang['your_ip'].": " . $_SERVER["REMOTE_ADDR"] . "</font>
	<br />
Insert:

Code:
<table width=100%><tr><td style=\"border-style:none\" width=15>Тheme:</td><td style=\"border-style:none\"><center>$stylechanger</center></td></tr></table>

Last edited by kp380lv; 20th August 2008 at 12:31. Reason: forgot YSE tag
Reply With Quote