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

Reply
 
Thread Tools
Details »»

Version: , by supreemball supreemball is offline
Developer Last Online: Aug 2006 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 11-30-2001 Last Update: Never Installs: 9
Is in Beta Stage  
No support by the author.

ok for those of you who want(ed) a skin selector on the main page of their forum, this is my little release of code.. i'm sure this could probably be done better somehow, but this 'hack' alone took me a good 45 minutes just to figure out.. this is what i call a skin selector, but technically it just changes the styleid of the skin the user selects into the active styleid all in a dropdown.. the same type of dropdown exists on the User CP - Edit Options screen under Style Set as well.

basically the purpose of this code is to provide a much-needed shortcut on the forum's main page if your forum has multiple templatesets (aka 'skins').. so in other words your users don't have to go to User CP - Edit Profile - Style Set - (choose from dropdown) - Submit Modifications, etc..

Code:
<form>
<select name="newstyleset" onChange="location.href=('index.php?styleid='+this.options[form.newstyleset.selectedIndex].value)">
<option selected>[skin selector]</option><option value="1">default</option>
<option value="2">custom skin #2</option>
<option value="3">custom skin #3</option>
</select>
</form>
note: each "option value" number is the style id for each template set, so change it according to the numbers and names of your style sets.

i'd recommend you put this code on your forumhome template for each template set (aka skin) you have, preferrably at the top, so users can change skins on a dime.. you can see this little doozy in action @ www.somethingleet.com/index.php near the top right side.

bugs: none except for 1 i know of, basically this dropdown adds some unneeded line feeds.. i'm still trying to find an onchange dropdown list that doesnt add line feeds because of the </form> tag. you can change it to a normal dropdown with a go button instead if you want though.

also if you know of any better way(s) of doing this little hack, please lemme know by all means.

Show Your Support

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

Comments
  #2  
Old 12-02-2001, 11:41 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you're really going to make this a hack (because currently is it just a template modification), why not generating the <option> for every style automatically?
Reply With Quote
  #3  
Old 12-02-2001, 01:43 PM
supreemball supreemball is offline
 
Join Date: Nov 2001
Location: houston, tx
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

and how would i go about doing that? i knew it could be better..
Reply With Quote
  #4  
Old 12-02-2001, 11:27 PM
JTMON's Avatar
JTMON JTMON is offline
 
Join Date: Oct 2001
Posts: 279
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes Yes how to do?!
Reply With Quote
  #5  
Old 12-03-2001, 06:49 AM
Mohamed's Avatar
Mohamed Mohamed is offline
 
Join Date: Oct 2001
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool hack


thanks
Reply With Quote
  #6  
Old 12-08-2001, 10:42 PM
exodus's Avatar
exodus exodus is offline
 
Join Date: Nov 2001
Location: Providence, RI USA
Posts: 77
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool "modification"..

good "almost" hack.
Reply With Quote
  #7  
Old 12-13-2001, 06:13 PM
floleb7's Avatar
floleb7 floleb7 is offline
 
Join Date: Oct 2001
Posts: 216
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cn be possible to have this not manuelly with one query ?
Reply With Quote
  #8  
Old 12-16-2001, 11:57 AM
KarateKid's Avatar
KarateKid KarateKid is offline
 
Join Date: Oct 2001
Location: Sydney
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

really cool, but how did you get the counter, how many user use the different styles?
Reply With Quote
  #9  
Old 12-17-2001, 11:25 AM
Baratator's Avatar
Baratator Baratator is offline
 
Join Date: Nov 2001
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

okay that's what i needed but i have one question :

I use different group of users ===> diff levels
Is that possible :

The first grade see in the dropdown
-Trouffion style

The second grade see in the dropdown
-trouffion style
-Soldat style

The third
-trouffion style
-soldat style
-sergent style
etc ....

PLUS when you are trouffion you got the trouffion style and when you get one more grade (soldat), automaticly it sets you the soldat style (but after you can choose to get back the old style : you'll have the choice) but this is not abolutly needed because as you only change usergroup of one user on the admpinCP, at the same time i could change his style too...

Please i REALLY need this modification, REALLY REALLY REALLY
Reply With Quote
  #10  
Old 12-21-2001, 04:27 PM
KarateKid's Avatar
KarateKid KarateKid is offline
 
Join Date: Oct 2001
Location: Sydney
Posts: 158
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello,

how can I makle it, that threre are the users who use this style at the moment listed???
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 11:04 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.06166 seconds
  • Memory Usage 2,283KB
  • Queries Executed 23 (?)
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
  • (1)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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