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
  #212  
Old 03-31-2005, 02:55 PM
sv1cec sv1cec is offline
 
Join Date: May 2004
Location: Athens, Greece
Posts: 2,091
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

As I said before, one thing my mods were asking from this tool, was the ability to copy selected posts to a new thread in a specified forum. Some times, they want to edit a post, but their instructions is always to keep evidence of the original post, for dispute resolution. They usually do that, by making a copy of the thread in a specific forum. But this gets stupid, if you want to edit one post in a 200 posts thread.

So I came up with an addition to this hack, which is similar to split, but doesn't remove the original posts from the original thread, it just creates a new thread with the selected posts, in a selected forum, without touching the originals. In addition, you can select if you want to end up in the new thread's forum, or return to where you were originally (so that you can edit the original post).

For those interested, here is what you need to do, to add this functionality to this hack:

1. Open inlinemod.php and find:

PHP Code:
        // -------------------------------------------------------------------
        
        
default:
            
print_no_permission();
        break;
    }
}

// ###################################################################
// Thread moderation 
Right above that, add:

PHP Code:
        // -------------------------------------------------------------------
        
        
case 'copy':
            if (!
$vars['thread']['visible'] OR !$vars['thread']['visible'])
            {
                eval(
print_standard_error('error_invalidid'));
            }
            if (!
is_array($vars['posts']))
            {
                eval(
print_standard_error('error_nosplitposts'));
            }
            if (!
can_moderate($vars['thread']['forumid'], 'canmanagethreads'))
            {
                
print_no_permission();
            }
            
            
// Make sure that we've specified the split options
            
if (empty($_POST['do']))
            {
                
$curforumid $vars['thread']['forumid'];
                
$moveforumbits construct_move_forums_options();
                
define('PRINT_TPL''inline_copy');
            }
            else
            {
                
                
// Get the scoop on this new forum
                
$vars['newforum'] = verify_id('forum'intval($_POST['newforumid']));
                
$vars['newforuminfo'] = fetch_foruminfo($vars['newforum']);
                if (!
$vars['newforuminfo']['cancontainthreads'] OR $vars['newforuminfo']['link'])
                {
                    eval(
print_standard_error('error_moveillegalforum'));
                }
                
                
// Construct notes
                
$vars['newnotes'] = sprintf('Thread split from threadid %1$s by %2$s on %3$s at %4$s via Moderation Tool.'$vars['threadid'], $bbuserinfo['username'], vbdate($vboptions['dateformat'], TIMENOW), vbdate($vboptions['timeformat'], TIMENOW));
                
$vars['newnotes'] .= ' ' $vars['thread']['notes'];
                
                
// Create the new thread
                
$DB_site->query("
                    INSERT INTO " 
TABLE_PREFIX "thread
                    (
                        title,
                        lastpost,
                        forumid,
                        open,
                        replycount,
                        postusername,
                        postuserid,
                        lastposter,
                        dateline,
                        views,
                        iconid,
                        notes,
                        visible
                    )
                    VALUES
                    (
                        '" 
addslashes(htmlspecialchars_uni($_POST['title'])) . "',
                        " 
intval($vars['thread']['lastpost']) . ",
                        " 
intval($vars['newforum']) . ",
                        " 
intval($vars['thread']['open']) . ",
                        " 
intval($vars['thread']['replycount']) . ",
                        '" 
addslashes($vars['thread']['postusername']) . "',
                        " 
intval($vars['thread']['postuserid']) . ",
                        '" 
addslashes($vars['thread']['lastposter']) . "',
                        " 
intval($vars['thread']['dateline']) . ",
                        0,
                        " 
intval($vars['thread']['iconid']) . ",
                        '" 
addslashes($vars['newnotes']) . "',
                        " 
intval($vars['thread']['visible']) . "
                    )"
                
);
                
$vars['newthreadid'] = $DB_site->insert_id();
                
            foreach(
$vars['posts'] as $postnumber)
            {
                
$posts=$DB_site->query("SELECT * FROM " TABLE_PREFIX "post WHERE postid=$postnumber");
                
$pst=$DB_site->fetch_array($posts);
                
                
                
$DB_site->query("
                INSERT INTO " 
TABLE_PREFIX "post
                (
                    threadid,
                    parentid,
                    username,
                    userid,
                    title,
                    dateline,
                    pagetext,
                    allowsmilie,
                    showsignature,
                    ipaddress,
                    iconid,
                    visible,
                    attach,
                    warn_flag
                )
                VALUES
                (
                    " 
intval($vars[newthreadid]) . ",
                    " 
intval($pst['parentid']) . ",
                    '" 
addslashes($pst['username']) . "',
                    " 
intval($pst['userid']) . ",
                    '" 
addslashes($pst['title']) . "',
                    " 
intval($pst['dateline']) . ",
                    '" 
addslashes($pst['pagetext']) . "',
                    " 
intval($pst['allowsmilie']) . ",
                    " 
intval($pst['showsignature']) . ",
                    '" 
addslashes($pst['ipaddress']) . "',
                    " 
intval($pst['iconid']) . ",
                    " 
intval($pst['visible']) . ",
                    " 
intval($pst['attach']) . ",
                    " 
intval($pst['warn_flag']) . "
                )"
            
);
             }

                
                
// Update counters
                // #*# things like rebuild search index can go here (maybe, depeneds on MySQL fulltext imp), post count problems from switching post-counted to not (vv) forum(?)
                
build_thread_counters($vars['threadid']);
                
build_thread_counters($vars['newthreadid']);
                
build_forum_counters($vars['thread']['forumid']);
                if (
$vars['thread']['forumid'] != $vars['newforum'])
                {
                    
build_forum_counters($vars['newforum']);
                }
                
                
log_moderator_action($vars['thread'], sprintf('thread copied to %1$s (inline copy)'$vars['newthreadid']));
                
                
// Done! w00t!
                
toss_cookies();
                if (
$_POST['destination']=='old')
                {
                    
$url "showthread.php?$session[sessionurl]t=$vars[threadid]&mod=1";

                }
                else
                {
                    
$url "showthread.php?$session[sessionurl]t=$vars[newthreadid]&mod=1";
                }
                eval(
print_standard_redirect('redirect_copyposts'));
            }
        break; 
Then create a new template called inline_copy, which shall contain the followings:

HTML Code:
<form action="inlinemod.php" method="post" name="vbform">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="doproces" />
<input type="hidden" name="type" value="post" />
<input type="hidden" name="inlinemodact" value="copy" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat">$vbphrase[copy_thread]</td>
</tr>
<!--
<tr>
	<td class="thead">$vbphrase[title]: <span style="font-weight:normal">{$vars['thread']['title']}</span></td>
</tr>
-->
<tr>
	<td class="panelsurround" align="center">
	<div class="panel">
		<div style="width:$stylevar[formwidth]" align="$stylevar[left]">
			
			<fieldset class="fieldset">
				<legend>Specify new copy thread details</legend>
				<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
				<tr>
					<td>The selected post(s) will be copied into a new thread in the forum you will specify.<br>You may select the new thread title and in which forum it will be created.<p>
						New thread $vbphrase[title]  (old thread title shown):<br />
						<input type="text" class="bginput" name="title" size="50" value="{$vars['thread']['title']}"/>
					</td>
				</tr>
				<tr>
					<td>
						New thread $vbphrase[forum]:<br />
						<select name="newforumid">$moveforumbits</select>
					</td>
				</tr>
				<tr>
					<td>
						Where you want to go after the copy:<br />
<select name="destination"><option value="old">Where I was before</option><option value="new">Where the new thread will be created</option></select>
					</td>
				</tr>
				</table>
			</fieldset>
		
		</div>
	</div>
	
	<div style="margin-top:$stylevar[cellpadding]px">
		<input type="submit" class="button" value="$vbphrase[copy_thread]" accesskey="s" />
		<input type="reset" class="button" value="$vbphrase[reset_fields]" accesskey="r" />
		<input type="button" class="button" value="$vbphrase[cancel]" accesskey="c" onclick="history.back(1)" />
	</div>
	</td>
