Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: LostProphecy in September 21, 2004, 04:24:35 VORMITTAG

Titel: who's using that theme?
Beitrag von: LostProphecy in September 21, 2004, 04:24:35 VORMITTAG
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
Titel: Re: who's using that theme?
Beitrag von: Oldiesmann in September 22, 2004, 10:53:57 VORMITTAG
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;
Titel: Re: who's using that theme?
Beitrag von: Tomer in September 22, 2004, 11:46:50 VORMITTAG
You can enter phpMyAdmin and view yourself. :P
Titel: Re: who's using that theme?
Beitrag von: Oldiesmann in September 22, 2004, 02:51:06 NACHMITTAGS
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...
Titel: Re: who's using that theme?
Beitrag von: [Unknown] in September 22, 2004, 10:06:52 NACHMITTAGS
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]
Titel: Re: who's using that theme?
Beitrag von: Anguz in September 22, 2004, 11:07:07 NACHMITTAGS
This looks like a good topic for the Tips & Tricks board. :)
Titel: Re: who's using that theme?
Beitrag von: Oldiesmann in September 24, 2004, 08:47:38 VORMITTAG
Sorry about that... :)
Titel: Re: who's using that theme?
Beitrag von: bhz in Oktober 04, 2004, 05:11:47 NACHMITTAGS
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
Titel: Re: who's using that theme?
Beitrag von: epyon in Juli 28, 2005, 04:30:25 NACHMITTAGS
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?
Titel: Re: who's using that theme?
Beitrag von: Vinspire^ in Mai 02, 2006, 12:20:37 NACHMITTAGS
Zitat von: epyon in Juli 28, 2005, 04:30:25 NACHMITTAGS
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
Titel: Re: who's using that theme?
Beitrag von: Vinspire^ in Mai 05, 2006, 06:16:43 VORMITTAG
I got the answer & manage to get it working  8) 8) 8)
Titel: Re: who's using that theme?
Beitrag von: Vinspire in Mai 10, 2006, 11:46:27 NACHMITTAGS
Hopefully this function is build into the next SMF upgrade :)