IPB 1.3.1: Make warnings public
By default, users can only see their own reasons for being warned. If you would like users to see each other’s warnings (say for example, if you were using the warn system as an awards system instead), there are just two small edits that you need to make.
IPB Version: 1.3.1 Final
Difficulty: Easy
Affected Files
/sources/Topics.php
/sources/misc/warn.php
1. OPEN /sources/Topics.php
FIND:
[sourcecode language="php"]
//————————————————————–
// Warny porny?
//————————————————————–
if ( $ibforums->vars['warn_on'] and ( ! stristr( $ibforums->vars['warn_protected'], ‘,’.$member['mgroup'].’,’ ) ) )
{
if (
( $ibforums->member['is_mod'] AND $ibforums->member['allow_warn'] )
or ( $ibforums->member['g_is_supmod'] == 1 )
or ( $ibforums->vars['warn_show_own'] and ( $ibforums->member['id'] == $member['id'] ) )
)
{
// Work out which image to show.[/sourcecode]
REPLACE WITH:
[sourcecode language="php"]
//————————————————————–
// Warny porny?
//————————————————————–
if ( $ibforums->vars['warn_on'] and ( ! stristr( $ibforums->vars['warn_protected'], ‘,’.$member['mgroup'].’,’ ) ) )
{
if (
( $ibforums->member['is_mod'] AND $ibforums->member['allow_warn'] )
or ( $ibforums->member['g_is_supmod'] == 1 )
or ( $ibforums->vars['warn_show_own'] )
)
{
// Work out which image to show.[/sourcecode]
2. OPEN /sources/misc/warn.php
FIND:
[sourcecode language="php"]
if ($pass == 0)
{
$std->Error( array( LEVEL => 1, MSG => ‘no_permission’) );
}
[/sourcecode]
REPLACE WITH:
[sourcecode language="php"]
/* if ($pass == 0)
{
$std->Error( array( LEVEL => 1, MSG => ‘no_permission’) );
}
*/
[/sourcecode]
SAVE & UPLOAD






