Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Inline Moderation Tools (v1.2.1) Details »»
Inline Moderation Tools (v1.2.1)
Version: 1.2.1, by rob_daemon rob_daemon is offline
Developer Last Online: Sep 2019 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-27-2004 Last Update: 12-10-2004 Installs: 122
 
No support by the author.

Note: Development of this hack has stopped.
The built-in version is far superior to this hack and has better controls and permission checking. For those of you who will remain on 3.0.x, I will try to support this hack as best I can, but it won't be a top priority. If you plan on moving to 3.5, I hope this hack made your life a little bit easier while you waited .


Current Version: 1.2.1 (Wed Dec 11 15:26:30 PDT 2004)

What this is?
This hack will allow you and your moderators to do your job more effectively by allowing you to mass-moderate. You can perform the same action on multiple threads and posts without leaving the current page!

What is required?
In order to use this hack, you must have cookies and JavaScript enabled! If you don't, this hack will not work. (Note: there is no "alternative display" for people without JavaScript enabled).

How many changes?
Uploads: 2
File edits: 2
And template additions/edits

Support
I will provide all support here in this thread.

Bugs
I have thoroughly tested this hack with as many different combinations I could think of. But I probably have either over looked one or two, or just didn't think of some. If you find any odd behaviour, please let me know!

Changes Since
  • 1.2.0
    • Fixed problems with merging threads
    • Enhancement to the merge thread screen
  • 1.1.0
    • (Hopefully) resolved all JavaScript issues
    • Merge threads
    • Removed search results moderation ability (it was too much work to maintain and a user could bypass the protection if he knew how the hack operated)
    • Bug with not updating all user fields in post merge
    • Bug with checking for the wrong permissions when deleting a post
    • Template caching
    • Selection boxes only appear when a user is a moderator
  • 1.0.0
    • Fixed search results
    • Added small announcement patch

Fixes For 1.2.1
The following fixes are in in the next version:
On The To-Do List
  • Usergroup permission for inline moderation

If you'd like a moderator action added to this hack, post it below and I'll look into it.

What are the screen shots of?
Don't forget to click install!!!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 12-08-2004, 01:27 PM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec
Terrific,

Just change your instruction in global.php, it should say:

