Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Users can see own moderated threads prior to approval Details »»
Users can see own moderated threads prior to approval
Version: 1.00, by MoMan MoMan is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.8.7 Rating:
Released: 01-25-2012 Last Update: Never Installs: 20
Re-useable Code Code Changes  
No support by the author.

On my forum, to prevent spam, threads from new users are checked for common spam keywords, including links. If any such keywords are found, the thread gets auto-moderated.

In order to prevent double-posting, I decided it was necessary for users to be able to see their own moderated threads in the forum listings before they get approved. Nobody reads the redirection message shown, so I hope that this will be more effective in preventing duplicates.

Moderated threads from unregistered users will not be shown to those users.

Open forumdisplay.php,

Find:
PHP Code:
        if (!($forumperms $vbulletin->bf_ugp_forumpermissions['canseedelnotice']))
        {
            
$visiblethreads " AND visible = 1 ";
        }
        else
        {
            
$visiblethreads " AND visible IN (1,2)";
        } 
Replace with:
PHP Code:
        if ($vbulletin->userinfo['userid'])
        {
            if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canseedelnotice']))
            {
                
$visiblethreads " AND (visible = 1 OR (visible = 0 AND postuserid = " intval($vbulletin->userinfo['userid']) . "))";
            }
            else
            {
                
$visiblethreads " AND (visible IN (1,2) OR (visible = 0 AND postuserid = " intval($vbulletin->userinfo['userid']) . "))";
            }
        }
        else
        {
            if (!(
$forumperms $vbulletin->bf_ugp_forumpermissions['canseedelnotice']))
            {
                
$visiblethreads " AND visible = 1 ";
            }
            else
            {
                
$visiblethreads " AND visible IN (1,2)";
            }
        } 
Note: if you want to allow users to see their own moderated posts as well, see post #2.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
xorex

Comments
  #22  
Old 06-13-2016, 09:06 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ig@r View Post
OK, installed the product and tested, the users now able to see their moderated threads, unfortunately the second part is't working and they can not see their moderated posts yet.
Another thing I've discovered, that users are not able to post a reply in their own moderated thread if they decide to add something to it.
Okay, I will do some testing then and see if I can get everything to function correctly.
Reply With Quote
  #23  
Old 06-14-2016, 12:43 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I fixed the error preventing the db query from working, and have attached the updated product.

Allowing users to reply to their own moderated threads isn't something this was ever intended to do, and so I will have to figure out how to make that happen. Once I have, I will post.
Attached Files
File Type: xml product-markflseeownmoderated.xml (2.9 KB, 6 views)
Reply With Quote
  #24  
Old 06-14-2016, 03:41 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, this updated version will allow users to reply to their own moderated threads, and to edit their own moderated posts.
Attached Files
File Type: xml product-markflseeownmoderated.xml (4.3 KB, 34 views)
Reply With Quote
  #25  
Old 06-14-2016, 04:16 PM
Ig@r's Avatar
Ig@r Ig@r is offline
 
Join Date: Feb 2002
Location: MN
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
Okay, this updated version will allow users to reply to their own moderated threads, and to edit their own moderated posts.
Thank you very much, Mark :up:
It is working on 4.2.3
Because I have AJAX function turned on the new post appers only after full page refresh, before that user still sees "Your post will not be visible until a moderator has approved it for posting" message. Other then that the hack works great. Thanks again.
Reply With Quote
  #26  
Old 06-14-2016, 04:23 PM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

On my dev site, I also have the "Quick Reply" enabled, and the new post shows up immediately. This is when a thread has been put into the moderation queue by a mod/admin. How are threads/posts being put into the moderation queue on your site?

Perhaps if I know this, I can duplicate the conditions you have and fix this remaining issue.
Reply With Quote
  #27  
Old 06-15-2016, 01:31 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ig@r View Post
Thank you very much, Mark :up:
It is working on 4.2.3
Because I have AJAX function turned on the new post appers only after full page refresh, before that user still sees "Your post will not be visible until a moderator has approved it for posting" message. Other then that the hack works great. Thanks again.
Are you by chance using my automated post reporter product, that puts posts/threads into the moderation queue automatically, if a user posts certain flagged words, or necro-posts?

The reason I ask is that I do get the behavior you describe with that product (which is by design), and what I can do is incorporate this feature (allowing users to see/edit their own moderated posts) into the automated post reporter, and then if you elect to allow users to see/edit their own moderated posts, I can turn off the error message.

The automated post reporter product is in need of an overhaul as it was the first product I wrote, and so look for an upgrade including this feature at some point (I don't want to give any kind of timeline at this point).
Reply With Quote
Благодарность от:
blah100
  #28  
Old 06-15-2016, 07:41 PM
Ig@r's Avatar
Ig@r Ig@r is offline
 
Join Date: Feb 2002
Location: MN
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have special user group with settings "Follow Forum Moderation Rules If no, posts are always placed into moderation queue" set to no. For my testing I used an account of this type.
Reply With Quote
  #29  
Old 07-01-2016, 03:12 PM
blah100 blah100 is offline
 
Join Date: Oct 2014
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
Are you by chance using my automated post reporter product, that puts posts/threads into the moderation queue automatically, if a user posts certain flagged words, or necro-posts?

The reason I ask is that I do get the behavior you describe with that product (which is by design), and what I can do is incorporate this feature (allowing users to see/edit their own moderated posts) into the automated post reporter, and then if you elect to allow users to see/edit their own moderated posts, I can turn off the error message.

The automated post reporter product is in need of an overhaul as it was the first product I wrote, and so look for an upgrade including this feature at some point (I don't want to give any kind of timeline at this point).
I can confirm that it's due to another modification which moderates based upon keywords (in my case it's Glowhost's Spam-o-matic). Sounds like your product does the same thing. I always found it better to moderate based upon keywords rather than having an entire board's threads/posts go into moderation via vbulletin's settings. I mean who has time to do all that approving? So I used glowhost's spam-o-matic to only look for spam keywords in order to put posts/threads into moderation and when I tested your updated product by entering a bad keyword and it still gave me that annoying "Your post will not be visible until a moderator has approved it for posting" popup, and even further it wouldn't let me edit the post after I did a manual refresh.

I'd gladly switch to your post reporter product when you update it to work with allowing users to see and edit their own moderated posts/threads without getting that annoying popup about needing a moderator approval first. To me it just seems better for members not to see that popup since it only annoys them. It's better that when they post something that is moderated that the post/thread appears and is editable as if nothing is wrong. While in the background moderators efficiently approve the post/threads without the user being none the wiser that it was moderated to begin with. It'll also cut down on members making duplicate posts/threads to bypass the moderation.
Reply With Quote
  #30  
Old 02-25-2017, 03:22 PM
Stratis's Avatar
Stratis Stratis is offline
 
Join Date: Jan 2010
Posts: 738
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
Okay, this updated version will allow users to reply to their own moderated threads, and to edit their own moderated posts.

Is there possible Mark, that they can see attached images they upload?
Now attached images dos not show up. I do not have in settings moderate attachments. I realized this because 4-5 members try to upload image again and again as they do not see the image, it shows with the X. After approve is ok.
As admins - Mods we can see the image.


Thank you very much
Reply With Quote
  #31  
Old 07-26-2017, 01:48 PM
Meestor_X Meestor_X is offline
 
Join Date: Apr 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I used this hack in the past by modifying the files as per the O/P and 2nd Post. On my new forum (4.2.5) I tried doing it using the XML product, and that's doesn't seem to work.
I'll uninstall the product and try the manual modification again.
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 06:38 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09641 seconds
  • Memory Usage 2,364KB
  • Queries Executed 28 (?)
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
  • (2)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (2)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete