Version: , by Admin (Coder)
Developer Last Online: Nov 2024
Version: 2.2.x
Rating:
Released: 12-21-2001
Last Update: Never
Installs: 206
No support by the author.
This is exactly what you see here, on this board's main page.
It allows you to easily change the style you are using.
Please note that it does not update your user profile as well, it simply sets a cookie, and until it expires you will see the style you selected.
Anyhow, download the attached .txt file and do what it says.
Scroll down to a post by me if you'd like the hack to update the user setting in the database!
The attached version does NOT do that!
Have fun and happy holidays!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Did you get it working with counts for each style? (X users) next to each style? I am coming close but haven't found where VB3 creates the dropdown menu yet.
Once I can convert this line
PHP Code:
while ($thisstyle=$DB_site->fetch_array($allstyles))
to VB3 lingo then I will have a working user count in VB3.
Feel free to PM me if you see this and have any useful information for me.
does this hack work for the latest version of vbulletin?
[QUOTE]In index.php, find this:
=========================
// if user is know, then welcome
And add this right before that:
================================
// style drop down box (by FireFly)
$allstyles=$DB_site->query("SELECT style.title, user.styleid, COUNT(*) AS count FROM user LEFT JOIN style USING (styleid) WHERE style.styleid IS NOT NULL AND style.userselect=1 GROUP BY user.styleid");
$dropdownbits='';
while ($thisstyle=$DB_site->fetch_array($allstyles)) {
if ($styleid==$thisstyle[styleid]) {
$stylesel='selected';
} else {
$stylesel='';
}
eval("\$dropdownbits .= \"".gettemplate('forumhome_dropdownbit')."\";") ;
}
// style drop down box (by FireFly)
In global.php, find this:
=========================
require('./admin/sessions.php');
And replace that with this:
================================
// style drop down box (by FireFly)
if (isset($changestyle)) {
$styleid=verifyid('style',$changestyle,0);
}
require('./admin/sessions.php');
if (isset($changestyle)) {
if ($styleid!=0)
$DB_site->query("UPDATE user SET styleid=$styleid WHERE userid=$bbuserinfo[userid]");
}
// style drop down box (by FireFly)
Now create a new template, call it forumhome_dropdownbit with this in it:
================================================== ========================
<option value="$thisstyle[styleid]" $stylesel>$thisstyle[title] ($thisstyle[count] users)</option>
And last but not least, add the following to your forumhome template anywhere you want:
================================================== ======================================
<select name="styleid" onchange="window.location=('index.php?s=$session[sessionhash]&changestyle='+this.options[this.selectedIndex].value)">
$dropdownbits
</select>