PHP Code:
if (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'forumdisplay')
{
    
$show['inlinemod'] = true;
}
else
{
    
$show['inlinemod'] = false;

you use forumdisplay.php, while the script name is forumdisplay.

Rgds
Thanks sv1ec, I thought I had changed the upgrade XML file, guess not. I'll do so and then rebuild the HTML instructions .

Raven: I guess that's a bug in my ZIP packager then for not removing .DS_Store. I'll get rid of it when I repackage the zip tonight. Glad you like the installer . I love being able to do Apple/Control + A to select all the text, too. It's so much easier .

WebMasterAJ: If you are upgrading, make sure that in global.php the following:

PHP Code:
// #############################################################################
// are we on a script that uses inline moderation
if (THIS_SCRIPT == 'showthread.php' OR THIS_SCRIPT == 'forumdisplay.php')
{
    
$show['inlinemod'] = true;
}
else
{
    
$show['inlinemod'] = false;

Is actually:

PHP Code:
// #############################################################################
// are we on a script that uses inline moderation
if (THIS_SCRIPT == 'showthread' OR THIS_SCRIPT == 'forumdisplay')
{
    
$show['inlinemod'] = true;
}
else
{
    
$show['inlinemod'] = false;

Reply With Quote
  #113  
Old 12-08-2004, 03:18 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think I found one more little thing. In the threadbit template, your instructions (at least for those upgrading from 1.1.0) ask us to enter:

HTML Code:
<if condition="can_moderate($thread['forumid'])">
			<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
		</if>
I think this should be:

HTML Code:
<if condition="(can_moderate($thread['forumid']) AND $show['inlinemod'])">
			<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
		</if>
or else the checkboxes will appear in the search results.

Rgds
Reply With Quote
  #114  
Old 12-08-2004, 03:39 PM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec
I think I found one more little thing. In the threadbit template, your instructions (at least for those upgrading from 1.1.0) ask us to enter:

HTML Code:
<if condition="can_moderate($thread['forumid'])">
			<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
		</if>
I think this should be:

HTML Code:
<if condition="(can_moderate($thread['forumid']) AND $show['inlinemod'])">
			<td class="alt1" align="center"><if condition="$show['threadmoved']">-<else /><input type="checkbox" id="inlinemod_$thread[threadid]" name="inlinemod_$thread[threadid]" value="1" onclick="select_item($thread[threadid], this);" /></if>
		</if>
or else the checkboxes will appear in the search results.

Rgds
Thanks. It was hard to remember what I changed and what I didn't as there's no easy way to diff between templates.
Reply With Quote
  #115  
Old 12-08-2004, 03:43 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rob_daemon
Thanks. It was hard to remember what I changed and what I didn't as there's no easy way to diff between templates.
Don't worry, I know what you mean. And your hack touches 4-5 templates, mine deals with about 20 of them.

Rgds
Reply With Quote
  #116  
Old 12-09-2004, 12:00 AM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, the ZIP should now be all fixed with those two problems with the instructions and the .DS_Store files are now removed .
Reply With Quote
  #117  
Old 12-09-2004, 11:43 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am getting the following error when trying to merge two threads (IDs are: 1791 and 1793)

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 1791 WHERE threadid IN (1793, 1791)
mysql error: Duplicate entry '1-1791' for key 2

mysql error number: 1062

Date: Thursday 09th of December 2004 08:42:23 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245

Any idea?

Rgds
Reply With Quote
  #118  
Old 12-09-2004, 01:40 PM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:

Find from in ./inlinemod.php:

PHP Code:
case 'merge'
To the next 'break;' statement.

Replace all that with:

PHP Code:
case 'merge':
            if (!
can_moderate($threadinfo['forumid'], 'canmanagethreads'))
            {
                
print_no_permission();
            }
            if (!
is_array($vars['threads']) OR count($vars['threads']) < 2)
            {
                eval(
print_standard_error('error_invalidid'));
            }
            
            if (empty(
$_POST['do']))
            {
                
define('PRINT_TPL''inline_merge_thread');
            }
            else
            {
                if (
$_POST['title'])
                {
                    
toss_cookies();
                    
                    
$sqlthreads implode(', '$vars['threads']);
                    
                    
$firstpost $DB_site->query_first("SELECT * FROM " TABLE_PREFIX "post WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");
                    
                    
// sort out poll crap
                    
$threadsortdata $DB_site->query("SELECT * FROM " TABLE_PREFIX "thread WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");
                    
$threadopen 1;
                    
$threadsticky 0;
                    while (
$threadsort $DB_site->fetch_array($threadsortdata))
                    {
                        if (!
$firstthread)
                        {
                            
$firstthread $threadsort['threadid'];
                        }
                        else
                        {
                            
$mergethreads[] = $threadsort['threadid'];
                        }
                        if (
$threadsort['pollid'])
                        {
                            eval(
standard_error('The threads you specified to merge have a poll(s). You can not use inline moderation for this type of merge. Sorry!'));
                        }
                        if (!
$threadsort['visible'] OR $threadsort['isdeleted'])
                        {
                            eval(
standard_error('You can not merge invisible or deleted threads.'));
                        }
                        
                        
// if any thread is sticky or closed, then the new thread is
                        
if ($threadsort['sticky'])
                        {
                            
$threadsticky 1;
                        }
                        if (!
$threadsort['open'])
                        {
                            
$threadopen 0;
                        }
                        
                        
$votenum += $threadsort['votenum'];
                        
$votetotal += $threadsort['votetotal'];
                        
$views += $threadsort['views'];
                        
$rebuildposts[] = $threadsort['firstpostid'];
                    }
                    
                    
$isqlthreads implode(', '$mergethreads);
                    
                    
// post updates...
                    
$DB_site->query("UPDATE " TABLE_PREFIX "post SET threadid = $firstthread WHERE threadid IN ($sqlthreads)");
                    
                    
// set post parentids
                    
$DB_site->query("UPDATE " TABLE_PREFIX "post SET parentid = $firstpost[postid] WHERE threadid = $firstthread AND postid <> $firstpost[postid] AND parentid IN (" implode(', '$rebuildposts) . ")");
                    
                    
// update new thread
                    
$DB_site->query("UPDATE " TABLE_PREFIX "thread SET title = '" addslashes(htmlspecialchars_uni($_POST['title'])) . "', views = $views, open = $threadopen, sticky = $threadsticky, iconid = 0, votenum = $votenum, votetotal = $votetotal WHERE threadid = $firstthread");
                    
                    
// remove old threads
                    
$DB_site->query("DELETE FROM " TABLE_PREFIX "thread WHERE threadid IN ($isqlthreads)");
                    
                    
// thread ratings
                    
$DB_site->query("DELETE FROM " TABLE_PREFIX "threadrate WHERE threadid IN ($isqlthreads)");
                    
                    
// subscriptions
                    
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE threadid IN ($isqlthreads)");
                    
                    
// lots-o-updating
                    
foreach ($rebuildposts AS $postid)
                    {
                        
delete_post_index($postid);
                        
build_post_index($postid$vars['forum']);
                    }
                    
                    
build_thread_counters($firstthread);
                    
build_forum_counters($vars['forum']['forumid']);
                    
                    
$url "showthread.php?$session[sessionurl]t=$firstthread&mod=1";
                    eval(
print_standard_redirect('redirect_mergethread'));
                }
                else
                {
                    eval(
standard_error('You did not specify a title!'));
                }
            }
        break; 
I hope that fixes it. Let me know .
Reply With Quote
  #119  
Old 12-09-2004, 02:17 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rob_daemon
Try this:

Find from in ./inlinemod.php:

PHP Code:
case 'merge'
To the next 'break;' statement.

Replace all that with:

PHP Code:
case 'merge':
            if (!
can_moderate($threadinfo['forumid'], 'canmanagethreads'))
            {
                
print_no_permission();
            }
            if (!
is_array($vars['threads']) OR count($vars['threads']) < 2)
            {
                eval(
print_standard_error('error_invalidid'));
            }
            
            if (empty(
$_POST['do']))
            {
                
define('PRINT_TPL''inline_merge_thread');
            }
            else
            {
                if (
$_POST['title'])
                {
                    
toss_cookies();
                    
                    
$sqlthreads implode(', '$vars['threads']);
                    
                    
$firstpost $DB_site->query_first("SELECT * FROM " TABLE_PREFIX "post WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");
                    
                    
// sort out poll crap
                    
$threadsortdata $DB_site->query("SELECT * FROM " TABLE_PREFIX "thread WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");
                    
$threadopen 1;
                    
$threadsticky 0;
                    while (
$threadsort $DB_site->fetch_array($threadsortdata))
                    {
                        if (!
$firstthread)
                        {
                            
$firstthread $threadsort['threadid'];
                        }
                        else
                        {
                            
$mergethreads[] = $threadsort['threadid'];
                        }
                        if (
$threadsort['pollid'])
                        {
                            eval(
standard_error('The threads you specified to merge have a poll(s). You can not use inline moderation for this type of merge. Sorry!'));
                        }
                        if (!
$threadsort['visible'] OR $threadsort['isdeleted'])
                        {
                            eval(
standard_error('You can not merge invisible or deleted threads.'));
                        }
                        
                        
// if any thread is sticky or closed, then the new thread is
                        
if ($threadsort['sticky'])
                        {
                            
$threadsticky 1;
                        }
                        if (!
$threadsort['open'])
                        {
                            
$threadopen 0;
                        }
                        
                        
$votenum += $threadsort['votenum'];
                        
$votetotal += $threadsort['votetotal'];
                        
$views += $threadsort['views'];
                        
$rebuildposts[] = $threadsort['firstpostid'];
                    }
                    
                    
$isqlthreads implode(', '$mergethreads);
                    
                    
// post updates...
                    
$DB_site->query("UPDATE " TABLE_PREFIX "post SET threadid = $firstthread WHERE threadid IN ($sqlthreads)");
                    
                    
// set post parentids
                    
$DB_site->query("UPDATE " TABLE_PREFIX "post SET parentid = $firstpost[postid] WHERE threadid = $firstthread AND postid <> $firstpost[postid] AND parentid IN (" implode(', '$rebuildposts) . ")");
                    
                    
// update new thread
                    
$DB_site->query("UPDATE " TABLE_PREFIX "thread SET title = '" addslashes(htmlspecialchars_uni($_POST['title'])) . "', views = $views, open = $threadopen, sticky = $threadsticky, iconid = 0, votenum = $votenum, votetotal = $votetotal WHERE threadid = $firstthread");
                    
                    
// remove old threads
                    
$DB_site->query("DELETE FROM " TABLE_PREFIX "thread WHERE threadid IN ($isqlthreads)");
                    
                    
// thread ratings
                    
$DB_site->query("DELETE FROM " TABLE_PREFIX "threadrate WHERE threadid IN ($isqlthreads)");
                    
                    
// subscriptions
                    
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE threadid IN ($isqlthreads)");
                    
                    
// lots-o-updating
                    
foreach ($rebuildposts AS $postid)
                    {
                        
delete_post_index($postid);
                        
build_post_index($postid$vars['forum']);
                    }
                    
                    
build_thread_counters($firstthread);
                    
build_forum_counters($vars['forum']['forumid']);
                    
                    
$url "showthread.php?$session[sessionurl]t=$firstthread&mod=1";
                    eval(
print_standard_redirect('redirect_mergethread'));
                }
                else
                {
                    eval(
standard_error('You did not specify a title!'));
                }
            }
        break; 
I hope that fixes it. Let me know .
Sorry, this time the error message is:

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 1799 WHERE threadid IN (1800)
mysql error: Duplicate entry '1-1799' for key 2

mysql error number: 1062

Date: Thursday 09th of December 2004 11:16:10 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245

rgds
Reply With Quote
  #120  
Old 12-09-2004, 02:43 PM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sv1cec
Sorry, this time the error message is:

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 1799 WHERE threadid IN (1800)
mysql error: Duplicate entry '1-1799' for key 2

mysql error number: 1062

Date: Thursday 09th of December 2004 11:16:10 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245

rgds
Honestly, I have on idea. Try finding:

PHP Code:
                    $DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE threadid IN ($isqlthreads)"); 
Replace it with:

PHP Code:
                    $subs $DB_site->query("SELECT * FROM " TABLE_PREFIX "subscribethread WHERE threadid IN ($isqlthreads)");
                    while (
$sub $DB_site->fetch_array($subs))
                    {
                        
$subthreads[] = $sub['subscribethread'];
                    }
                    
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE subscribethread IN ($subthreads)"); 
Reply With Quote
  #121  
Old 12-09-2004, 02:59 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rob_daemon
Honestly, I have on idea. Try finding:

PHP Code:
                    $DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE threadid IN ($isqlthreads)"); 
Replace it with:

PHP Code:
                    $subs $DB_site->query("SELECT * FROM " TABLE_PREFIX "subscribethread WHERE threadid IN ($isqlthreads)");
                    while (
$sub $DB_site->fetch_array($subs))
                    {
                        
$subthreads[] = $sub['subscribethread'];
                    }
                    
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE subscribethread IN ($subthreads)"); 
Nope!

Database error in vBulletin 3.0.3:

Invalid SQL: UPDATE subscribethread SET threadid = 281 WHERE subscribethread IN (Array)
mysql error: Unknown column 'subscribethread' in 'where clause'

mysql error number: 1054

Date: Thursday 09th of December 2004 11:57:56 AM
Script: http://forum.m1911.org/inlinemod.php
Referer: http://forum.m1911.org/inlinemod.php
Username: John
IP Address: 62.38.176.245
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 04:42 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.04778 seconds
  • Memory Usage 2,479KB
  • Queries Executed 25 (?)
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_html
  • (11)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete