Jump to content

  • twitter
  • youtube
  • googleplus
  • facebook
  • rss
  • newsletter


Tutorial info Visit support topic

  • Added on: Mar 28 2011 06:09 AM
  • Views: 759
 


Restrict viewing display name history

A quick skin edit to hide display history from all apart from Global Moderators and Administrators.

Posted by AndyF on Mar 28 2011 06:09 AM
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...
		<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>

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

Save the change. :)


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

Posted Image


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

Posted Image

Powered by Tutorials 1.4.1 © 2012, by Michael McCune