Sign in to follow this  
Followers 0

Restrict viewing display name history


Description

A quick skin edit to hide display history from all apart from Global Moderators and Administrators.
Here's a quick article on how to restrict viewing of a members display name history to just global moderators and administrators.

We just need to perform a small skin edit.

ACP > Look / Feel > Skin Manager > (choose skin) > Manage Templates / CSS > Profiles > dnameWrapper

Find...
[code] <if test="hasDnameHistory:|:is_array($records) AND count($records)">
{parse striping="dname" classes="row1,row2"}
<foreach loop="records:$records as $row">
<tr class='{parse striping="dname"}'>
<td>{$row['dname_previous']}</td>
<td><strong>{$row['dname_current']}</strong></td>
<td class='altrow'>{parse date="$row['dname_date']" format="short"}</td>
</tr>
</foreach>
<else />
<tr>
<td colspan='3' class='no_messages'>{$this->lang->words['dname_no_history']}</td>
</tr>
</if>[/code]

Replace with...
[code] <if test="hasDnameHistory:|:is_array($records) AND count($records)">
<if test="$this->memberData['g_is_supmod'] == 1">
{parse striping="dname" classes="row1,row2"}
<foreach loop="records:$records as $row">
<tr class='{parse striping="dname"}'>
<td>{$row['dname_previous']}</td>
<td><strong>{$row['dname_current']}</strong></td>
<td class='altrow'>{parse date="$row['dname_date']" format="short"}</td>
</tr>
</foreach>
<else />
<tr>
<td colspan='3' class='no_messages'><div align='center'>Access Denied</div></td>
</tr>
</if></if>[/code]

Save the change. :)


Here is how it looks (quite normal) for a global mod or administrator both normally and after applying the skin edit:

[IMG]http://img.photobucket.com/albums/v294/yellow_spider/ipb_tutorials/dname_restrict_1.png[/IMG]


Here is how it looks for a member attempting to view a display name history:

[IMG]http://img.photobucket.com/albums/v294/yellow_spider/ipb_tutorials/dname_restrict_2.png[/IMG]



0 Comments

There are no comments to display.