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
  #122  
Old 12-09-2004, 03:07 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
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
Replace

PHP Code:
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE subscribethread IN ($subthreads)"); 
With:

PHP Code:
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" implode(', '$subthreads) . ")"); 
And if that doesn't work, then just change:

PHP Code:
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" implode(', '$subthreads) . ")"); 
To:

PHP Code:
// $DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" . implode(', ', $subthreads) . ")"); 
Reply With Quote
  #123  
Old 12-09-2004, 04:41 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
Replace

PHP Code:
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE subscribethread IN ($subthreads)"); 
With:

PHP Code:
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" implode(', '$subthreads) . ")"); 
And if that doesn't work, then just change:

PHP Code:
$DB_site->query("UPDATE " TABLE_PREFIX "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" implode(', '$subthreads) . ")"); 
To:

PHP Code:
// $DB_site->query("UPDATE " . TABLE_PREFIX . "subscribethread SET threadid = $firstthread WHERE subscribethread IN (" . implode(', ', $subthreads) . ")"); 
Can you please check your code in inlinemod.php? for example:

PHP Code:
case 'move':
            if (!
can_moderate($threadinfo['forumid'], 'canmanagethreads')) 
PHP Code:
case 'open':
            if (!
can_moderate($vars['forumid'], 'canopenclose')) 
In the first case, you check for $threadinfo['forumid'] and in the second you check for vars['forumid']. I think the second is the correct, but should it be replaced in all thread-related cases?
Reply With Quote
  #124  
Old 12-09-2004, 05:20 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, here is the code I came up with, it is mostly based on the postings.php code, with some mods to make it suitable for more than two threads.

PHP Code:
        case 'merge':

            if (!
can_moderate($vars['forumid'], 'canmanagethreads'))
            {
                
print_no_permission();
            }
            if (!
is_array($vars['threads']))
            {
                eval(
print_standard_error('error_invalidid'));
            }
            if (empty(
$_POST['do']))
            {
                
define('PRINT_TPL''inline_merge_thread');
            }
            else
            {
            
toss_cookies();
                    
            
$sqlthreads implode(', '$vars['threads']);
            
            
$firstpost $DB_site->query_first("SELECT * FROM " TABLE_PREFIX "post WHERE threadid IN ($sqlthreads) ORDER BY dateline ASC");
            
$notes=$firstpost['notes'];
            
$thrd_firstpost=$firstpost['postid'];
            
$oldtitle=$firstpost['title'];
            
$notes=$firstpost['notes'];
            
$title=$_POST['title'];
            
$threadid=$firstpost['threadid'];
            
$newnotes sprintf('Thread merged from other threads by %1$s on %2$s at %3$s via Moderation Tool.'$bbuserinfo['username'], vbdate($vboptions['dateformat'], TIMENOW), vbdate($vboptions['timeformat'], TIMENOW));
            
$newnotes .= $notes;

            if (
$title=='')
            {
                
$title=$oldtitle;
            }

            foreach (
$vars['threads'] AS $mergethreadid)
            {
                if (
$mergethreadid!=$threadid)
                {
                    
$mergethreadid verify_id('thread'$mergethreadid);
                    
$mergethreadinfo fetch_threadinfo($mergethreadid);
                    
$mergeforuminfo fetch_foruminfo($mergethreadinfo['forumid']);
                
                    if (!
$mergethreadinfo['visible'] OR $mergethreadinfo['isdeleted'] OR $mergethreadid == $threadid)
                    {
                        eval(
print_standard_error('error_invalidid'));
                    }
                
                    
// check forum permissions for the merge forum
                    
$mergeforumperms fetch_permissions($mergethreadinfo['forumid']);
                    if (!(
$mergeforumperms CANVIEW) OR !can_moderate($mergethreadinfo['forumid'], 'canmanagethreads'))
                    {
                        
print_no_permission();
                    }
                
                    
// check if there is a forum password and if so, ensure the user has it set
                    
verify_forum_password($mergeforuminfo['forumid'], $mergeforuminfo['password']);
                    
$mrgthrd_firstpost $DB_site->query_first("
                        SELECT postid
                        FROM " 
TABLE_PREFIX "post
                        WHERE threadid = 
$mergethreadinfo[threadid]
                        ORDER BY dateline ASC
                    "
);
                
                    
// sort out polls
                    
$pollcode '';
                    if (
$mergethreadinfo['pollid'] != 0)
                    { 
// merge thread has poll ...
                        
if ($threadinfo['pollid'] == 0)
                        { 
// ... and original thread doesn't
                            
$pollcode ',pollid = ' $mergethreadinfo['pollid'];
                        }
                        else
                        { 
// ... and original does
                            // if the poll isn't found anywhere else, delete the merge thread's poll
                            
if (!$poll $DB_site->query_first("
                                SELECT threadid
                                FROM " 
TABLE_PREFIX "thread
                                WHERE pollid = 
$mergethreadinfo[pollid] AND
                                    threadid <> 
$mergethreadinfo[threadid]
                                "
))
                            {
                                
$DB_site->query("DELETE FROM " TABLE_PREFIX "poll WHERE pollid = $mergethreadinfo[pollid]");
                                
$DB_site->query("DELETE FROM " TABLE_PREFIX "pollvote WHERE pollid = $mergethreadinfo[pollid]");
                            }
                        }
                    }
                
                    
// move posts
                    
$DB_site->query("UPDATE " TABLE_PREFIX "post SET threadid = $threadid WHERE threadid = $mergethreadid");
                    
$DB_site->query("UPDATE " TABLE_PREFIX "post SET parentid = $thrd_firstpost[postid] WHERE postid = $mrgthrd_firstpost[postid]"); // make merge thread child of first post in other thread
                    
$DB_site->query("UPDATE " TABLE_PREFIX "thread SET title = '" addslashes(htmlspecialchars_uni($title)) . "'$pollcode WHERE threadid = $threadid");
                    
$DB_site->query("DELETE FROM " TABLE_PREFIX "thread WHERE threadid = $mergethreadid");
                    
$DB_site->query("UPDATE " TABLE_PREFIX "thread SET pollid = $threadid WHERE open = 10 AND pollid = $mergethreadid"); // update redirects
                    
$DB_site->query("DELETE FROM " TABLE_PREFIX "threadrate WHERE threadid = $mergethreadid");
                    
$DB_site->query("DELETE FROM " TABLE_PREFIX "subscribethread WHERE threadid = $mergethreadid");
                
                    
// update postindex for the 2 posts who's titles may have changed (first post of each thread)
                    
delete_post_index($thrd_firstpost['postid']);
                    
delete_post_index($mrgthrd_firstpost['postid']);
                    
build_post_index($thrd_firstpost['postid'] , $foruminfo);
                    
build_post_index($mrgthrd_firstpost['postid'] , $foruminfo);
                
                    
build_thread_counters($threadid);
                    
build_forum_counters($threadinfo['forumid']);
                    if (
$mergethreadinfo['forumid'] != $threadinfo['forumid'])
                    {
                        
build_forum_counters($mergethreadinfo['forumid']);
                    }
                }
            }
            if (
$vars['forumid'])
            {
                
$url "forumdisplay.php?$session[sessionurl]f=$vars[forumid]&mod=1";
                eval(
print_standard_redirect('redirect_mergethread'));
            }
        }
        break; 
It works for me!

I just do not know what toss_cookies does!

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

Tell me if the attached file fixes the bug, it should. If it does I'll release 1.2.1. By the way, the code you posted doesn't handle polls in two or more threads elegantly (which is why I chose to throw an error in this event), it doesn't update the parentid for all the merged threads, and other things for more than two threads. If you just merge two, it should work, but otherwise there will be a problem.

By the way, toss_cookies() is the first of two methods to remove the inline moderation cookies after an action.
Reply With Quote
  #126  
Old 12-10-2004, 05:23 AM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by rob_daemon
Tell me if the attached file fixes the bug, it should. If it does I'll release 1.2.1. By the way, the code you posted doesn't handle polls in two or more threads elegantly (which is why I chose to throw an error in this event), it doesn't update the parentid for all the merged threads, and other things for more than two threads. If you just merge two, it should work, but otherwise there will be a problem.

By the way, toss_cookies() is the first of two methods to remove the inline moderation cookies after an action.
Rob_daemon,

Yes, this file works fine. May I humbly suggest two improvements before you release next version? First, I would like to see a note attached at the merged thread saying "This thread was created by merging other threads, by ...., on ...., at ..... . I'll add that myself if you don't, but I think it is a worthwhile addition.

Second, you do not have to be so restrictive with the title of the new thread. What I would suggest is, to show the mod the title of the first thread you are merging, and allow him to change it, if he so wants. If he doesn't, then you can use the original, first thread title, as the title for the new merged thread.

Finally, since merging two threads can result in a new thread, whose placement needs to be changed (moved to a different forum), why don't you add the forum selection in the template form, and if the user selects a different forum, from the one in which the initial threads were, then move the new, merged thread to the new forum. In that way, the mod does not have to do a merge and then do a move.

Just a couple of thoughts.

One more thing I just found out, although I am not sure if you can do something about it. I have installed another hack, which shows me which members have seen a thread. It looks as if after the merging, that information is lost, since in the merged thread, it only shows me, as having seen it. I think it should show all members who have seen all merged threads. A pain? Yeah, I guess you are right. I'll see if I can do something about this.

By the way, this is one of the most useful hacks I've seen, thank you Sir.

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

Glad that finally fixed .

I do plan to add logging to all of the inline actions; I do it for a few right now, but I want to add it in for all as well as cleaning up the entire system.

Also in 1.2.1 there will be a small change to the inline_merge_thread template that will set the default title.

Adding a move thread in the merge screen could be a possibility. I'll see about adding that in either 1.2.1 or the next version.

As far as that hack, wherever the hack is storing read information, the table probably needs to be updated to change all the old threadid's to the new ones.
Reply With Quote
  #128  
Old 12-10-2004, 04:37 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
Glad that finally fixed .

I do plan to add logging to all of the inline actions; I do it for a few right now, but I want to add it in for all as well as cleaning up the entire system.

Also in 1.2.1 there will be a small change to the inline_merge_thread template that will set the default title.

Adding a move thread in the merge screen could be a possibility. I'll see about adding that in either 1.2.1 or the next version.

As far as that hack, wherever the hack is storing read information, the table probably needs to be updated to change all the old threadid's to the new ones.
I have changed the merge_thread template and the code, to do a merging and a move. I also edit it so that it shows the user the title of the first thread, and if he doesn't change it, the merged thread uses that title instead. If you want, I can send you my code.

I also added the remove thread functionality, to show up in the menu only for admins. Admitedly it's a risk, but it's quite useful for cleaning up the forums sometimes.

Rgds
----------
John
Reply With Quote
  #129  
Old 12-11-2004, 02:41 PM
dndog dndog is offline
 
Join Date: Apr 2004
Posts: 134
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't understand, but the inline moderation tools work horridly at my site.

They often deny users with permission the ability to use them. The users are in the registered user group, but they have moderator abilities.

In IE, they cause a "script error, debug" message which pops up on each page where they are.

I am currently using vB3.0.1.

Any fix I can do for this?
Reply With Quote
  #130  
Old 12-11-2004, 06:21 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 dndog
I don't understand, but the inline moderation tools work horridly at my site.

They often deny users with permission the ability to use them. The users are in the registered user group, but they have moderator abilities.

In IE, they cause a "script error, debug" message which pops up on each page where they are.

I am currently using vB3.0.1.

Any fix I can do for this?
What version of the inline moderation tools are you using? If you're not using at least 1.2.0 you should upgrade which will fix all of the javascript errors and other problems.
Reply With Quote
  #131  
Old 12-11-2004, 08:12 PM
WebMasterAJ WebMasterAJ is offline
 
Join Date: Oct 2001
Posts: 104
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for that first fix... but I have some good news and some bad news.

It now displays the drop down menu for my, however, there are no check boxes in the forum display and posts. It just displays a black cell in the forum display...

Any ideas?

Thanks again for your time and energy!

Sincerely,
Andrew Tatum
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 11:32 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.05234 seconds
  • Memory Usage 2,421KB
  • 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
  • (11)bbcode_php
  • (5)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