Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: LostProphecy on September 21, 2004, 04:24:35 AM

Title: who's using that theme?
Post by: LostProphecy on September 21, 2004, 04:24:35 AM
hey all :)

i was just running through about 20 of my themes (by way of profile>look and layout preferences)

and i look down the list and see things like "2 people using this theme" i thought it would be a good idea if we could somehow have something that we could click on, either in this window or maybe even the admin area where we could tell which exact members are using which theme... maybe even just make the "2 people using this theme" a link to a page that would state who those ppl are...

it could be for just the admins, or maybe any normal member could be able to see who is using what :)

~Jessi
Title: Re: who's using that theme?
Post by: Oldiesmann on September 22, 2004, 10:53:57 AM
Nice idea. Here's a simple MySQL query to get you this information...

SELECT m.userName, t.ID_THEME FROM smf_members AS m, smf_themes AS t WHERE t.value = 'yourthemename' AND m.ID_THEME = t.ID_THEME;
Title: Re: who's using that theme?
Post by: Tomer on September 22, 2004, 11:46:50 AM
You can enter phpMyAdmin and view yourself. :P
Title: Re: who's using that theme?
Post by: Oldiesmann on September 22, 2004, 02:51:06 PM
If you know the theme ID, you can do this:

SELECT userName FROM smf_members WHERE ID_THEME='x'

There are several queries that will get the username and theme name together since both the userID and themeID are stored in the members and themes tables...
Title: Re: who's using that theme?
Post by: [Unknown] on September 22, 2004, 10:06:52 PM
There is no userName.  There's memberName (login name) and realName (displayed name.)

SELECT mem.realName, mem.ID_THEME
FROM smf_members AS mem, smf_themes AS th
WHERE mem.ID_THEME = th.ID_THEME
   AND th.value = 'yourthemename';

Or even better yet, just for phpMyAdmin...

SELECT mem.memberName AS Login, mem.realName AS Name, th.value AS Theme
FROM smf_members AS mem, smf_themes AS th
WHERE mem.ID_THEME = th.ID_THEME
ORDER BY mem.memberName ASC;

-[Unknown]
Title: Re: who's using that theme?
Post by: Anguz on September 22, 2004, 11:07:07 PM
This looks like a good topic for the Tips & Tricks board. :)
Title: Re: who's using that theme?
Post by: Oldiesmann on September 24, 2004, 08:47:38 AM
Sorry about that... :)
Title: Re: who's using that theme?
Post by: bhz on October 04, 2004, 05:11:47 PM
FYI: To get just the Theme Names and not all the other associated values add, and th.variable='name' to the where clause...

phpMyAdmin SQL:

SELECT mem.memberName AS Login, mem.realName AS Name, th.value AS Theme
FROM smf_members AS mem, smf_themes AS th
WHERE mem.ID_THEME = th.ID_THEME and th.variable='name'
ORDER BY mem.memberName ASC LIMIT 0, 30


-bhz
Title: Re: who's using that theme?
Post by: epyon on July 28, 2005, 04:30:25 PM
hey i think this is a good idea too, i was looking for somthing liek this on the admin panel but wtvr, any ways im kindov new to this but how would i add this setting? i mean i see the codes u guys have provided but where do i put it?
Title: Re: who's using that theme?
Post by: Vinspire^ on May 02, 2006, 12:20:37 PM
Quote from: epyon on July 28, 2005, 04:30:25 PM
hey i think this is a good idea too, i was looking for somthing liek this on the admin panel but wtvr, any ways im kindov new to this but how would i add this setting? i mean i see the codes u guys have provided but where do i put it?

Same question here  :D :D :D
Title: Re: who's using that theme?
Post by: Vinspire^ on May 05, 2006, 06:16:43 AM
I got the answer & manage to get it working  8) 8) 8)
Title: Re: who's using that theme?
Post by: Vinspire on May 10, 2006, 11:46:27 PM
Hopefully this function is build into the next SMF upgrade :)