Jump to content


Welcome to DevFuse Forums


Sign In  Log in with Facebook

Create Account
Welcome to DevFuse Forums, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information for you to signup. Be apart of DevFuse Forums by signing in or creating an account.
  • Start new topics and reply to others
  • Subscribe to topics and forums to get email updates
  • Get your own profile page and make new friends
  • Send personal messages to other members.
 
Guest Message by DevFuse

Tutorial info Visit support topic

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


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.5.1 © 2016, by Michael McCune