forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: EllieG on August 05, 2010, 02:19:54 am

Title: How to remove elements on memberlist page
Post by: EllieG on August 05, 2010, 02:19:54 am
Hello,

Can you inform me as to how I can remove certain elements on the memberlist page, (such as space/quota, status, etc)  but obviously leave intact for admin?
Thank you

http://www.coffee-mates.co.uk
Title: Re: How to remove elements on memberlist page
Post by: EllieG on August 05, 2010, 06:48:19 pm
Have solved it now. (Only in the registered user's view, admin is not affected).
For those that are interested, this is what I did:
Performed a backup first.
Then,
In usemgr.php find

Code: [Select]
EOT;
    }
    else {
     echo <<< EOT

        <tr>
                <td class="tableh1" colspan="2">
                    <span class="statlink">{$lang_usermgr_php['name']}</span>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=name_a"><img src="images/ascending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['name_a']}" /></a>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=name_d"><img src="images/descending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['name_d']}" /></a>
                </td>
                <td class="tableh1" align="center">
                    <span class="statlink">{$lang_usermgr_php['status']}</span>
                </td>
                <td class="tableh1"><span class="statlink">{$lang_usermgr_php['group']}</span>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=group_a"><img src="images/ascending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['group_a']}" /></a>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=group_d"><img src="images/descending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['group_d']}" /></a>
                </td>
                <td class="tableh1">
                    <span class="statlink">{$lang_usermgr_php['registered_on']}</span>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=reg_a"><img src="images/ascending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['reg_a']}" /></a>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=reg_d"><img src="images/descending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['reg_d']}" /></a>
                </td>
                <td class="tableh1">
                    <span class="statlink">{$lang_usermgr_php['last_visit']}</span>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=lv_a"><img src="images/ascending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['lv_a']}" /></a>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=lv_d"><img src="images/descending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['lv_d']}" /></a>
                </td>
                <td class="tableh1" align="center">
                    <span class="statlink">{$lang_usermgr_php['comments']}</span>
                </td>
                <td class="tableh1" align="center">
                    <span class="statlink">{$lang_usermgr_php['pictures']}</span>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=pic_a"><img src="images/ascending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['pic_a']}" /></a>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=pic_d"><img src="images/descending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['pic_d']}" /></a>
                </td>
                <td class="tableh1" align="center">
                    <span class="statlink">{$lang_usermgr_php['disk_space_used']}/{$lang_usermgr_php['disk_space_quota']}</span>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=disku_a"><img src="images/ascending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['disku_a']}" /></a>
                    <a href="{$CPG_PHP_SELF}?page=$page&amp;sort=disku_d"><img src="images/descending.png" width="9" height="9" border="0" alt="" title="{$lang_usermgr_php['disku_d']}" /></a>
                </td>
        </tr>
EOT;

and take out the sections you do not want (sections within each <td></td>)
This will remove the headings: Name, Status, Group etc.


Then to remove the data, (number of comments, number files uploaded, space used/quota, etc)
Find:



Code: [Select]
EOT;
        } else {
                  echo <<< EOT
        <tr>
                <td class="{$row_style_class}">{$user['user_name']}</td>
                <td class="{$row_style_class}">{$view_profile}{$last_uploads}{$user_comment_link}</td>
                <td class="{$row_style_class}">{$user['status']}{$ban_memberlist}</td>
                <td class="{$row_style_class}">{$user['group_name']}</td>
                <td class="{$row_style_class}">{$user['user_regdate']}</td>
                <td class="{$row_style_class}">{$user['user_lastvisit']}</td>
                <td class="{$row_style_class}" align="right">{$user['comment_num']}</td>
                <td class="{$row_style_class}" align="right">{$user['pic_count']}</td>
                <td class="{$row_style_class}" align="center">{$disk_usage_output}</td>
        </tr>

EOT;
and remove elements within <td></td> as you see fit...would relate to what you removed in the very first section here.

Then to remove the 'Totals' that run along the bottom, find:

Code: [Select]
EOT;
    } else {
        echo <<< EOT
        <tr>
            <td colspan="$number_of_columns_minus_three" class="tablef" align="left" valign="middle">
                {$lang_usermgr_php['total']}
            </td>
            <td class="tablef" align="right" valign="middle">
                $totalCommentCount_fmt
            </td>
            <td class="tablef" align="right" valign="middle">
                $totalPictureCount_fmt
            </td>
            <td class="tablef" align="right" valign="middle">
                {$totalSpaceCount_fmt}
            </td>
        </tr>
EOT;
    }

and again edit/remove as you see fit.
Remember to backup first because I would imagine this may cause problems with upgrading.

I've done this so that members/registered users don't see all that admin sees when viewing the member list.
Hope this all makes sense.


[edit] added code tags
Title: Re: How to remove elements on memberlist page
Post by: WillyWonderDog on August 28, 2014, 12:34:22 pm
file to edit is usermgr.php, not usemgr.php (assumed typo)