Version: 1.00, by MoMan
Developer Last Online: Oct 2022
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.
Ok, in testing the product further, it seems moderated users can see their own posts, but not threads they started.
So it works for posts, but not for threads.
Any suggestions on how to fix this in the product? It would be nice to keep it as a product rather than having to edit the source files directly as before...
Ok, in testing the product further, it seems moderated users can see their own posts, but not threads they started.
So it works for posts, but not for threads.
Any suggestions on how to fix this in the product? It would be nice to keep it as a product rather than having to edit the source files directly as before...
Yes, I wasn't sure if that's what you are using. What version of vB are you running? I can test this on either vB 3.8.11 or vB 4.2.5...it's been so long since I did this I would have to get familiar with it again. I seem to recall it working correctly for me though.
Yes, I wasn't sure if that's what you are using. What version of vB are you running? I can test this on either vB 3.8.11 or vB 4.2.5...it's been so long since I did this I would have to get familiar with it again. I seem to recall it working correctly for me though.
Thanks! I'm using 4.2.5. I had tried the direct modifications to the files in 4.2.3 and that had worked. Just trying the product version and as I say, it seems to work for posts, but not threads. Not sure if I'm doing something wrong, but it would be great if you could check it out as I love this hack. Saves me getting all sorts of double-posts because people don't realize their moderated posts won't show up until approved (and of course they never read the message they get that tells them the same)... ;-)
Thanks! I'm using 4.2.5. I had tried the direct modifications to the files in 4.2.3 and that had worked. Just trying the product version and as I say, it seems to work for posts, but not threads. Not sure if I'm doing something wrong, but it would be great if you could check it out as I love this hack. Saves me getting all sorts of double-posts because people don't realize their moderated posts won't show up until approved (and of course they never read the message they get that tells them the same)... ;-)
Okay, I just retested this on my dev site, and I found moderated users can see both their new threads and posts.
Okay, I just retested this on my dev site, and I found moderated users can see both their new threads and posts.
I had mistakenly thought that it was partially working. I realize now that it doesn't work at all on my forum.
I'll try the direct file modification again and see if that works.
I had mistakenly thought that it was partially working. I realize now that it doesn't work at all on my forum.
I'll try the direct file modification again and see if that works.