Back to vBulletin 3.7 Template Modifications

Latest profilevisitors - a better look
Mod Version: 1.01, by Oyabun

This modification is in the archives.
vB Version: 3.7.x Rating: (1 vote - 5.00 average) Installs: 8
Released: 26 Dec 2008 Last Update: Never Downloads: 0
Not Supported Template Edits Code Changes Re-usable Code Translations  

Hi there!

First of all i'd like to tell you that im not the best coder and you will have to edit your templates on your on risk ! (Better save your template if you're not sure about this...)

What does this modification do?
It'll make your "latest profilevisitors block" in the profile look better and it adds online/offline buttons if you've uploaded them.

http://your-vb.com/index.php?t=114

If you want to show avatars (small) aswell click here

Spoiler (click to open)


From the beginning.

Please revert your file includes/class_profile.php first

Revert and open your memberinfo_visitorbit template:
search for:
HTML Code:
<li class="smallfont">
replace with:
HTML Code:
<li class="smallfont" style="margin-top: 4px">$user[onlinestatus] <img style="position: relative; top: 3px" src="$user[avatarurl]" height="15px" width="12px" alt="<phrase 1="$user[username]">$vbphrase[xs_avatar]</phrase>" border="0" /> 

Open template memberinfo_block_recentvisitors:
Change ol and /ol in ul and /ul

Open file includes/class_profileblock.php:
search for:
PHP Code:
        $visitors_db $this->registry->db->query_read_slave("
            SELECT user.userid, user.username, user.usergroupid, user.displaygroupid, profilevisitor.visible
                
$hook_query_fields
            FROM " 
TABLE_PREFIX "profilevisitor AS profilevisitor
            INNER JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = profilevisitor.visitorid)
            
$hook_query_joins
            WHERE profilevisitor.userid = " 
$this->profile->userinfo['userid'] . "
                " 
. (!($this->registry->userinfo['permissions']['genericpermissions'] & $this->registry->bf_ugp_genericpermissions['canseehidden']) ? " AND (visible = 1 OR profilevisitor.visitorid = " $this->registry->userinfo['userid'] . ")" "") . "
                
$hook_query_where
            ORDER BY profilevisitor.dateline DESC
            LIMIT 
$options[profilemaxvisitors]
        "
); 
replace with:
PHP Code:
        $visitors_db $this->registry->db->query_read_slave("
            SELECT user.*, (user.options & " 
$this->registry->bf_misc_useroptions['invisible'] . ") as invisible
                " 
. ($this->registry->options['avatarenabled'] ?
                        
", avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustom, customavatar.dateline AS avatardateline, customavatar.filedata_thumb, customavatar.height AS avheight, customavatar.width AS avwidth, customavatar.width_thumb AS avwidth_thumb, customavatar.height_thumb AS avheight_thumb" "") . ", profilevisitor.visible
                
$hook_query_fields
            FROM " 
TABLE_PREFIX "profilevisitor AS profilevisitor
            INNER JOIN " 
TABLE_PREFIX "user AS user ON (user.userid = profilevisitor.visitorid)"
                
. ($this->registry->options['avatarenabled'] ? "
            LEFT JOIN " 
TABLE_PREFIX "avatar AS avatar ON (avatar.avatarid = user.avatarid)
            LEFT JOIN " 
TABLE_PREFIX "customavatar AS customavatar ON (customavatar.userid = user.userid) " '') . "
            
$hook_query_joins
            WHERE profilevisitor.userid = " 
$this->profile->userinfo['userid'] . "
                " 
. (!($this->registry->userinfo['permissions']['genericpermissions'] & $this->registry->bf_ugp_genericpermissions['canseehidden']) ? " AND (profilevisitor.visible = 1 OR profilevisitor.visitorid = " $this->registry->userinfo['userid'] . ")" "") . "
                
$hook_query_where
            ORDER BY profilevisitor.dateline DESC
            LIMIT 
$options[profilemaxvisitors]
        "
); 
search for:
PHP Code:
$visitors["$user[username]"] = $user
above add:
PHP Code:
fetch_online_status($usertrue);
fetch_avatar_from_userinfo($usertrue); 
Ready!

how to add the the time the user visited.
http://your-vb.com/index.php?t=114

Regards,

Stoebi

Close



open your memberinfo_visitorbit template:
search for:
HTML Code:
<li class="smallfont">
replace with:
HTML Code:
<li class="smallfont" style="margin-top: 4px">$user[onlinestatus] 
Open template memberinfo_block_recentvisitors:
Change ol and /ol in ul and /ul

Open file includes/class_profileblock.php:
search for:
PHP Code:
SELECT user.useriduser.usernameuser.usergroupiduser.displaygroupidprofilevisitor.visible 
replace with:
PHP Code:
SELECT user.useriduser.usernameuser.usergroupiduser.displaygroupiduser.lastactivity, (user.options " . $this->registry->bf_misc_useroptions['invisible'] . ") as invisibleprofilevisitor.visible 
search for:
PHP Code:
$visitors["$user[username]"] = $user
above add:
PHP Code:
fetch_online_status($usertrue); 
Done! (Thanks to Stoebi

Spoiler (click to open)


I also tried $user[onlinestatus] but it did not WORK :<
Right, without file edits the onlinestatus will not available.

Revert and open your memberinfo_visitorbit template:
search for:
HTML Code:
<li class="smallfont">
replace with:
HTML Code:
<li class="smallfont" style="margin-top: 4px">$user[onlinestatus] 
Open template memberinfo_block_recentvisitors:
Change ol and /ol in ul and /ul

Open file includes/class_profileblock.php:
search for:
PHP Code:
SELECT user.useriduser.usernameuser.usergroupiduser.displaygroupidprofilevisitor.visible 
replace with:
PHP Code:
SELECT user.useriduser.usernameuser.usergroupiduser.displaygroupiduser.lastactivity, (user.options " . $this->registry->bf_misc_useroptions['invisible'] . ") as invisibleprofilevisitor.visible 
search for:
PHP Code:
$visitors["$user[username]"] = $user
above add:
PHP Code:
fetch_online_status($usertrue); 
Ready!

how to add the the time the user visited.
http://your-vb.com/index.php?t=114

Regards,

Stoebi

Close
)

Excuse my english, im german.
HF with this mod. Greez

Download

No files for download.

Supporters / CoAuthors

  • Stoebi

Screenshots

Click image for larger version
Name:	screen.jpg
Views:	489
Size:	75.5 KB
ID:	91184   Click image for larger version
Name:	stoebi.jpg
Views:	299
Size:	117.9 KB
ID:	91340  


vblts.ru supports vBulletin®, 2022-2024