Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Latest profilevisitors - a better look Details »»
Latest profilevisitors - a better look
Version: 1.01, by Oyabun Oyabun is offline
Developer Last Online: Feb 2011 Show Printable Version Email this Page

Category: Forum Display Enhancements - Version: 3.7.x Rating:
Released: 12-25-2008 Last Update: Never Installs: 8
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

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.

How to add the time and date the user visited the profile.

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


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)




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

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 12-28-2008, 12:55 PM
Stoebi Stoebi is offline
 
Join Date: Apr 2006
Location: Germany, Berlin
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ultimate Teen Forums View Post
Lovely, installed

Maybe add a mini preview of the friend's avatar next to their online status?
This, what you want?
Attachment 91311

Or

Attachment 91312
Reply With Quote
  #13  
Old 12-28-2008, 01:26 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The first image looks great, yes exactly how I would like it
________
The Cigar Boss
Reply With Quote
  #14  
Old 12-28-2008, 01:35 PM
Stoebi Stoebi is offline
 
Join Date: Apr 2006
Location: Germany, Berlin
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!


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


Regards,

Stoebi
Reply With Quote
  #15  
Old 12-28-2008, 03:04 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works a treat, thank you very much! Our member love it. Can you translate the addition of last visited time into English please because that would be great to have too

Maybe make this a plugin too
________
Video review
Reply With Quote
  #16  
Old 12-28-2008, 04:49 PM
Oyabun Oyabun is offline
 
Join Date: Dec 2006
Location: Germany
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stoebi View Post
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!


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


Regards,

Stoebi
Lol, we could make your mod out of this. Mine sucked until you visited my thread :P
But i hate PHP edits. Everytime you update vbulletin you have to edit all the files again
Btw. i need to change it in the blogview, too. Can you tell us how?
I guess in class_profileblock_blog.php, but I don't want to do something wrong
Reply With Quote
  #17  
Old 12-28-2008, 04:58 PM
Sweeks Sweeks is offline
 
Join Date: Jul 2008
Posts: 633
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Shouldnt this now be in the add ons section as you are modifying vbulletin stock files?
________
AMATEUR EXHIBITIONIST
Reply With Quote
  #18  
Old 12-28-2008, 06:46 PM
Stoebi Stoebi is offline
 
Join Date: Apr 2006
Location: Germany, Berlin
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Oyabun View Post
Lol, we could make your mod out of this. Mine sucked until you visited my thread :P
It is your idea and your mod. Basta!

Thank you very much

Quote:
Originally Posted by Oyabun View Post
But i hate PHP edits. Everytime you update vbulletin you have to edit all the files again
Hate file edits also.

.
In German:
Du kannst mir glauben, wenn es eine M?glichkeit geben w?rde, eure und meine Ideen, diesen Block betreffend, mittels Hook(s) zu realisieren, ich h?tte es getan. Lese auch mal bitte diesen Beitrag. Verstehst, was ich meine? Dank dir noch einmal.
Reply With Quote
  #19  
Old 12-28-2008, 09:55 PM
Oyabun Oyabun is offline
 
Join Date: Dec 2006
Location: Germany
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Ultimate Teen Forums View Post
Shouldnt this now be in the add ons section as you are modifying vbulletin stock files?
Well, yes...

Quote:
Originally Posted by Stoebi View Post
It is your idea and your mod. Basta!

Thank you very much


Hate file edits also.

.
In German:
Du kannst mir glauben, wenn es eine M?glichkeit geben w?rde, eure und meine Ideen, diesen Block betreffend, mittels Hook(s) zu realisieren, ich h?tte es getan. Lese auch mal bitte diesen Beitrag. Verstehst, was ich meine? Dank dir noch einmal.
Hehe, wenn dann danke ich dir. Hab den Beitrag auch schon gelesen *g*


But i changed the php file, because its only one file.
Can you answer my question about the blog viewers?
I also added you as a supporter. I hope it's okay cause you know it better than me :P
Reply With Quote
  #20  
Old 12-28-2008, 11:08 PM
The4um's Avatar
The4um The4um is offline
 
Join Date: Nov 2008
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Stoebi View Post
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!


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


Regards,

Stoebi
I made every step that was writen here, but at the end result aren't good at the recent visitors block, avatar is not shown, only apears the phrase "username's avatar"

anyone can helpme please?
Reply With Quote
  #21  
Old 12-28-2008, 11:39 PM
Oyabun Oyabun is offline
 
Join Date: Dec 2006
Location: Germany
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just revert everything you did and try it again. It has to work.
I made it to. See the result in the attachment. You made something wrong i guess.

"username's avatar" just shows up if the user has not saved any avatar
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:19 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05183 seconds
  • Memory Usage 2,454KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_html
  • (16)bbcode_php
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete