vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Change Style Drop-Down (https://vborg.vbsupport.ru/showthread.php?t=33418)

SONOFSAM 02-05-2003 01:30 AM

I didnt make it, but i had it on my forums:

add to the end of the phpinclude template:

PHP Code:

if (strpos($_SERVER['PHP_SELF'], 'index.php') != false)
{
    
$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);
        while (
$s != false)
        {
            
$styleid $s[0];
            
$title htmlspecialchars($s[1]);
            
$selected = ($styleid == $bbuserinfo[styleid]) ? " selected" "";

            
$styledropdown .= "<option value=\"$styleid\"$selected>$title</option>";
            
$s mysql_fetch_row($result);
        }
        
$shash $session[sessionhash];
        
$styledropdown "
            <select name=\"newstyleid\" onChange=\"window.location='index.php?s=
$shash&styleid=' + this.value\">
            
$styledropdown
            </select>"
;
    }




Then add to forumhome template where you wish to show:

PHP Code:

<td align="center">
<
smallfont><b>Change Style</b></smallfont><br>$styledropdown<br

or you can put in the header to show on every page generated.

KuraFire 02-06-2003 10:59 AM

SONOFSAM: that will always take them to the forumhome page, not to their current page :p

KuraFire 02-06-2003 12:38 PM

leviw, ego:

https://vborg.vbsupport.ru/showthrea...threadid=48596

and:

https://vborg.vbsupport.ru/showthrea...threadid=48597

Enjoy! :):up:

leviw 02-06-2003 05:18 PM

Thanks Kura! Still checking out all the diferences and deciding which is best for my situation.

The first has an extra query and is simpler, shows # of users on each style?

The second has no query, requires more setup and doesnt show # of users. Loads quicker but extra work.

Just wanted to simplify the differences. =)

KuraFire 02-06-2003 10:17 PM

Yup, those are the differences.

First one requires a query for every page load, second one doesn't, though "more setup" - it's 1 step, in which you upload a file to your admin directory and run it, that's about it for `more setup`.....

If you don't constantly add / remove more Styles to/from your site, or if you don't have much space for the drop down box in your header (me for both) then the hardcoded version is your best choice :)

jancarlo 02-26-2003 02:31 PM

Premetto that is Italian and use a translator in order to write to
you, I hope that you understand to me.

A question: how never I that I have 2500 user it is I have installed 3
stily I see on one style 603 user on one 7 users alone and last the 31
users?

And like never when change quati style I do not see the variation of
they use it in real time?

Practically the contatore not conteggia, that it is for that one?

I know that in all these post could are to us the solution but they
are many and of English I understand some little:)

Thanks and Hello jancarlo

gengar003 04-01-2003 08:51 PM

I installed the style drop-down... but none of my styles showed up... why is that?

InfiniteWebby 04-13-2003 03:10 AM

how do you change it so that on vb 2.3.0 when a user signs up his styleid is not 0 but soemthing different, so Default Vb Style Doesn't show in the drop down?

groovesalad 04-14-2003 07:55 PM

I had this installed on 2.2.8, but when I install it on 2.3.0, it doesn't seem to change the styles...any ideas?

Rapdis 04-17-2003 07:46 PM

oh my god... lol

is there a final version?


All times are GMT. The time now is 10:50 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.01441 seconds
  • Memory Usage 1,747KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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