IP.Board 2.3: Make Root Admins' Posts Un-editable by Moderators
Started by RuneCore, Nov 22 2007 01:04 AM
7 replies to this topic
#1
Posted 22 November 2007 - 01:04 AM
This is the support topic for the tutorial Make Root Admins' Posts Un-editable by Moderators. Please post here if you have any questions or feedback.
#2
Posted 22 November 2007 - 01:09 AM
I should clarify that all this does is make it so that the edit / delete buttons on a Root Admin's posts do not appear for anyone other than fellow Root Admins. It does not take away the abilities, just the links to them.

http://www.virtualdump.net
--------------
My Mods:
[RC23]Songs in Profiles / Demo
^Winner of the Best Medium Mod of October 2007 award on Invisionize
^Second place in the Semi-Annual Mod Competition
[RC23]Individual Member Adsense
^Winner of the Best Medium Mod of November 2007 award on Invisionize
[RC22]Messenger Icons in Topic View
[RC23]Banned Sig Replacement
More...
#3
Posted 22 November 2007 - 01:12 AM
Nice work RC!
- - - - nsMod Community Forums - - - -
Services System Modification Installation FAQ Invision Modding Store
I DO: IPB UPGRADES, MOD INSTALLS, DATABASE BACKUPS & RESTORATION, CUSTOM SKINS, SITE TRANSFERS
IMPORTANT - READ THIS BEFORE YOU PM ME!!!
Do not ask me for assistance / provide me with your url if you own a nullified board - IM Staff will be notified.
#4
Posted 27 November 2007 - 09:22 PM
RuneCore, on Nov 21 2007, 08:09 PM, said:
I should clarify that all this does is make it so that the edit / delete buttons on a Root Admin's posts do not appear for anyone other than fellow Root Admins. It does not take away the abilities, just the links to them.
Exactly http://www.site.com/[dir]/index.php?act=post&do=edit_post&f=<NUM FORUM>&t=<TOPIC NUMBER>&p=<NUM POST>&st=0 is the PoC...
the only thing you do with this is "hide" the option, but it is still there...
another way to REALLY get this?
#5
Posted 27 November 2007 - 10:48 PM
Calypso posted this on invisionize, but it would still show the buttons. Combined with mine, it should do exactly what you want:
Open: sources/classes/class_post_edit.php
Find:
Open: cache/lang_cache/en/lang_error.php
Find:
Open: sources/classes/class_post_edit.php
Find:
//-----------------------------------------
// Load the old post
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'posts', 'where' => "pid=".intval($this->ipsclass->input['p']) ) );
$this->ipsclass->DB->simple_exec();
$this->orig_post = $this->ipsclass->DB->fetch_row();
if (! $this->orig_post['pid'])
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'missing_files') );
}
Add Below: if ( $this->ipsclass->member['mgroup'] != 4 )
{
$data = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'mgroup',
'from' => 'members',
'where' => 'id='.$this->orig_post['author_id'],
) );
if ( $data['mgroup'] == 4 )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'root_admin') );
}
}
Save & UploadOpen: cache/lang_cache/en/lang_error.php
Find:
); ?>Add Above:
'root_admin' => "You May Not Edit A Root Admin's Post.",Save & Upload.
Edited by RuneCore, 27 November 2007 - 10:48 PM.

http://www.virtualdump.net
--------------
My Mods:
[RC23]Songs in Profiles / Demo
^Winner of the Best Medium Mod of October 2007 award on Invisionize
^Second place in the Semi-Annual Mod Competition
[RC23]Individual Member Adsense
^Winner of the Best Medium Mod of November 2007 award on Invisionize
[RC22]Messenger Icons in Topic View
[RC23]Banned Sig Replacement
More...
#6
Posted 09 December 2007 - 11:39 PM
Great post!
Your solution was the only one which actually worked for me.
Thanks.
Your solution was the only one which actually worked for me.
Thanks.
Edited by riven3d, 09 December 2007 - 11:50 PM.
removed quote
#7
Posted 22 April 2008 - 09:22 AM
Excellent Work
بنحبك يا زمالك وحنفضل نحبك مهما عملت فينا
#8
Posted 10 January 2009 - 01:51 PM
RuneCore, on Nov 28 2007, 12:48 AM, said:
Calypso posted this on invisionize, but it would still show the buttons. Combined with mine, it should do exactly what you want:
Open: sources/classes/class_post_edit.php
Find:
Open: cache/lang_cache/en/lang_error.php
Find:
Open: sources/classes/class_post_edit.php
Find:
//-----------------------------------------
// Load the old post
//-----------------------------------------
$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'posts', 'where' => "pid=".intval($this->ipsclass->input['p']) ) );
$this->ipsclass->DB->simple_exec();
$this->orig_post = $this->ipsclass->DB->fetch_row();
if (! $this->orig_post['pid'])
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'missing_files') );
}
Add Below: if ( $this->ipsclass->member['mgroup'] != 4 )
{
$data = $this->ipsclass->DB->build_and_exec_query( array( 'select' => 'mgroup',
'from' => 'members',
'where' => 'id='.$this->orig_post['author_id'],
) );
if ( $data['mgroup'] == 4 )
{
$this->ipsclass->Error( array( LEVEL => 1, MSG => 'root_admin') );
}
}
Save & UploadOpen: cache/lang_cache/en/lang_error.php
Find:
); ?>Add Above:
'root_admin' => "You May Not Edit A Root Admin's Post.",Save & Upload.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users





Contributor











