Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons

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
  #12  
Old 04-25-2012, 09:10 AM
xorex's Avatar
xorex xorex is offline
 
Join Date: Jan 2008
Posts: 99
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

<a href="https://vborg.vbsupport.ru/member.php?u=115402" target="_blank">MoMan</a> thank you, may be posible also make it editable for own moderated posts and threads prior to approval ?
Reply With Quote
  #13  
Old 06-28-2012, 09:32 AM
wangyu1314 wangyu1314 is offline
 
Join Date: May 2005
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you ,it's great
Reply With Quote
  #14  
Old 02-11-2013, 08:20 AM
zardos zardos is offline
 
Join Date: Apr 2006
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know how to make this running on VB 3.8.4?
Need to make the posts and threads visible to moderated users.

Code:
	if (!can_moderate($forumid, 'canmoderateposts'))
	{
		if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canseedelnotice']))
		{
			$visiblethreads = " AND visible = 1 ";
		}
		else
		{
			$visiblethreads = " AND visible IN (1,2)";
		}
	}
	else
	{
		$visiblethreads = " AND visible IN (0,1,2)";
	}
I only have that part there. Nothing found about post #2 in the forumdisplay.php in 3.8.4 which is why I asked:
Code:
if ((!$thread['visible'] AND !can_moderate($thread['forumid'], 'canmoderateposts'))
Reply With Quote
  #15  
Old 03-04-2014, 08:46 AM
Skyrider Skyrider is offline
 
Join Date: Feb 2006
Location: Netherlands
Posts: 1,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There a way this code can be converted to vBulletin 4? I tried it myself, but I keep getting a blank page. The code:

Code:
if (!can_moderate($forumid, 'canmoderateposts'))
	{
is I believe new in vBulletin 4 just above:

Code:
if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canseedelnotice']))
		{
as I don't think its in vBulletin 3.
Reply With Quote
  #16  
Old 03-07-2014, 01:51 PM
Calystos's Avatar
Calystos Calystos is offline
 
Join Date: Apr 2009
Location: Terra
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

O/P and S/P codes both work perfectly as-is in vb4.2.2. I edited the forumdisplay.php and showthread.php files accordingly, and all 3 changes were found and made and tested as-is and works, :-)
Reply With Quote
  #17  
Old 10-18-2014, 05:16 PM
Meestor_X Meestor_X is offline
 
Join Date: Apr 2006
Posts: 94
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great on 4.2.2! Thank you.
Reply With Quote
  #18  
Old 06-13-2016, 04:29 PM
Ig@r's Avatar
Ig@r Ig@r is offline
 
Join Date: Feb 2002
Location: MN
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there any way to make this mod a product?
Reply With Quote
  #19  
Old 06-13-2016, 05:17 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
Is there any way to make this mod a product?
Yes, I have attached a product that does the same thing (including post #2)...I haven't tested it, so please let me know if it works for you, and if you would like any added features.

You will have to enable the product in its settings.
Attached Files
File Type: xml product-markflseeownmoderated.xml (2.9 KB, 12 views)
Reply With Quote
Благодарность от:
Ig@r
  #20  
Old 06-13-2016, 05:25 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
Yes, I have attached a product that does the same thing (including post #2)...I haven't tested it, so please let me know if it works for you, and if you would like any added features.
Thanks Mark, I will give this a try! :up:
Reply With Quote
Благодарность от:
MarkFL
  #21  
Old 06-13-2016, 08:24 PM
Ig@r's Avatar
Ig@r Ig@r is offline
 
Join Date: Feb 2002
Location: MN
Posts: 66
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

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:53 AM.


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.04684 seconds
  • Memory Usage 2,346KB
  • Queries Executed 26 (?)
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
  • (4)bbcode_code
  • (2)bbcode_php
  • (2)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (3)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)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_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