PDA

View Full Version : Moderate individual threads


MrNase
11-04-2005, 10:00 PM
Should be in vB by default but it isn't.. This is why I made it ;)

Description:
This hack let's you select directly from the thread wether all new replies are moderated or not.
You can even use the inline moderation to select more than 1 thread which replies must be confirmed first before somebody else can see them.
The default vB function only allows thread moderation by forum and/or by usergroup.
This modification uses the default routines to handle the moderation. This means all the known functions have remained (overview of moderated posts in the AdminCP).


Features:
usergroup permissions, you can select what usergroup can moderate the individual threads
select which thread is moderated, no need to have a whole forum moderated
uses default vB functions, moderated posts are shown in the adminCP and in the modCP

Notes:
Altough I improved my english a lot over the time you should rework the phrases and give them a more professional look ;)
This one is running on my community without any problems. To be sure it works for you as good as for me I re-installed the modification on my community with the help of this product file and this instructions.


Installation:
I tried to add as much plugins as possible but you have still work on some files.
DO A BACKUP OF YOUR DATABASE!!

Upload the file bitfield_mrnasemoderatethread.xml to /include/xml/

Then import product-mrnasemoderatethread.xml. This file will do most of the work for you.

Then open instructions_mrnasemoderatethread.txt and follow the instructions carefully.

Now edit the usergroups you would like to allow the usage of this modification. The default value is 'do not allow to moderate individual threads' so in most cases you just have to edit the Administration Group.


Well, try it out and give me some nice feedback! :)


Click here to install or you'll get diarrhea :rambo: (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=100177)

MrNase
11-05-2005, 08:16 PM
Reserved for possible future use.

Snakey
11-05-2005, 08:56 PM
I agree, should be in vB by default

* Snakey clicks install

1 Question: could it be made as a full plugin/product? (no code changes?)

Andreas
11-05-2005, 09:09 PM
Nice Hack, though I prefer Hacks with less file edits ;)

To get rid of the class_dm_threadpost.php file edits:

threaddata_start, threadfpdata_start

$this->validfields['moderated'] = array(TYPE_UINT, REQ_NO, 'return verify_moderated(&$dm, &$data);');

if (!function_exists('verify_moderated'))
{
function verify_moderated(&$dm, &$moderated)
{
if ($sticky != 1)
{
$sticky = 0;
}

if ($dm->condition AND !$dm->info['skip_moderator_log'])
{
require_once(DIR . '/includes/functions_log_error.php');
if ($this->fetch_field('moderated'))
{
$logtype = fetch_modlogtypes('unmoderatedthread');
}
else
{
$logtype = fetch_modlogtypes('moderatedthread');
}
$dm->modlog[] = array('userid' => intval($dm->registry->userinfo['userid']), 'type' => intval($logtype));
}

return true;
}
}



To get ird of the functions_log_error.php edits (requires vBulletin >= 3.5.1):
fetch_modlogtypes

$modlogtypes['moderatedthread'] = 31;
$modlogyptes['unmoderatedthread'] = 32;



fetch_modlogactions

$modlogactions[31] = 'moderatedthread';
$modlogactions[32] = 'unmoderatedthread';



To get rid of the inline.php file edit

inlinemod_action_switch

if ($_REQUEST['do'] == 'moderatethread' OR $_REQUEST['do'] == 'unmoderatethread')
{

if (empty($vbulletin->GPC['tlist']))
{
eval(standard_error(fetch_error('you_did_not_selec t_any_valid_threads')));
}

if (count($vbulletin->GPC['tlist']) > $threadlimit)
{
eval(standard_error(fetch_error('you_are_limited_t o_working_with_x_threads', $threadlimit)));
}

$threadids = implode(',', $vbulletin->GPC['tlist']);
$handled_do = true;
}


To get rid of the postings.php file edit

if ($_REQUEST['do'] == 'moderathethread')
{
if (!$threadinfo['threadid'])
{
eval(standard_error(fetch_error('invalidid', $vbphrase['thread'], $vbulletin->options['contactuslink'])));
}
$handled_do = true;
}


To get rid of the functions_newpost.php file edit
newpost_process

if ($threadinfo['moderated'])
{
$dataman->set('visible', 0);
$post['visible'] = 0;
}


All those Plugins are untested, but should work theoretically.

Shack Networks
11-06-2005, 02:24 PM
All look into the sky and hail the gods, thank god someone has FINALY had the same idea I had and wots more they have actualy got it working..

Blessed are the Coders...

Seriously though, this SHOULD of been standard army issue in vBull from day one as sometimes a thread can get out of hand easily and go way off topic, this solves it nicely for me and so is worth the journey to the installed button.

Thanks a lot, I am 100% sure this will be a much used hack..

H

MrNase
11-07-2005, 08:02 AM
Andreas: Nope, not working for me.. I had to re-install the code modifications because the plugins were not working.

I really appreciate your help but it doesn't help a lot to post unfinished/not working code snippets because some may thing those are final and may get disappointed when they are not working :)

Andreas
11-07-2005, 12:41 PM
That's why I said they are untested.

Gonna test them now.

Andreas
11-07-2005, 01:35 PM
Testet it now and turned out to be just 2 slight typos :)

threaddata_start, threadfpdata_start

if ($dm->fetch_field('moderated'))


instead of


if ($this->fetch_field('moderated'))


threadadmin_action_switch

if ($_REQUEST['do'] == 'moderatethread')
{



instead of


if ($_REQUEST['do'] == 'moderathethread')
{


I've also attached the complete ZIP.

David Gillaspey
12-18-2005, 10:58 PM
Hi,

First, thanks to MrNase and Andreas for making this modification available.

I installed this, using MrNase's original concept, and it appears to work. (To test something like this, I have to post a test reply in a thread using -- again for test purposes only -- a second login account equal in privileges to that of an ordinary Registered user.)

Two questions:

1) As an ordinary Registered user, after making a post to a thread that I had set to be moderated (while logged in as the site admin), I saw a notification that the thread to which I had replied was being moderated. This notification screen, however, went away a little bit too quickly, so that I didn't have time to read the full notice about the thread being moderated. Is there any way to increase the amount of time a user sees that notification screen?

2) It appears that administrators and moderators can see that a thread is being moderated, because of a little icon that shows up to the right of the thread title. I see this when logged in as site admin. I don't see this when I'm logged on as an ordinary Registered user, however. How do ordinary Registered users know a thread is being moderated? (Maybe there's already a mechanism for this built into vBulletin. I will admit to being somewhat unfamiliar with moderation to begin with.)

Thanks in advance for your help.

David Gillaspey
Administrator
The Church Webmasters' Forum (http://www.churchwebmastersforum.org)

silurius
12-20-2005, 08:49 PM
I am a little confused about the recommended install process. Are the two zips identical, and are we supposed to install the product AND apply the manual changes?

sparklywater
02-02-2009, 08:35 AM
Thanks, I used the original method and it works well :)

Bayou Buck
10-09-2009, 04:37 AM
Can someone please update/upgrade this for vBulletin 3.8.x???????? What can I do. I NEED this...my forum is falling to pieces over controversial posts, but I don't want to moderate all new posts.