2004-09-04, 02:40 AM
Pages: 1 2
2004-09-04, 11:23 AM
The theme demo script is one of the few that I won't be releasing.
Sorry about that.
Sorry about that.
2004-12-15, 10:19 PM
i'll write this script up tonite.
2005-04-05, 05:03 AM
I was working on it...
I will release it anyway
if anyone already working on it
just reply here
I will release it anyway
if anyone already working on it
just reply here
2005-04-05, 08:45 AM
I guess you'd need musicalmidget's permission for releasing this mod.
2005-04-05, 08:50 AM
Why? You can release a different version of the mod. It's not like you are stealing his source code and making it your own.
2005-04-05, 03:05 PM
I just did this
any of you could add it
any of you could add it
<?
require "./global.php";
echo "Style Selector";
echo "
<!-- start of theme selector -->
<form method=post action=\\"\\">
<input type=hidden name=action value=setstyle />
<select name=tid>";
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."themes WHERE name!='((master))' AND name!='((master-backup))' ORDER BY name ASC");
while($style = $db->fetch_array($query)) {
$style['sid'] = $style['tid'];
if($style['tid'] == $mybbuser['style']) {
$selected = "selected";
}
echo "<option value=$style[sid] $selected>$style[name]</option>";
$selected = "";
}
echo "
</select>
<input type=submit value=Go />
</form>
<!-- theme selector end -->
<p>
";
if ($action == "setstyle") {
$db->query("UPDATE ".TABLE_PREFIX."users SET style='$tid' WHERE uid='$mybb[uid]'");
}
?>
2005-04-06, 09:50 AM
I just re-did my code little.
If you have better method. feel free to reply
here is my instructions for my mod.
open index.php
add this under
// Load global language phrases
$lang->load("index");
If you have better method. feel free to reply
here is my instructions for my mod.
open index.php
add this under
// Load global language phrases
$lang->load("index");
////// skins selector ////////
echo "<br>
<!-- start of theme selector -->
<table border=0 width=$theme[maintablewidth]><tr><td align=right>
<form method=post action="">
Style Selector: <input type=hidden name=action value=setstyle />
<select name=tid>";
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."themes WHERE name!='((master))' AND name!='((master-backup))' ORDER BY name ASC");
while($style = $db->fetch_array($query)) {
$style['sid'] = $style['tid'];
if($style['tid'] == $mybbuser['style']) {
$selected = "selected";
}
echo "<option value=$style[sid] $selected>$style[name]</option>";
$selected = "";
}
echo "
</select>
<input type=submit value=Go />
</form>
</tr></td></table>
<!-- theme selector end -->";
if ($action == "setstyle") {
$db->query("UPDATE ".TABLE_PREFIX."users SET style='$tid' WHERE uid='$mybb[uid]'");
echo "<meta http-equiv="refresh" content="0;URL=$settings[bburl]">";
}
/////////////////////////////////////
2005-04-06, 09:04 PM
////// skins selector ////////
if($mybbuser['usergroup'] != "0") {
echo "<br>
<!-- start of theme selector -->
<table border=0 width=$theme[maintablewidth]><tr><td align=right>
<form method=post action="">
Style Selector: <input type=hidden name=action value=setstyle />
<select name=tid>";
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."themes WHERE name!='((master))' AND name!='((master-backup))' ORDER BY name ASC");
while($style = $db->fetch_array($query)) {
$style['sid'] = $style['tid'];
if($style['tid'] == $mybbuser['style']) {
$selected = "selected";
}
echo "<option value=$style[sid] $selected>$style[name]</option>";
$selected = "";
}
echo "
</select>
<input type=submit value=Go />
</form>
</tr></td></table>
<!-- theme selector end -->";
if ($action == "setstyle") {
$db->query("UPDATE ".TABLE_PREFIX."users SET style='$tid' WHERE uid='$mybb[uid]'");
echo "<meta http-equiv="refresh" content="0;URL=$settings[bburl]">";
}
}
/////////////////////////////////////
Added a check to see if they are registered cause non-members cant change the style.And whats with <input type=hidden name=action value=setstyle />
Why not just turn action="" into action="?action=setstyle" and remove <input type=hidden name=action value=setstyle /> altogether?
2005-04-07, 01:35 AM
k776
do you think you could do templates instead of echo
I tried to but my forums seem wotn read my custom templates.
do you think you could do templates instead of echo
I tried to but my forums seem wotn read my custom templates.
Pages: 1 2