Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2005, 08:51 PM
Sculli's Avatar
Sculli Sculli is offline
 
Join Date: Nov 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default find user without sig (sql query+)

SQL query god(s), once again I call upon thee!

One of my board rules is that every user must ad their game character to their signature. This is very important as the persons in-game reputations carries over to the board, and their board rep into the game.

Anyway, some users don't read the rules, some don't care, etc etc.

Ultimately what I would like is some sort of automated way to send all those who do not have anything at all in their sig a PM that says they do need to add their character name to their sig.

In the short term a query that would return the user names of those who do not have a sig of any kind would help, I would then manually PM those users.

Thanks in advance for your time and consideration.
Reply With Quote
  #2  
Old 12-07-2005, 09:24 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[sql]SELECT user.username
FROM usertextfield AS usertextfield
LEFT JOIN user AS user ON (user.userid = usertextfield.userid)
WHERE usertextfield.signature = ""[/sql]
Reply With Quote
  #3  
Old 12-07-2005, 09:34 PM
Sculli's Avatar
Sculli Sculli is offline
 
Join Date: Nov 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Macro to the rescue once again!
Thanks, really appreciate it.

Edit:
Oops, not quite working, returned a total of 18 users, and on the board I see some without a sig that are not in the listed 18. Also, 18 out of 3,200+ doesn't seem quite right.

Makes me wonder whether I would get different results if I were to run this from mysql> rather than through the board, will test that out tonight.
Reply With Quote
  #4  
Old 12-07-2005, 09:39 PM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Have you considered having the users add thier game name to a custom profile field and having the profile field called in the sig template?

$post[fieldx] where x is the custom field #?
Reply With Quote
  #5  
Old 12-07-2005, 09:52 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Sculli
Edit:
Oops, not quite working, returned a total of 18 users, and on the board I see some without a sig that are not in the listed 18. Also, 18 out of 3,200+ doesn't seem quite right.

Makes me wonder whether I would get different results if I were to run this from mysql> rather than through the board, will test that out tonight.
Try:
[sql]SELECT user.username
FROM user AS user
LEFT JOIN usertextfield AS usertextfield ON (user.userid = usertextfield.userid)
WHERE usertextfield.signature = ""
OR usertextfield.signature = NULL
[/sql]

It should make no difference if you run from ACP or mysql directly.
Reply With Quote
  #6  
Old 12-07-2005, 11:24 PM
Sculli's Avatar
Sculli Sculli is offline
 
Join Date: Nov 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Reeve of shinra
Well, either which way, the problem is that some users simply don't do it, no matter where I would give them the option to do so. So I am trying to teack the little buggers down and yell at them!

@MarcoH64
No luck, same 18 entries returned, and I am no help at all since I really don't know the first thing about SQL. Perhaps it's time for me to learn ...
Reply With Quote
  #7  
Old 12-07-2005, 11:25 PM
Reeve of shinra's Avatar
Reeve of shinra Reeve of shinra is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 1,896
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can make a custom field required and there's a hack out that would force everyone to go in and update it

oh and maybe its only those 18 people without a sig at all?
Reply With Quote
  #8  
Old 12-12-2005, 09:43 PM
Sculli's Avatar
Sculli Sculli is offline
 
Join Date: Nov 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is certainly very curious. The query looks like it should work, yet it doesn't, meaning it returns less than the expected number of results.

Here is an extension of this mod request: A mod that would allow the admin to SET the signature of all those who have not set one themselves. That would be most awesome.

P.S.: Still experimenting with queries to try and get to the bottom of why this doesn't work properly.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04349 seconds
  • Memory Usage 2,226KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete