UBB.Dev
Posted By: JoshPet Stylesheet Popularity 1.0 - 02/22/2003 9:02 AM
Mod Name / Version: Stylesheet Popularity 1.0

Description: Adds a quick link (graphical interface) in the Admin menu to display how many users are using which of your stylesheets. Saves having to remember the query.

Working under: 6.2

Any pre-requisites: none

Author(s): JoshPet from www.joshuapettit.com
              for discussions and bugs go to www.ubbdev.com

Date: 2/21/03

Credits: The Real Kudos go to RandyJG for the Query I used.

Files Altered: /admin/menu.php

Database Altered: No.

New Files: csspopularity.php is added to the admin directory of your threads install.

Notes: Very simple hack.



Attached File
Posted By: smilesforu Re: Stylesheet Popularity 1.0 - 02/22/2003 10:29 AM
Added this one... interesting to see which one the folks are using. I was surprised.
Posted By: Dalantech Re: Stylesheet Popularity 1.0 - 02/22/2003 6:12 PM
Very !
Posted By: Slawek_L great - it works under [6.1.1] - 02/23/2003 3:28 AM
If we delete lines:

// -------------
// Get the input
$Cat = get_input("Cat","get");

File will be work under [6.1.1] version
Posted By: Gardener Re: great - it works under [6.1.1] - 02/23/2003 11:00 AM
That's good to know, I think I'll install it then. It's a nice little script.
Posted By: JoshPet Re: great - it works under [6.1.1] - 02/23/2003 11:03 AM
he he
You gotta get to 6.2.
Posted By: Zackary Re: Stylesheet Popularity 1.0 - 02/23/2003 11:06 AM
Easiest mod I've ever added! Nice work
Posted By: Gardener Re: great - it works under [6.1.1] - 02/23/2003 11:28 AM
Well, I can answer 6.1.1 questions easier, so maybe I'll just stick to this version. =] Nahh. Just need to get my site moved to a new CMS before I upgrade threads, and I also think my users need some time before any more changes to threads. They are very frail, any change at all and they go completely insane. Even if it is something they've been bugging me to fix for ages...
Posted By: Hal9000 Re: great - it works under [6.1.1] - 02/23/2003 11:46 AM
Very good. Thanks Josh
Posted By: dimopoulos Re: Stylesheet Popularity 1.0 - 02/24/2003 1:27 AM
Very nice one Josh! Thanks for that!

I never knew how popular some stylesheets are!
Posted By: Dalantech Re: Stylesheet Popularity 1.0 - 02/24/2003 9:50 AM
What about the option to force the users who have selected "style sheet x" to now use "style sheet y" so that if you change the style sheets you can fix style sheet errors before people complain
Posted By: oceanwest Re: Stylesheet Popularity 1.0 - 02/24/2003 8:10 PM
This is great... one queston i have 16 people useing a style that has NO Name... yesterday I had forced everyone to use default.

I have cleared my style sheets and uploaded only the default one plus my styles.

Any thoughts?
Posted By: Dave_L_dup1 Re: Stylesheet Popularity 1.0 - 02/24/2003 8:41 PM
[]yesterday I had forced everyone to use default[/]

How exactly did you do that?
Posted By: oceanwest Re: Stylesheet Popularity 1.0 - 02/24/2003 10:08 PM
josh told me how

https://ubbdev.com/threads/php/...ew=collapsed&sb=5&o=&fpart=1
Posted By: Dalantech Re: Stylesheet Popularity 1.0 - 02/24/2003 11:39 PM
The same thing happened to me.
Posted By: JoshPet Re: Stylesheet Popularity 1.0 - 02/24/2003 11:41 PM
Yeah, I've noticed Blank Stylesheets to... which would cause them to end up being shown the default.

But I notice that even shorly after I reset everyone with the query.
Posted By: Dave_L_dup1 Re: Stylesheet Popularity 1.0 - 02/24/2003 11:50 PM
Ok. The default value for a user's stylesheet is NULL, which is interpreted the same as 'usedefault', and would show up as an empty string when this hack is used.
Posted By: Dalantech Re: Stylesheet Popularity 1.0 - 02/25/2003 7:44 AM
Thanke for the explanation dave! Is this another one of those "irritations" in Threads that needs to be fixed?
Posted By: JoshPet Re: Stylesheet Popularity 1.0 - 02/25/2003 7:49 AM
Dave, is this is another case where "NULL" shouldn't be used?

Shouldn't the default setting in the database be 'usedefault'?
Posted By: Gardener Re: Stylesheet Popularity 1.0 - 02/25/2003 4:40 PM
Sounds like it. They can really make things work in quirky ways.
Posted By: Dave_L_dup1 Re: Stylesheet Popularity 1.0 - 02/25/2003 5:04 PM
There's really no point in allowing NULL for that column. If could just as easily default to 'usedefault', or ''. I would prefer '', since it saves space. If you have 10000 users with 'usedefault', that's 10 * 10000 = 100000 bytes just to store that info, which is silly.

If you don't like the fact that this hack displays no name when U_Stylesheet is NULL (or ''), just display 'usedefault' instead for those cases.
Posted By: J.C. Re: Stylesheet Popularity 1.0 - 06/18/2003 9:35 PM
Neat, needs updating since 6.3 has editable languages Was the blank result ever fixed?
Posted By: Slawek_L Re: Stylesheet Popularity 1.0 - 06/21/2003 11:34 PM
I return to this hack, how change srpit to show not file names but only describe of stylesheets.
Posted By: Organizer Re: Stylesheet Popularity 1.0 - 11/12/2004 5:09 AM
Could anyone 6.5 this script, or is there some other script that does the same now?
Posted By: JoshPet Re: Stylesheet Popularity 1.0 - 11/13/2004 6:05 AM
This script isn't needed anymore - all the old mod did was "store" the query for you (before Threads had the ability to save SQL Queries. I responded with directions in your other thread.
Posted By: AKD96 Re: Stylesheet Popularity 1.0 - 11/16/2004 2:25 PM
Here's the query that it used... https://www.ubbdev.com/forum/showflat.php/Number/123064#Post123064
© UBB.Developers