Previous Thread
Next Thread
Print Thread
Rate Thread
#270376 03/04/2004 1:39 PM
Joined: Feb 2004
Posts: 48
Junior Member
Junior Member
Offline
Joined: Feb 2004
Posts: 48
Mod Name / Version: StyleBar 1.0

Description: This mod will add an easy access bar to your forums where users can choose a stylesheet and have it take effect instantly. Opposed to having to edit your profile everytime you need a new look!

Working Under: UBB.Threads 6.4

Mod Status: Beta

Any pre-requisites:

Author(s): Lane

Date: 03/04/04

Credits: Paul Sowden (http://www.alistapart.com/articles/alternate/)

Files Altered: editdisplay.php
ubbt.inc.php
editdisplay.tmpl
ubbt_header.tmpl
ubbt_registerednav.tmpl
ubbt_unregisterednav.tmpl

New Files: styleswitcher.js

Database Altered: None

Info/Instructions: Thanks to Allen for letting me use his test board for this. Make sure you back everything up.

Demo: HERE!! (it's right below the menubar)

Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.

Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Attachments
109353-StyleBar.zip (0 Bytes, 35 downloads)

Last edited by Lane; 03/04/2004 1:40 PM.
Sponsored Links
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
Very neat mod, Lane. Thanks

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Trippy! Does it get stored in the user's profile or will it default to the default when they come back?

#270379 03/05/2004 12:12 PM
Joined: Feb 2004
Posts: 48
Junior Member
Junior Member
Offline
Joined: Feb 2004
Posts: 48
[]Zackary said:
Trippy! Does it get stored in the user's profile or will it default to the default when they come back? [/]

Thanks.

It's stored in a cookie created through javascript, so it isn't really in the profile -- but it does remember the users style preferences. I could have made it update the field in the database, but the page would have to refresh to run the update code... and i kinda like the instant thing. The user can still choose their style preference in their profile area too if they wish.

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Very cool, and works for anon users as well. I think I might add this one. Thanks Lane.

Sponsored Links
Joined: Sep 2000
Posts: 159
Member
Member
Offline
Joined: Sep 2000
Posts: 159
Sounds great, but the code that you said to replace in editdisplay.tmpl wasn't in my version.

I have modified my file to put in the CSS display preview modifification. However, the files you told me to find were in neither the original version nor the modified one after the CSS preview.

I would really like to use this one! Sounds great!

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Very nice.

Joined: Feb 2004
Posts: 48
Junior Member
Junior Member
Offline
Joined: Feb 2004
Posts: 48
Thanks Josh.

Ellen, if you can't find the code you have to replace:

Code
Find:<br />$stylesheets<br /></select><br /><br /><br />Add Below:<br /><br /><input type="button" name="setskin" value="Use Selected" onclick="setSkin()" class="buttons" /><br />


That should do it.

Joined: Jun 2000
Posts: 190
Enthusiast
Enthusiast
Joined: Jun 2000
Posts: 190
Lane,

This looks like it might be a great hack. I do have a question though. In the DEMO you linked to there are 5 alternatives. What happens if you have 15 or 20 stylesheets that you are currently offering? Do all of them then get displayed? And wouldn't this create a huge array of links in that new table row?

Jeff


Artificial Intelligence is no match for natural stupidity!
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
It would, tho you could make a bit cleaner way to choose, much like zeldman does here: http://www.zeldman.com - tho you'd have a lot less hair-pulling if you were to trim that number down to 4-5 - that number will satisify 95% of your users, approx. the same number you satisfy with 15+ stylesheets


- Allen wavey
- What Drives You?
Sponsored Links
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
bah, zeldman doesn't do it right now.. it'll come back once he gets his re-design finished


- Allen wavey
- What Drives You?
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
What about a pulldown menu instead of links across the top?

Joined: Jan 2003
Posts: 263
Member
Member
Joined: Jan 2003
Posts: 263
Awesome mod! Will it work for 6.5 ?

Joined: Feb 2001
Posts: 169
Member
Member
Offline
Joined: Feb 2001
Posts: 169
Thank you Lane, I really love this mod and I have to update this post telling everybody that it works perfectly with 6.5 too !


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)