Back to vBulletin 3.0 Add-Ons

mod/admin Hide Reason for Editing
Mod Version: 1.00, by teksigns

This modification is in the archives.
vB Version: 3.0.1 Rating: (0 vote - 0 average) Installs: 3
Released: 23 Sep 2004 Last Update: Never Downloads: 4
Not Supported  

ok i made a hack myself for this and it seems to work ok ....

all this does is make a option available to mods , and administrators
to be able to hide the reason for editing from everyone except
the mods and administrators .

mod is provided as-is to anyone that wants it .....

run this query :

Code:
ALTER TABLE `editlog` ADD `reason_hide` INT(1) DEFAULT '0' NOT NULL;


///////////////////////////////////

in template "postbit"

find:

Code:
<if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if>

replace with :

Code:
<if condition="(($post['edit_reason'] AND $post['reason_hide'] != 1) OR (($post['edit_reason']) AND (in_array($bbuserinfo[usergroupid], array (7,6,5)))))"><b>$vbphrase[reason]: $post[edit_reason]</b></if>


////////////////////////////////////

in template "editpost"

find :

Code:
<div><input type="text" class="bginput" name="reason" value="$newpost[reason]" size="50" maxlength="200" tabindex="1" title="$vbphrase[optional]" /><input type="hidden" name="reason_exists" value="$edit[reason_exists]" /></div>
		</div>


add after :

Code:
<if condition="(in_array($bbuserinfo[usergroupid], array (7,6,5)))">
<div>Hide Reason From Everyone Except Moderators and Administrators ? <input type="checkbox" name="reason_hide" value="1"></div></if>
///////////////////////////////////

in file : "editpost.php"

find :

Code:
	$edit['reason'] = htmlspecialchars_uni(fetch_censored_text(trim($_POST['reason'])));

add after:

Code:
	$edit['reason_hide'] = intval($_POST['reason_hide']);
------------------------------------

find:

Code:
			$DB_site->query("
				REPLACE INTO " . TABLE_PREFIX . "editlog (postid, userid, username, dateline, reason)
				VALUES ($postid, $bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', " . TIMENOW . ", '" . addslashes($edit['reason']) . "')
			");


change to :

Code:
			$DB_site->query("
				REPLACE INTO " . TABLE_PREFIX . "editlog (postid, userid, username, dateline, reason, reason_hide)
				VALUES ($postid, $bbuserinfo[userid], '" . addslashes($bbuserinfo['username']) . "', " . TIMENOW . ", '" . addslashes($edit['reason']) . "', '" . addslashes($edit['reason_hide']) . "')
			");


/////////////////////////////////////

in "shothread.php"

find :

Code:
editlog.reason AS edit_reason,

replace all with :

Code:
editlog.reason AS edit_reason, editlog.reason_hide AS reason_hide,

/////////////////////////////////////

thats it !

now you can hide the reason from all except : moderators - supermods - and admins.

i hope this helps someone else.....

Download

This modification is archived and cannot be downloaded.

Similar Mods

Hide Empty Banned Reason vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024