|
|
Joined: Apr 2008
Posts: 33
newbie
|
newbie
Joined: Apr 2008
Posts: 33 |
I'd like to know which of our members have selected particular settings for a couple of preferences, specifically:
1) Who has the preferred stylesheet pref set to ubbthreads-dark
2) Who has the Do you wish to have the 'My Stuff' menu as a left navigation menu? pref set to yes
Am guessing I can run queries to come up with a list for each, but I have no idea what those queries might be. Am I on the right track, and if so could someone provide the queries?
Running UBB.threads 7.5.5 as of May 23 2010
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
1. SELECT u.USER_ID, u.USER_DISPLAY_NAME
FROM ubbt_USERS u,
ubbt_USER_PROFILE up
WHERE up.USER_ID=u.USER_ID
AND up.USER_STYLE=2 .. assumes ubbthreads dark is 2 (you can replace as needed) 2. SELECT u.USER_ID, u.USER_DISPLAY_NAME
FROM ubbt_USERS u,
ubbt_USER_PROFILE up
WHERE up.USER_ID=u.USER_ID
AND up.USER_SHOW_LEFT_MYSTUFF=1 3. also an easy way to check on style popularity is SELECT
CONCAT('[*][url=http://yoursite.com/ubbthreads/ubbthreads.php?ubb=previewskin&skin=',t2.STYLE_ID ,']',STYLE_NAME,'[/url]') AS Style,
CONCAT('[color:red](',COUNT(t2.STYLE_NAME),')[/color]') as Count
FROM ubbt_STYLES as t2,
ubbt_USER_PROFILE as t1
WHERE t1.USER_STYLE=t2.STYLE_ID
GROUP BY t2.STYLE_ID
ORDER BY t2.STYLE_NAME replace 'yoursite.com/ubbthreads/' with the real path to your site.. the concat crapola just makes it easy to copy/paste the resulting recordset between a [list] ... tag for display in a post
|
|
|
|
Joined: Apr 2008
Posts: 33
newbie
|
newbie
Joined: Apr 2008
Posts: 33 |
Thanks, Sirdude! Query #1 worked like a charm. With #2 I got this error: Line#: 101 SQL Error: Unknown column 'u.USER.ID' in 'field list' SQL Error #: 1054 I noticed that in #1 you used u.USER_ID so I gathered my courage ( ) and substituted that for u.USER.ID in #2, like this: SELECT u.USER_ID, u.USER_DISPLAY_NAME
FROM ubbt_USERS u,
ubbt_USER_PROFILE up
WHERE up.USER_ID=u.USER_ID
AND up.USER_SHOW_LEFT_MYSTUFF=1 Got believable results with that, so I guess I guessed right?
Running UBB.threads 7.5.5 as of May 23 2010
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
yah.. i typed them up on the fly... good one!
|
|
|
|
Joined: Apr 2008
Posts: 33
newbie
|
newbie
Joined: Apr 2008
Posts: 33 |
Nice to know my brain can figure out some stuff. I ran #3 and at first thought the numbers couldn't be right, then realized that query must not count those who have their style pref set to "Always use default" (which in our case turns out to be most users). Thanks again for your help.
Running UBB.threads 7.5.5 as of May 23 2010
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
yes, you are correct.. it really only counts those users who cared to (or even knew HOW to) change their preference to a specific style then i copy the query results (click, drag select with mouse, copy / paste into thread) between a list tag and : is easily inserted into a post... i went further and made a custom island that updates with that stuff, but you get the idea note: the actual links here point to 'yourdomain.com' style preview, so they will be broken.. this is conceptualizing only
|
|
|
Bots
by Outdoorking - 04/13/2024 5:08 PM
|
|
|
|
|
|
1 members (Ruben),
802
guests, and
202
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|
|