Ðăng Nhập

View Full Version : BT - Displays avatars memberinfo+blogs recent visitors



admin
10-07-2010, 04:37 PM
BT - Displays Avatars Memberinfo Recent Visitors



BlackThorn Coding...


Descriptions:
This add-on displays recent profile visitors in memberinfo profile pages. This is the continuation of the Add-on, that I've puplished here (http://www.vbulletin.org/forum/showthread.php?t=241194). All bugs and problems have been fixed. Both DB, and customavatars work, and you can install them easily, by following the necessary steps. Please mark as installed, if you love and use this add-on.

Step 1:
Open memberinfo_visitorbit template and all codes replace with:

<div class="blocksubhead" width="100%" align="left">
<img class="inlineimg" src="{vb:raw user.avatarurl}" height="30px" width="30px" border="0" /> <a href="{vb:link member,{vb:raw user}}">{vb:raw user.musername}</a>
{vb:raw user.invisiblemark}{vb:raw user.buddymark}</div><br />

Save and exit.

Step 2:
Open memberinfo_block_recentvisitors template and all codes replace with:

<div class="visitors">
<h5 class="blocksubhead smaller">{vb:rawphrase recent_visitors}</h5>
<div class="blockbody">
<div class="blockrow">
<div class="meta">
{vb:rawphrase last_x_visitors, {vb:raw block_data.visitorcount}}
</div><br />
<ol class="commalist">{vb:raw block_data.visitorbits}</ol>
<span class="totalvisits">{vb:rawphrase this_page_has_x_visits, {vb:raw prepared.profilevisits}}</span>
</div>
</div>
</div>

Save and exit.

Step 3:
Open /includes/class_profileblock.php folder and find;

$visitorbits = '';
foreach ($visitors AS $user)
{
fetch_musername($user);

Add below:

require_once('./includes/functions_user.php');

if($user[userid])

$user[avatarurl] = fetch_avatar_url($user[userid]);

if (!$user[avatarurl])
{
$user[avatarurl] = $stylevar['imgdir_misc'] . 'images/misc/unknown.gif';
}
else
{
$user[avatarurl] = $vbulletin->options['bburl'] . '/' .
$user[avatarurl][0];
}

Save and exit.


Open your includes/blog_functions.php folder and find;

fetch_musername($user);
$user['invisiblemark'] = !$user['visible'] ? '*' : '';
$user['buddymark'] = in_array($user['userid'], $buddylist) ? '+' : '';

Add below:

require_once('./includes/functions_user.php');

if($user[userid])

$user[avatarurl] = fetch_avatar_url($user[userid]);

if (!$user[avatarurl])
{
$user[avatarurl] = $stylevar['imgdir_misc'] . 'images/misc/unknown.gif';
}
else
{
$user[avatarurl] = $vbulletin->options['bburl'] . '/' .
$user[avatarurl][0];
}

Save and exit.

Screenshots:
http://img.photo.zing.vn/file_uploads/gallery/1024x768/2010/07/10/04/83601278754588.PNGhttp://img.photo.zing.vn/file_uploads/gallery/1024x768/2010/07/10/04/42741278754593.PNG