vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   skin selector dropdown on main forum page (https://vborg.vbsupport.ru/showthread.php?t=32861)

supreemball 11-30-2001 10:00 PM

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. :)

Admin 12-02-2001 11:41 AM

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?

supreemball 12-02-2001 01:43 PM

and how would i go about doing that? :) i knew it could be better..

JTMON 12-02-2001 11:27 PM

Yes Yes how to do?!:D

Mohamed 12-03-2001 06:49 AM

cool hack :D


thanks

exodus 12-08-2001 10:42 PM

cool "modification"..

good "almost" hack. :)

floleb7 12-13-2001 06:13 PM

cn be possible to have this not manuelly with one query ? :D

KarateKid 12-16-2001 11:57 AM

really cool, but how did you get the counter, how many user use the different styles?

Baratator 12-17-2001 11:25 AM

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

KarateKid 12-21-2001 04:27 PM

Hello,

how can I makle it, that threre are the users who use this style at the moment listed??? :confused:


All times are GMT. The time now is 09:20 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.01183 seconds
  • Memory Usage 1,726KB
  • 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
  • (1)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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