Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

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
  #22  
Old 04-25-2003, 05:14 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 10:17 AM FFArmageddon said this in Post #19
uhm hey I am having a problem with this :\

It changed tbe default style fine for members who are logged in. But if you are a guest or logged out, only the forum main page style changes.

Could it have something to do with the issues I mentioned on vbt?
Im not sure what could be doing that.

You might want to think about opening a support ticket.
Reply With Quote
  #23  
Old 04-25-2003, 08:16 PM
FFArmageddon FFArmageddon is offline
 
Join Date: Aug 2002
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I think I will do just that

thanks
Reply With Quote
  #24  
Old 04-27-2003, 12:46 AM
Jujimufu's Avatar
Jujimufu Jujimufu is offline
 
Join Date: Apr 2003
Location: Magicant
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This isn't working for me. I installed it and no errors, but it doesn't do anything. I have 2 styles. One called default and one called Empire I created. So that's 2 including the one that came with the forum. I tried setting style ID to 1-2-3-4-5-6.dsfpiaq3poias-e0fm alot of them lol! And nothing ever happens as should. I expected for when a new visitor who visits the board will have the style set as Empire not default. And... it doesn't I don't understand lol! Sorry, maybe it's obvious but it's definately not harming me, or working at that either.
Reply With Quote
  #25  
Old 04-27-2003, 02:19 AM
mx3's Avatar
mx3 mx3 is offline
 
Join Date: Nov 2002
Location: prescott valley, az
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

w00t!!! i've needed this for sooo long! *installs!*

works fine!
Reply With Quote
  #26  
Old 04-27-2003, 06:42 AM
TheEnd's Avatar
TheEnd TheEnd is offline
 
Join Date: Mar 2003
Posts: 120
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do I tell what the style ID is? I got like 3 styles, wheres it say which is which?
Reply With Quote
  #27  
Old 04-27-2003, 03:19 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How to find styleid's.


This adds the current style id of a style to the modifiy styles page of the admin cp, makes it easyer on newbies who dont know how to find style id's

To upgrade:

In /admin/style.php find:

PHP Code:
// ###################### Start Modify #######################
if ($action=="modify") {

  
doformheader("","");
  
maketableheader("Style Sets");
  
$styles=$DB_site->query("SELECT styleid,title FROM style ORDER BY title");
  while (
$style=$DB_site->fetch_array($styles)) {

    echo 
"<tr class='".getrowbg()."'>\n<td><p>$style[title]</p></td><td><p>".
            
makelinkcode("fonts/colors/etc","style.php?s=$session[sessionhash]&action=styles&dostyleid=$style[styleid]").
            
makelinkcode("properties","style.php?s=$session[sessionhash]&action=edit&editstyleid=$style[styleid]",0,"edit style properties").
            
makelinkcode("download","style.php?s=$session[sessionhash]&action=dodownload&styleid=$style[styleid]").
            
iif($style[styleid]!=1,makelinkcode("remove","style.php?s=$session[sessionhash]&action=remove&styleid=$style[styleid]"),"").
            
"</p></td></tr>\n";

  }

  echo 
"</table></td></tr></table>";


Replace by:

PHP Code:
// ###################### Start Modify #######################
if ($action=="modify") {

  
doformheader("","");
  
maketableheader("Style Sets");
  
$styles=$DB_site->query("SELECT styleid,title FROM style ORDER BY title");
  while (
$style=$DB_site->fetch_array($styles)) {

    echo 
"<tr class='".getrowbg()."'>\n<td><p>$style[title] (style id $style[styleid])</p></td><td><p>".
            
makelinkcode("fonts/colors/etc","style.php?s=$session[sessionhash]&action=styles&dostyleid=$style[styleid]").
            
makelinkcode("properties","style.php?s=$session[sessionhash]&action=edit&editstyleid=$style[styleid]",0,"edit style properties").
            
makelinkcode("download","style.php?s=$session[sessionhash]&action=dodownload&styleid=$style[styleid]").
            
iif($style[styleid]!=1,makelinkcode("remove","style.php?s=$session[sessionhash]&action=remove&styleid=$style[styleid]"),"").
            
"</p></td></tr>\n";

  }

  echo 
"</table></td></tr></table>";


Thats it!
Reply With Quote
  #28  
Old 05-01-2003, 01:24 PM
BoardTyrant BoardTyrant is offline
 
Join Date: Apr 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How do you run an SQL Query or rather where do I run the needed SQL query :

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');

Also, how do I view the global.php file and edit it?
Reply With Quote
  #29  
Old 05-01-2003, 04:03 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=39142" target="_blank">https://vborg.vbsupport.ru/showt...threadid=39142</a>
Reply With Quote
  #30  
Old 05-01-2003, 04:58 PM
BoardTyrant BoardTyrant is offline
 
Join Date: Apr 2003
Posts: 7
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks I hope I can figure it out
Reply With Quote
  #31  
Old 05-03-2003, 10:18 PM
gwhooooey gwhooooey is offline
 
Join Date: Feb 2003
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
04-25-03 at 03:17 PM FFArmageddon said this in Post #19
uhm hey I am having a problem with this :\

It changed tbe default style fine for members who are logged in. But if you are a guest or logged out, only the forum main page style changes.

Could it have something to do with the issues I mentioned on vbt?
Same problem here
Reply With Quote
Reply

Thread Tools

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:15 PM.


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.08445 seconds
  • Memory Usage 2,320KB
  • Queries Executed 25 (?)
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
  • (2)bbcode_php
  • (2)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
  • (4)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_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