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
Details »»

Version: , by Mas*Mind Mas*Mind is offline
Developer Last Online: Sep 2003 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 02-22-2001 Last Update: Never Installs: 2
 
No support by the author.

Here's what the hack does: You can specify the stylesetid you wanna use globally when no other styleset is used by the visitor. The way it worked now was that it reverted back to the 'Default'-styleset.

It was a very quick hack, but seemed to be working very well. The option will be in the 'options-area', right below the Add template name in comments option.

Instructions:

First backup you're global.php (in the root dir, not the admin dir)

Now open up global.php (in the root dir) and look for the line:

PHP Code:
  // Will look in the user info for a style
  
if ($bbuserinfo['styleid']!=0) { //style specified
    
$styleid=$bbuserinfo['styleid'];
  } else { 
//no style
    
$styleid=1;
  } 
replace it with:

PHP Code:
  // Will look in the user info for a style
  
if ($bbuserinfo['styleid']!=0) { //style specified
    
$styleid=$bbuserinfo['styleid'];
  } else { 
//no style
    
$styleid=$defaulttplset;
  } 
Save global.php

The insert a new line in the 'setting' table through phpMyAdmin, with the values:

settinggroupid: 23
title: Default template-set
varname: defaulttplset
value: 1
description: Specify the templatesetid of the template-set you wanna use globally if no other set is used
optioncode:
displayorder: 2

or execute the following query:

Insert into setting (settinggroupid, title, varname, value, description, optioncode, displayorder) values('23', 'Default template-set', 'defaulttplset', '1', 'Specify the templatesetid of the template-set you wanna use globally if no other set is used', '', '2')

All done! Enjoy

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-23-2001, 03:19 PM
Guest
 
Posts: n/a
Default

wow, you don't leave a moment to spare already with a hack for beta 2
Reply With Quote
  #3  
Old 05-28-2001, 08:09 PM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is "exactly" what i want. Just checking there are no changes for vb2.0 - i doubt there are considering the change but does it still work fine?
Reply With Quote
  #4  
Old 05-28-2001, 08:12 PM
Mas*Mind's Avatar
Mas*Mind Mas*Mind is offline
 
Join Date: Oct 2001
Location: Amsterdam, The Netherlands, currently living in Cape Town, South Africa
Posts: 103
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

still works fine..I'm using it

Guess this thread can be moved to the 2.0 releases forum
Reply With Quote
  #5  
Old 04-29-2002, 09:41 AM
MarkG MarkG is offline
 
Join Date: Nov 2001
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

small addition:


if you want your styles listed alphabetically on the drop-down box

find this
Code:
$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");
and replace it with this
Code:
$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  order by style.title");
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 12:46 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07746 seconds
  • Memory Usage 2,240KB
  • Queries Executed 18 (?)
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_code
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (4)postbit
  • (4)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete