Previous Thread
Next Thread
Print Thread
Rate Thread
#237514 02/22/2003 2:02 AM
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Attachments
70300-stylesheetpopularity1.0.zip (0 Bytes, 94 downloads)

Sponsored Links
Joined: Jan 2002
Posts: 674
Junior Member
Junior Member
Offline
Joined: Jan 2002
Posts: 674
Added this one... interesting to see which one the folks are using. I was surprised.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Very !

Joined: Jan 2003
Posts: 338
Enthusiast
Enthusiast
Offline
Joined: Jan 2003
Posts: 338
If we delete lines:

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

File will be work under [6.1.1] version

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
That's good to know, I think I'll install it then. It's a nice little script.

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
he he
You gotta get to 6.2.

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Easiest mod I've ever added! Nice work

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
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...

Joined: Nov 2002
Posts: 116
Journeyman
Journeyman
Offline
Joined: Nov 2002
Posts: 116
Very good. Thanks Josh

Joined: Aug 2002
Posts: 1,191
Kahuna
Kahuna
Joined: Aug 2002
Posts: 1,191
Very nice one Josh! Thanks for that!

I never knew how popular some stylesheets are!


Nikos
Sponsored Links
Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
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

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
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?

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
[]yesterday I had forced everyone to use default[/]

How exactly did you do that?

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
The same thing happened to me.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
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.

Joined: Feb 2001
Posts: 2,268
Junior Member
Junior Member
Offline
Joined: Feb 2001
Posts: 2,268
Thanke for the explanation dave! Is this another one of those "irritations" in Threads that needs to be fixed?

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Dave, is this is another case where "NULL" shouldn't be used?

Shouldn't the default setting in the database be 'usedefault'?

Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Sounds like it. They can really make things work in quirky ways.

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
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.

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Neat, needs updating since 6.3 has editable languages Was the blank result ever fixed?

Last edited by JC; 06/18/2003 2:42 PM.

- Custom Web Development
http://www.JCSWebDev.com
Joined: Jan 2003
Posts: 338
Enthusiast
Enthusiast
Offline
Joined: Jan 2003
Posts: 338
I return to this hack, how change srpit to show not file names but only describe of stylesheets.

Joined: Aug 2002
Posts: 32
User
User
Offline
Joined: Aug 2002
Posts: 32
Could anyone 6.5 this script, or is there some other script that does the same now?


Organizer
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609


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)