Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Admin can change default style from admin cp Details »»
Admin can change default style from admin cp
Version: 1.00, by Brad Brad is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

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.

Comments
  #32  
Old 05-03-2003, 10:23 PM
msimplay's Avatar
msimplay msimplay is offline
 
Join Date: Aug 2002
Location: UK
Posts: 1,059
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wicked hack but it makes u wonder why such a hack isn;t there by default
Reply With Quote
  #33  
Old 05-03-2003, 11:55 PM
KonZu KonZu is offline
 
Join Date: Mar 2003
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working fine (2.3.0) , very usefull hack

thx
yrs KonZu
Reply With Quote
  #34  
Old 05-11-2003, 07:46 PM
Bahawolf2 Bahawolf2 is offline
 
Join Date: Apr 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
05-04-03 at 12:18 AM gwhooooey said this in Post #30
Same problem here
Yup, same.
Reply With Quote
  #35  
Old 05-24-2003, 08:24 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you would also make a cp.css reader, it would be something!
Like on phpBB, they have something like that.
Reply With Quote
  #36  
Old 05-25-2003, 01:29 AM
gwhooooey gwhooooey is offline
 
Join Date: Feb 2003
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #37  
Old 05-27-2003, 01:01 AM
Austin Dea's Avatar
Austin Dea Austin Dea is offline
 
Join Date: Dec 2001
Location: Denver, CO, USA
Posts: 342
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This only changes the style for index.php only. If I click a forum, it's back to the default(id=1) style.
Reply With Quote
  #38  
Old 07-31-2003, 04:38 PM
Danielo's Avatar
Danielo Danielo is offline
 
Join Date: Jul 2002
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #39  
Old 08-27-2003, 01:34 AM
StrykerContact StrykerContact is offline
 
Join Date: Feb 2003
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, just what I needed.
Reply With Quote
  #40  
Old 08-27-2003, 01:51 AM
StrykerContact StrykerContact is offline
 
Join Date: Feb 2003
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #41  
Old 09-01-2003, 05:34 PM
DraX DraX is offline
 
Join Date: Aug 2002
Location: Bear, DE
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
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.

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:09 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.04982 seconds
  • Memory Usage 2,319KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete