Mark members with warn
Sometimes we want to show on main page marked members which have a warn. This article shows how to do this.

Open: admin/applications/forums/modules_public/forums/boards.php
Find:
//-----------------------------------------
// Member?
//-----------------------------------------
else
{
if ( empty( $cached[ $result['member_id'] ] ) )
{
$cached[ $result['member_id'] ] = 1;$result['member_name'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] );
if ( $result['login_type'] )
{
if ( $this->memberData['g_access_cp'] and ($this->settings['disable_admin_anon'] != 1) )
{
$active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl( "showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser' ) . "' title='$last_date'>{$result['member_name']}</a>*";
$active['ANON']++;
}
else
{
$active['ANON']++;
}
}
else
{
$active['MEMBERS']++;
$active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl( "showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser' ) ."' title='$last_date'>{$result['member_name']}</a>";
}
}
}
Replace to:
//-----------------------------------------
// Member?
//-----------------------------------------
else
{
if ( empty( $cached[ $result['member_id'] ] ) )
{
$cached[ $result['member_id'] ] = 1;$result['member_name'] = IPSLib::makeNameFormatted( $result['member_name'], $result['member_group'] );
$memberDetails = IPSMember::buildDisplayData( $result['member_id'] );
if(!is_null($memberDetails['warn_level']) && $memberDetails['warn_level'] > 0)
{
$result['member_name'] = $this->registry->getClass('output')->getReplacement('warn_info').$result['member_name'];
}
if ( $result['login_type'] )
{
if ( $this->memberData['g_access_cp'] and ($this->settings['disable_admin_anon'] != 1) )
{
$active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl( "showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser' ) . "' title='$last_date'>{$result['member_name']}</a>*";
$active['ANON']++;
}
else
{
$active['ANON']++;
}
}
else
{
$active['MEMBERS']++;
$active['NAMES'][] = "<a href='" . $this->registry->getClass('output')->buildSEOUrl( "showuser={$result['member_id']}", 'public', $result['seo_name'], 'showuser' ) ."' title='$last_date'>{$result['member_name']}</a>";
}
}
}
Save and upload file
Now log into ACP and go to Look & Feel tab. For the skin choose from menu
Manage Replacements. Next click to Add New Replacement and complete the form following:
Replacement Key warn_info
Replacement Content
<img src="{style_image_url}/warn_info.gif" /> at the end upload file warn_info.gif to /public/style_images/x/ where X is skin folder.
Article category: IP.Board


Facebook
Google+
Twitter
Digg
Blip
