PDA

View Full Version : skin selector dropdown on main forum page


supreemball
01 Dec 2001, 20:42
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:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



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

Chen
02 Dec 2001, 13:41
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
02 Dec 2001, 15:43
and how would i go about doing that? :) i knew it could be better..

JTMON
03 Dec 2001, 01:27
Yes Yes how to do?!:D

Mohamed
03 Dec 2001, 08:49
cool hack :D


thanks

exodus
09 Dec 2001, 00:42
cool "modification"..

good "almost" hack. :)

floleb7
13 Dec 2001, 20:13
cn be possible to have this not manuelly with one query ? :D

KarateKid
16 Dec 2001, 13:57
really cool, but how did you get the counter, how many user use the different styles?

Baratator
17 Dec 2001, 13:25
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
21 Dec 2001, 18:27
Hello,

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

Shadowwalker
19 Jan 2002, 00:54
I notice that I had to edit the the style it would start in. I think it should be redone in php so it would be automatic.

jam583
17 Feb 2002, 23:55
Anyone made it automatic yet and would be so kind to post the code?

Juanito
22 Feb 2002, 16:24
This is perfect! Simple but really efficient for one special board with loads of flash and small typos. I've made alternative displays and it's so cool they can chage it this way, Flash, non flash, larger types etc... Thanks!

Sc0rpion
24 Feb 2002, 15:39
Ditto Juanito's post,
works a treat for me, thankyou :)

Jawelin
25 Feb 2002, 18:29
O-T: is it possible to create different skins - basically different color and button sets - (selectable by this combo box) WITHOUT creating new templatesets ?
I fear to have to modify branches of templates when I'll add more hacks in a multi-style environment.

Asked a lot (vb.com & vb.org (http://www.vbulletin.org/forum/showthread.php?s=&threadid=35383)) for help, but... :(
Thanks