Adding 'buddy' icon to the member list

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MarkB
    Senior Member
    • Apr 2001
    • 1253

    Adding 'buddy' icon to the member list

    No idea if this is of interest to most people, and although I've done a search on this it may have been released before now (?), but what the heck - I'm posting it anyway

    This will add the 'buddy' icon to the member list, as demonstrated here:



    Hopefully these instructions are clear enough, as this is my first published mod!


    Backup your memberlist.php file

    - In memberlist.php, right at the top (~ line 4), find:

    PHP Code:
    $templatesused "postbit_useremail,icq,aim,yahoo,postbit_homepage,postbit_sendpm,postbit_profile,memberlistbit,numbernav_pages,numbernav,memberlist,memberlistsearch"
    Add to this postbit_buddy so it looks like this:

    PHP Code:
    $templatesused "postbit_useremail,icq,aim,yahoo,postbit_homepage,postbit_buddy,postbit_sendpm,postbit_profile,memberlistbit,numbernav_pages,numbernav,memberlist,memberlistsearch"
    Scroll down to around line 150, and find the line:

    PHP Code:
    eval("\$userinfo[profile] = \"".gettemplate("postbit_profile")."\";"); 
    Before it, add:

    PHP Code:
    eval("\$userinfo[buddy] = \"".gettemplate("postbit_buddy")."\";"); 
    Save & close memberlist.php, and upload


    Log into your forum control panel, and go to 'edit templates'

    We're editing the templates memberlist and memberlistbit

    Now, I'm assuming we'll be adding a new column to accommodate the buddy icons - if you want to replace one, I'm sure you can figure it out from just seeing the variables used here

    In memberlist, find the line:

    PHP Code:
    <td bgcolor="{ categorybackcolor }" colspan="6"
    Change it to:

    PHP Code:
    <td bgcolor="{ categorybackcolor }" colspan="7"
    (remove the spaces after and before the { } characters)

    (if you're NOT adding a new column, ignore that last step)

    I have my columns in the order of "User Name, Buddy List, Email..." but the order is up to you

    Scroll down in memberlist and find:

    PHP Code:
    <td bgcolor="{ tableheadbgcolor }" align="center"><smallfont color="{ tableheadtextcolor }"><b>User Name</b></smallfont></td
    Right after it add:

    PHP Code:
    <td bgcolor="{ tableheadbgcolor }" align="center"><smallfont color="{ tableheadtextcolor }"><b>Buddy List</b></smallfont></td
    (remove the spaces after and before the { } characters)

    Save changes

    Go to edit memberlistbit

    If you're keeping the same order as me, find:

    PHP Code:
    <td bgcolor="{ firstaltcolor }" align="left"><normalfont><a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userinfo[userid]">$userinfo[username]</a></normalfont></td
    And directly under it add:

    PHP Code:
    <td bgcolor="{ secondaltcolor }">$userinfo[buddy]</td
    (remove the spaces after and before the { } characters)

    Now, you can save the changes and check out your members list to see if the changes are in effect (which they should be!). You'll also probably see that the column colours are out of order.

    To fix this, after the line we just added, change the order of the bgcolor tags until you have them in correct order (ie, firstaltcolor, secondaltcolor, firstaltcolor, secondaltcolor, and so on).

    Save changes.

    Everything should now be working

    Mark
    Last edited by MarkB; Wed 18 Jul '01, 1:55pm.
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...