Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Template Modifications
FAQ Community Calendar Today's Posts Search

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
  #22  
Old 11-15-2002, 03:12 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. document.all only works in IE
2. absmiddle just never works in NS
Reply With Quote
  #23  
Old 11-15-2002, 03:17 PM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanx again

I guess i will have to go with the standard GO button...
But is there a way to make it at least "smaller?
Reply With Quote
  #24  
Old 11-15-2002, 03:18 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Smaller?

The image is just vB's go button.
Reply With Quote
  #25  
Old 11-15-2002, 03:21 PM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I meant the initial GO button - shown with this code:

Code:
$styledropdown <input type="button" value="Go"
    onClick="window.location = 'index.php?s=$session[sessionhash]&styleid='
    + document.all['newstyleid'].value">
Reply With Quote
  #26  
Old 11-15-2002, 11:22 PM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Filburt.

I'd like the combo box to have as default text the "choose style"...
instead of a style name...

so when a guest or a member sees the board, the thing he sees in the box is *not* a style name, but the text "choose style"

can we do this?
Reply With Quote
  #27  
Old 11-15-2002, 11:31 PM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The reason why I'm asking for this is because ....

I had 3 styles. (for example)

1) Blue (default)
2) Emerge
3) Dark

Now after I installed the dropdown box, I changed the default style.
Actually what I wanted to do was to make the Emerge default - but without deleting/overwriting the Blue (ex-default).

So I did this:

I created a new style called Default2. I pointed it to take the templates and replacements of the Blue style.

Then I went to the Blue style and pointed it to take the Emerge templates and replacements.

Then I renamed the Blue to "Emerge"
and I renamed the Default2 to Blue...

this way the default now is the Emerge

But there is a small bug...

Lets say that I'm logged in. And I have chosen the Emerge (default) style on the combo box....

Then I loggout. Now (here is the bug) the style of the board is still the Emerge (because it is now the default one), but in the combo box the "blue" is shown!!!!!

Can you figure out why this happens?
It seems like the combo box has kept as default style the blue? or somthing like that...

Clearing the cookies did not help.

Im thinking of 2 solutions

1) Uninstalling the combo box and reinstall it.

or

2) Making the combo to always display a non-selectable text "choose style"

will any of these solutions work?

thanx in advance
I will appreciate it if you look into this
Reply With Quote
  #28  
Old 11-15-2002, 11:54 PM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did this:

I disabled the (new) Blue.

Now when I log out, the Dark is shown in the combo box... although I have the Emerge on the board...

I enabled again the Blue and renamed it to WBlue

then I logged out...

Now the Dark is again in the box, athough the board is no the Emerge style. And the Wblue is last on the box...

So maybe afte all the combo box juts displays the styles alphabeticaly?!! ??

maybe this is why a logged out user sees in the box the Blue as first style ?
Reply With Quote
  #29  
Old 11-15-2002, 11:58 PM
filburt1 filburt1 is offline
 
Join Date: Feb 2002
Location: Maryland, US
Posts: 6,144
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No idea why it's doing that, the only thing that will change across users is which one is initially selected. The contents of the dropdown will always be identical.
Reply With Quote
  #30  
Old 11-16-2002, 12:01 AM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When a user is logged out.... from where does the combo take the style that it shows as first?

does it just display the styles alphabetically?

Code:
$result = mysql_query("SELECT styleid,title FROM style WHERE userselect=1 ORDER BY title");
doesn't this ORDER BY title mean that it shows the styles by alphabetical order for a guest?
Reply With Quote
  #31  
Old 11-16-2002, 12:15 AM
stark427's Avatar
stark427 stark427 is offline
 
Join Date: Aug 2002
Posts: 147
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is what I did:

I renamed my styles like this:

1. Emerge
2. Blue
3. Dark

Now when I'm a guest... the 1.Emerge is shown on the combo (as it should)
and the other come sorted by the number...

so it has to be that the combo box displays the styles alphabetically... and not according to which is the default....

just my 2 cents - I might be wrong...
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 10:31 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.04458 seconds
  • Memory Usage 2,306KB
  • 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_code
  • (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