vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=139)
-   -   [release] Dynamic Style Set Dropdown (https://vborg.vbsupport.ru/showthread.php?t=85177)

Vladdy 03-08-2003 10:20 PM

I have been and it keeps going in the wrong places...

Matrixgl 03-08-2003 10:48 PM

Nice one....installed perfectly :)

imported_Jamie 03-22-2003 06:23 AM

How can i set it so that if Default is in the style drop down list, that shows at the top?

stark427 03-22-2003 06:54 PM

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.

kitzzy 06-25-2003 11:37 PM

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?

Brad 06-26-2003 12:06 AM

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 


kitzzy 06-26-2003 03:12 AM

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 :-\

Brad 06-26-2003 03:21 AM

Let me have a look at something right quick, looks like something in this code is sending database to the subject feild.

Brad 06-26-2003 03:23 AM

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 


kitzzy 06-26-2003 08:43 PM

yay ... it finally worked! Thanks so much :D


All times are GMT. The time now is 05:48 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.01194 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_php_printable
  • (2)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