Version: 1.00, by Brad
Developer Last Online: Nov 2023
Version: 2.3.x
Rating:
Released: 03-19-2003
Last Update: Never
Installs: 65
No support by the author.
This is a simple 'mini hack'. I wrote this for myself some time ago so i could change the default style without overwriting styleid 1, or editing global.php multiple times.
This will add a new option in the 'vBulletin options' part of the admin cp.
Querys to run: 1
Files to edit: 1.
Screenshot: in next post.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
INSERT INTO setting (settingid,settinggroupid,title,varname,value,desc ription,optioncode,displayorde r) VALUES (NULL,2,'Default style set.','loo_default_style','1','Set this number to the style id you wish to be displayed by deault (note: This will not overwrite style settings in user profiles!)','','7');
How do I reverse this? I'm removing the hack. Thanks
Ok this hack doesn't work right, it only sets my index.php as the style I set default to, but when I click a forum section it changes back to the real default.
You guys are forgetting that each forum has it's own styleid. If set not to override user defaults, it will still be used whenever a guest is logged in. You'll have to change those forums to whatever your forum default is if you want it to function in there.
// ################## Start defaultstyle ###################
if ($HTTP_POST_VARS['action']=="defaultstyle") {
if ($defaultstyle=="" AND $loo_default_style=="") {
echo "<b>YOU DO NOT HAVE A RECOGNIZED DEFAULT STYLE HACK INSTALLED!<BR>
You need to have installed Avalon Site Manager or
<a href=\"https://vborg.vbsupport.ru/showthread.php?s=&threadid=50491\">
Anime-Loo's Default Style Hack</a> in order to change the default style of
all of your site's forums to the default set by those hacks/add-ons.<br><br>";
} else {
$newstyle=$loo_default_style;
//Since Avalon Site Manager includes a default style changer for both the forums and the site content,
//we need to override Anime-Loo's hack if installed to preserve ASM's functionality.
//Sorry, Anime-Loo.
if ($defaultstyle!="") {
$newstyle=$defaultstyle;
}
$DB_site->query("UPDATE forum SET styleid='$newstyle' WHERE styleoverride='0'");
echo "Default Forum Styles changed to $newstyle!<br><br>";
}
}
echo "<p>If you change the orders, please be sure to submit the form using the buttons at the bottom of the page</p>";
replace with
PHP Code:
if ($defaultstyle OR $loo_default_style) {
doformheader("forum","defaultstyle");
maketableheader("Default Style Modification Detected!");
makedescription("You have installed either Avalon Site Manager or
<a href=\"https://vborg.vbsupport.ru/showthread.php?s=&threadid=50491\">Anime-Loo's Default Style Hack</a>.<br>
Would you like to change all forums here that do not override a user's selected style to the forum default?");
doformfooter("Yes, Fix the Default Style of my Forums","");
}
echo "<p>If you change the orders, please be sure to submit the form using the buttons at the bottom of the page</p>";
This should solve all your troubles if you use this everytime you change your default style.