vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Admin can change default style from admin cp (https://vborg.vbsupport.ru/showthread.php?t=50491)

msimplay 05-03-2003 10:23 PM

wicked hack but it makes u wonder why such a hack isn;t there by default :p

KonZu 05-03-2003 11:55 PM

working fine (2.3.0) , very usefull hack

thx
yrs KonZu

Bahawolf2 05-11-2003 07:46 PM

Quote:

05-04-03 at 12:18 AM gwhooooey said this in Post #30
Same problem here
Yup, same.

gmarik 05-24-2003 08:24 AM

If you would also make a cp.css reader, it would be something!
Like on phpBB, they have something like that.

gwhooooey 05-25-2003 01:29 AM

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

Austin Dea 05-27-2003 01:01 AM

This only changes the style for index.php only. If I click a forum, it's back to the default(id=1) style.

Danielo 07-31-2003 04:38 PM

yes...
it doesn't function verywell!!

i have the same problem of Austin Dea!!

Let's check it

If an anonymous user enter the forum, the board shows perfectly th index.php paage, but the other are wrong

StrykerContact 08-27-2003 01:34 AM

Thanks, just what I needed.

StrykerContact 08-27-2003 01:51 AM

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.

DraX 09-01-2003 05:34 PM

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.

I've written a quick alternative to this.....

make these changes in admin/forum.php:

find
PHP Code:

// ###################### Start add ####################### 

replace with
PHP Code:

// ################## 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>";
  }
}

// ###################### Start add ####################### 

find
PHP Code:

  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.


All times are GMT. The time now is 05:02 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01290 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete