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

Reply
 
Thread Tools
[release] Dynamic Style Set Dropdown Details »»
[release] Dynamic Style Set Dropdown
Version: 1.00, by filburt1 filburt1 is offline
Developer Last Online: May 2007 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 11-01-2002 Last Update: Never Installs: 0
 
No support by the author.

Author: filburt1
Description: Chen's style set dropdown hack, extended description below.
Demo: None yet
Screenshot: http://www.vbulletintemplates.com/mo...=&postid=14502

Be sure to apply this mod to every template set you have! Otherwise the dropdown will disappear when you change style sets.

This is Chen's style dropdown without hacking. Unlike the style set dropdown mod released here, it doesn't require updating the code each time a style set is added/deleted. The tradeoff is that it adds one query to forumhome.

Unlike Chen's hack, this will not show how many people are using each style set (would mean more queries). But, just like his, this does not update your user CP style set, it only cookies you with a new style set.

Show Your Support

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

Comments
  #62  
Old 03-08-2003, 10:20 PM
Vladdy Vladdy is offline
 
Join Date: Feb 2003
Posts: 149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have been and it keeps going in the wrong places...
Reply With Quote
  #63  
Old 03-08-2003, 10:48 PM
Matrixgl Matrixgl is offline
 
Join Date: Sep 2002
Location: Canada
Posts: 79
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice one....installed perfectly
Reply With Quote
  #64  
Old 03-22-2003, 06:23 AM
imported_Jamie imported_Jamie is offline
 
Join Date: Jun 2002
Location: Toronto, Ontario.
Posts: 50
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can i set it so that if Default is in the style drop down list, that shows at the top?
Reply With Quote
  #65  
Old 03-22-2003, 06:54 PM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Jamie
How can i set it so that if Default is in the style drop down list, that shows at the top?
Check a previous post of mine for this.
Reply With Quote
  #66  
Old 06-25-2003, 11:37 PM
kitzzy kitzzy is offline
 
Join Date: Aug 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can someone tell me how I can make this work on ALL pages instead of just forumhome? I tried placing it in header template instead of forumhome and removing the part in phpinclude where it specifies it should only be index.php but if I do that I get some weird side effects. Can anyone offer me some direction as to how the code needs to be modified to work on every page instead of just index?
Reply With Quote
  #67  
Old 06-26-2003, 12:06 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kitzzy
Can someone tell me how I can make this work on ALL pages instead of just forumhome? I tried placing it in header template instead of forumhome and removing the part in phpinclude where it specifies it should only be index.php but if I do that I get some weird side effects. Can anyone offer me some direction as to how the code needs to be modified to work on every page instead of just index?
Use this block in the phpinclude instead and add the call to any global template, this will run the query on every page load however, that can add alot of strain on your server if your board is large. Never-the-less heres you code:

PHP Code:
Code removed 
Reply With Quote
  #68  
Old 06-26-2003, 03:12 AM
kitzzy kitzzy is offline
 
Join Date: Aug 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting the same problem with this code, I didnt look it at closely but it did you just remove the intial If statement? That is what I had initially done but for some weird reason when I do this, every time someone posts a reply it adds "The Lobsters" as the subject of the reply and nothing you do can get rid of it. FYI - This is the name of one of the schemes so something is causing it to get transferred to that and I cannot figure out why :-\
Reply With Quote
  #69  
Old 06-26-2003, 03:21 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Let me have a look at something right quick, looks like something in this code is sending database to the subject feild.
Reply With Quote
  #70  
Old 06-26-2003, 03:23 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lemme know if this works for you:

PHP Code:
// Filburt1's style drop down - modified for all pages by brad.loo
    
$result mysql_query("SELECT styleid,title FROM style WHERE userselect=1 ORDER BY title"); 
    if (!
$result
    { 
        
$styledropdown 'Couldn\'t get a list of styles'
    } 
    else 
    { 
        
$s mysql_fetch_row($result); 
        
$selected ''
        while (
$s != false
        { 
            
$styleid $s[0]; 
            
$styletitle htmlspecialchars($s[1]); 
            if (
$bbuserinfo['userid'] != 0
            { 
                
$selected = ($styleid == $bbuserinfo['styleid']) ? " selected" ""
            } 

            
$styledropdown .= "<option value=\"$styleid\"$selected>$styletitle</option>"
            
$s mysql_fetch_row($result); 
        } 
        
$shash $session[sessionhash]; 
        if (
$bbuserinfo['userid'] == 0
        { 
            
$styledropdown "<option value=\"" $bbuserinfo['styleid'] . 
                
"\" selected>Select a style:</option>"
        } 
        
$styledropdown 
            <select name=\"newstyleid\" onChange=\"window.location='index.php?s=
$shash&styleid=' + this.value\"> 
            
$styledropdown 
            </select>"

    } 
// End style drop down- modified 
Reply With Quote
  #71  
Old 06-26-2003, 08:43 PM
kitzzy kitzzy is offline
 
Join Date: Aug 2002
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yay ... it finally worked! Thanks so much
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 08:25 PM.


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.04750 seconds
  • Memory Usage 2,307KB
  • 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
  • (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_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