View Full Version : Forum Display Enhancements - Latest profilevisitors - a better look
Oyabun
12-25-2008, 10:00 PM
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 :D! (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. (http://your-vb.com/showthread.php?t=114)
If you want to show avatars (small) aswell click here (https://vborg.vbsupport.ru/showpost.php?p=1695522&postcount=13)
open your memberinfo_visitorbit template:
search for:
<li class="smallfont">
replace with:
<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:
SELECT user.userid, user.username, user.usergroupid, user.displaygroupid, profilevisitor.visible
replace with:
SELECT user.userid, user.username, user.usergroupid, user.displaygroupid, user.lastactivity, (user.options & " . $this->registry->bf_misc_useroptions['invisible'] . ") as invisible, profilevisitor.visible
search for:
$visitors["$user[username]"] = $user;
above add:
fetch_online_status($user, true);
Done! (Thanks to Stoebi (https://vborg.vbsupport.ru/showpost.php?p=1695234&postcount=8))
Excuse my english, im german.
HF with this mod. Greez :confused:
crkgb
12-26-2008, 06:38 AM
Definitely a nice mod. Only one comment though. It needs to support a scroll bar. Like in this page on the left side: http://weblog.33b.ru/weblog.1745546.html
Otherwise options of people displayed are limited to the page height.
Rene Kriest
12-26-2008, 03:27 PM
Definitely a nice mod. Only one comment though. It needs to support a scroll bar. Like in this page on the left side: http://weblog.33b.ru/weblog.1745546.html
Otherwise options of people displayed are limited to the page height.
I don't think so. It's about the latest, not all visitors. Just write above "latest X visitors" or do you wanna carry along with your profile the visitor's list of the last century - and counting? ;)
Oyabun
12-26-2008, 04:45 PM
Hehe :D
But does anyone have an idea how to fix that problem with the icons?
On my board they all show up as "offline".
I tried $user[onlinestatus], $prepared[onlinestatus] and $post[onlinestatus] aswell, but nothing seemed to work.
Is that just a problem on my own forums...maybe? :confused:
I know i am the creator... i should know lol
3arab-hero
12-26-2008, 06:30 PM
i have the same problem in my forum
all of members who visited the profile showen to be offline
crkgb
12-26-2008, 11:26 PM
I don't think so. It's about the latest, not all visitors. Just write above "latest X visitors" or do you wanna carry along with your profile the visitor's list of the last century - and counting? ;)
If you have 20 ppl visiting your profile page every month - you are absolutely right. In my case it's close to 500 daily. So I have 50 recent visitors displayed. Your view on the problem is unacceptable in my case.
Oyabun
12-27-2008, 12:37 AM
As I said, im not the best coder. I am just starting and I just wanted to provide you with what I got.
Stoebi
12-28-2008, 02:18 AM
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:
<li class="smallfont">
replace with:
<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:
SELECT user.userid, user.username, user.usergroupid, user.displaygroupid, profilevisitor.visible
replace with:
SELECT user.userid, user.username, user.usergroupid, user.displaygroupid, user.lastactivity, (user.options & " . $this->registry->bf_misc_useroptions['invisible'] . ") as invisible, profilevisitor.visible
search for:
$visitors["$user[username]"] = $user;
above add:
fetch_online_status($user, true);
Ready!
how to add the the time the user visited.
http://your-vb.com/showthread.php?t=114
Regards,
Stoebi
Oyabun
12-28-2008, 02:53 AM
Lol, danke. Thank you. You saved my little mod. :)
Sweeks
12-28-2008, 10:44 AM
Lovely, installed :D
Maybe add a mini preview of the friend's avatar next to their online status?
________
Motorcycle tires (http://www.motorcycle-tech.com/tires/motorcycle-tires)
Stoebi
12-28-2008, 12:55 PM
Lovely, installed :D
Maybe add a mini preview of the friend's avatar next to their online status?
This, what you want?
91311
Or
91312
Sweeks
12-28-2008, 01:26 PM
The first image looks great, yes exactly how I would like it :D
________
The Cigar Boss (http://thecigarboss.com/)
Stoebi
12-28-2008, 01:35 PM
From the beginning.
Please revert your file includes/class_profile.php first
Revert and open your memberinfo_visitorbit template:
search for:
<li class="smallfont">
replace with:
<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:
$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:
$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:
$visitors["$user[username]"] = $user;
above add:
fetch_online_status($user, true);
fetch_avatar_from_userinfo($user, true);
Ready!
how to add the the time the user visited.
http://your-vb.com/showthread.php?t=114
Regards,
Stoebi
Sweeks
12-28-2008, 03:04 PM
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 :D
Maybe make this a plugin too ;)
________
Video review (http://videoreviews.org)
Oyabun
12-28-2008, 04:49 PM
From the beginning.
Please revert your file includes/class_profile.php first
Revert and open your memberinfo_visitorbit template:
search for:
<li class="smallfont">
replace with:
<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:
$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:
$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:
$visitors["$user[username]"] = $user;
above add:
fetch_online_status($user, true);
fetch_avatar_from_userinfo($user, true);
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 :)
Sweeks
12-28-2008, 04:58 PM
Shouldnt this now be in the add ons section as you are modifying vbulletin stock files?
________
AMATEUR EXHIBITIONIST (http://www.++++tube.com/categories/50/exhibitionist/videos/1)
Stoebi
12-28-2008, 06:46 PM
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 :)
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 (http://your-vb.com/showpost.php?p=951&postcount=3). Verstehst, was ich meine? Dank dir noch einmal. :)
Oyabun
12-28-2008, 09:55 PM
Shouldnt this now be in the add ons section as you are modifying vbulletin stock files?
Well, yes...
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 (http://your-vb.com/showpost.php?p=951&postcount=3). 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
The4um
12-28-2008, 11:08 PM
From the beginning.
Please revert your file includes/class_profile.php first
Revert and open your memberinfo_visitorbit template:
search for:
<li class="smallfont">
replace with:
<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:
$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:
$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:
$visitors["$user[username]"] = $user;
above add:
fetch_online_status($user, true);
fetch_avatar_from_userinfo($user, true);
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?
Oyabun
12-28-2008, 11:39 PM
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
The4um
12-29-2008, 12:17 AM
I'd made something twice and this was the reason that this modification does not work :D
Now is working perfectly :D
Stoebi
12-29-2008, 03:08 AM
Hi @all
Please give me more time, because some actions in the upcoming days with my family and friends (party, party party) ;)
@Snorks, @Ultimate Teen Forums
I make public the rest of this code in this forum, you did not need to registrate on our forum your-vb.com in germany. Please have patience, I will see, how can I optimize this.
@Oyabun
vB Blog is not here installed at the moment.
Regards, Stoebi
Sweeks
12-29-2008, 12:00 PM
Great, thank you!
________
SQUIRTING PUSSY (http://www.++++tube.com/categories/1011/pussy/videos/1)
Tarfandestan
12-29-2008, 09:16 PM
Please revert your file includes/class_profile.php first
Dear Stoebi (https://vborg.vbsupport.ru/member.php?u=136823) , I think that your mean is includes/class_profileblock.php. yes?
Stoebi
12-31-2008, 01:07 AM
Yes, you are right.Thank you. :)
Regards,
Stoebi
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.