</tr>
</table>

</form>

Then open your SHOWTHREAD template and find:

HTML Code:
<select name="inlinemodact">
					<option value="merge" selected="selected">Merge Posts</option>
					<option value="delete">Soft Delete Posts</option>
					<option value="split">Split Posts</option>
Right below that, add :

HTML Code:
<option value="copy">Copy Posts</option>
Finally add a phrase:

Type : Front-end redirect messages
Name: copyposts
Contents: The selected posts have been copied to a new thread, in the forum you specified.

You may want to run this query, to change an existing phrase, so that it can be used in copying as well as in splitting:

update phrase set text='You must specify some posts to split/copy from this thread.' where varname='nosplitposts'


I think this is it, I hope I am not forgetting anything.
Reply With Quote
  #213  
Old 04-04-2005, 05:00 PM
YLP1 YLP1 is offline
 
Join Date: Aug 2004
Posts: 417
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
You may want to run this query, to change an existing phrase, so that it can be used in copying as well as in splitting:

update phrase set text='You must specify some posts to split/copy from this thread.' where varname='nosplitposts'

I'm confused with this part of this code. How do I do this?

Thanks in advance.
Reply With Quote
  #214  
Old 04-04-2005, 09:12 PM
Delphiprogrammi Delphiprogrammi is offline
 
Join Date: Feb 2004
Location: Landen(Belgium)
Posts: 1,335
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by YLP1
I'm confused with this part of this code. How do I do this?

Thanks in advance.
that's a database query phpMyAdmin will help you ...

Code:
UPDATE  phrase SET text='You must specify some posts to split/copy from this thread.' WHERE varname='nosplitposts'
Reply With Quote
  #215  
Old 04-05-2005, 10:32 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Heya,

My body onload tag was allready modified by the image resize hack.
Currently I changed it to:

<body onload="<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">inline_init($thread[threadid], 'post');</if>$onload ; fiImageResize()">

but this is not working, any idea's what I need to change here??

previously it was:

<body onload="$onload; fiImageResize()">
Reply With Quote
  #216  
Old 04-07-2005, 02:58 AM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:

HTML Code:
<body onload="<if condition="can_moderate($thread['forumid']) AND $show['inlinemod']">inline_init($thread[threadid], 'post');</if> fiImageResize(); $onload">
Reply With Quote
  #217  
Old 04-07-2005, 03:05 AM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just an update on things:

I'm working on abstracting a lot of the functions to make it easier to keep things organized and working right. This weekend I'm going to be swamped with work, so I probably won't get anything done. Next weekend I have to finish off a few of my own coding projects. Then in three weeks, I should have time to put the final touches on it. My goal is to have it out by the end of the month.
Reply With Quote
  #218  
Old 04-10-2005, 12:28 AM
MentaL's Avatar
MentaL MentaL is offline
 
Join Date: Jan 2003
Posts: 550
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi, my mods say they get a no permission error when using this.. any idea?
Reply With Quote
  #219  
Old 04-10-2005, 10:58 PM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do they have JavaScript enabled? When they click the "Go" button does it have a number in parenthesis or not? What browsers are they using?
Reply With Quote
  #220  
Old 04-11-2005, 12:16 AM
MentaL's Avatar
MentaL MentaL is offline
 
Join Date: Jan 2003
Posts: 550
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

they areable to use it but they get permission denied error.. like as if they where not allowed to use script.. IE (Not mods..)
Reply With Quote
  #221  
Old 04-12-2005, 05:34 AM
rob_daemon's Avatar
rob_daemon rob_daemon is offline
 
Join Date: Sep 2003
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When they're using the tool, at the bottom of the page there's a "Go" button; when they click it is there a number in parenthesis or not?
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 03:49 PM.


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.08008 seconds
  • Memory Usage 2,418KB
  • 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
  • (1)bbcode_code
  • (4)bbcode_html
  • (2)bbcode_php
  • (2)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
  • (1)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