Go Back   vb.org Archive > Community Discussions > Forum and Server Management
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-21-2008, 07:54 PM
motaaa motaaa is offline
 
Join Date: Jun 2008
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default SQL query to remove "moderate to post"?

No matter what I do every single time anyone posts other than an administrator it says your post/thread has been submitted and will be created once it is approved by a moderator or something along those lines. I have a very large number of forums and a very large number of user groups that I would have to manually change permissions for. So even if someone did tell me how to fix it and it actually worked, it would take me about an hour or two manual work.

I was thinking there would be a really easy SQL query that someone could post for me to change all "required to be approved" permissions to NO. I don't know SQL but I made an example of how it would look below and I'm sure anyone with any SQL knowledge will know what I'm talking about and be able to fix the syntax.

Just in case you don't quite understand from my SQL example I also posted another "english" version of how the script would look. Then below that I wrote a description, so if you can't understand what I'm asking after reading all 3 of those then you probably can't code it anyway

Variables Used:
RequiredModeration
The name I gave to the variable in SQL that determines if a post must be moderated/approved before it is posted. (1=YES & 0 = NO)

ForumPermissions
I think this actually may be right, it's the table in the SQL that contains the variable above. There may be more than one table that contains this variable but it would definitely be nice if it was just a 1 line SQL query to fix my problem.

SQL Query:
Do caps matter?
Code:
UPDATE FORUMPERMISSIONS SET REQUIREDMODERATION = 0 WHERE REQUIREDMODERATION = '1';
SQL Englishified:
Code:
//Set table & variable names
Table = 'ForumPermissions';
Var = 'RequiredModeration';

//Find & Compare "RequiredModeration = 1" in "ForumPermissions"
if ( FindCompare(Table) ( Var, 1) )
   then
//If any RequiredModeration variables = 1 then change to 0
RequiredModeration = 0;
end
Description:
Open the table(s) that contains the variable(s) determining whether or not threads/posts need to be moderated/approved before they are submitted for others to see. Now search this table you just opened for the variable I described above, if the variable is 1 or YES (as in threads must be approved before they are submitted) then change it to 0 or NO.

End Note:
Alright that's it, easy as can be, right? This doesn't seem hard at all but I just don't know SQL syntax, what tables need to be updated, what the variable names are, or any of that stuff. Seems like a waste of time to learn all that for something as simple as this. I don't think anyone has ever put this much detail into a question for something so simple, so I hope SOMEONE is nice enough to answer
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 01:28 AM.


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.03325 seconds
  • Memory Usage 2,159KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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