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
mod/admin Hide Reason for Editing Details »»
mod/admin Hide Reason for Editing
Version: 1.00, by teksigns teksigns is offline
Developer Last Online: Jun 2009 Show Printable Version Email this Page

Version: 3.0.1 Rating:
Released: 09-22-2004 Last Update: Never Installs: 3
 
No support by the author.

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.....

Show Your Support

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

Comments
  #2  
Old 09-23-2004, 06:27 PM
???`S?LV?R???`'s Avatar
???`S?LV?R???` ???`S?LV?R???` is offline
 
Join Date: Aug 2003
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice one
Reply With Quote
  #3  
Old 09-24-2004, 02:59 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you please put this in a text file for easier download?
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 10:58 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.03956 seconds
  • Memory Usage 2,215KB
  • Queries Executed 16 (?)
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_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete