Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Date & Time of Profile Visitor Details »»
Date & Time of Profile Visitor
Version: 1.00, by Lynne Lynne is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 3.8.x Rating:
Released: 01-05-2009 Last Update: Never Installs: 73
Uses Plugins Template Edits
Re-useable Code Code Changes  
No support by the author.

A simple mod to show the date and time of the profile visitor when you hover your cursor over their username in Recent Visitors in member.php.


1. Go to your Admin CP > Plugins & Products > Download / Upload Plugins > Upload the sml file profile_visitor_datetime.xml

2. Change the template "memberinfo_visitorbit" from:
HTML Code:
<li class="smallfont"><a href="member.php?$session[sessionurl]u=$user[userid]">$user[musername]</a>$user[invisiblemark]$user[buddymark] </li>
To:
HTML Code:
<li class="smallfont"><a href="member.php?$session[sessionurl]u=$user[userid]" title="$userdateline">$user[musername]</a>$user[invisiblemark]$user[buddymark] </li>
Save the template.

3. Open the file includes/class_profileblock.php and find the following line around line 1159:
PHP Code:
eval('$visitorbits .= "' fetch_template('memberinfo_visitorbit') . '";'); 
Add above it:
PHP Code:
 $user['date'] = vbdate($this->registry->options['dateformat'],$user['dateline']);            
$user['time'] = vbdate($this->registry->options['timeformat'], $user['dateline']);
$userdateline $user['date'] .' '$user['time']; 
Save and upload the file.


This was written for and tested on my 3.8.0 RC1 board.

Download Now

File Type: zip profile_visitor_datetime.zip (2.0 KB, 369 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
A.Chakery, goxy63

Comments
  #32  
Old 03-10-2010, 03:46 PM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Lynne View Post
Unfortunately, time is something I don't have a lot of these days. You are welcome to release it in the vB4 section if you'd like.
okay..i will try my very best to make the best presentation of this mod....and of course with your name as original creator or developer of this mod...thanks for the permission to release it...i just want to share this also to others on the VB 4.00 Series Modification Section... and who knows they might need it too like i did and my members...

best regards...

hmm...where...or how do i start now?

Reply With Quote
  #33  
Old 12-30-2010, 02:20 AM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lynne,

If the last visit has been today, instead of displaying "12-30-2010, 14:20" it should display "Today, 14:20". If the last visit has been yesterday, instead of displaying "12-29-2010, 14:20" it should display "Yesterday, 14:20".

Could you please tell me how to do so?

Thank you,
Jonathan
Reply With Quote
  #34  
Old 12-30-2010, 03:08 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jscieza View Post
Hi Lynne,

If the last visit has been today, instead of displaying "12-30-2010, 14:20" it should display "Today, 14:20". If the last visit has been yesterday, instead of displaying "12-29-2010, 14:20" it should display "Yesterday, 14:20".

Could you please tell me how to do so?

Thank you,
Jonathan
I believe you can just add a 3rd parameter to the vbdate function call and set it to true. You can read about the function in the API here - http://members.vbulletin.com/api/
Reply With Quote
  #35  
Old 12-30-2010, 04:21 AM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lynne,

I'm not a programmer so I believe that I'm going to be unable to achieve that myself. If you get some free time soon hope you can give me a hand with this.

Thank you,
Jonathan
Reply With Quote
  #36  
Old 12-30-2010, 05:05 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jscieza View Post
Hi Lynne,

I'm not a programmer so I believe that I'm going to be unable to achieve that myself. If you get some free time soon hope you can give me a hand with this.

Thank you,
Jonathan
As I said, you just add a third parameter of true to the date:
Code:
$user['date'] = vbdate($this->registry->options['dateformat'],$user['dateline'],true);
Reply With Quote
  #37  
Old 12-30-2010, 10:04 PM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lynne,

Thanks for your reply! It's working fine in vB 3.8.5



Just an important detail about my members are complaining. Everyone can see the date/time of the visit even in profiles of other members. I think that only the profile owner should be able to see that information.

How I can apply the conditional?

Thank you,
Jonathan
Reply With Quote
  #38  
Old 12-30-2010, 11:00 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jscieza View Post
Hi Lynne,

Thanks for your reply! It's working fine in vB 3.8.5



Just an important detail about my members are complaining. Everyone can see the date/time of the visit even in profiles of other members. I think that only the profile owner should be able to see that information.

How I can apply the conditional?

Thank you,
Jonathan
Probably just put a condition about the php code you added to the file. Something like:
PHP Code:
if ($vbulletin->userinfo['userid'] == $user['userid']) {
the date/time code

Reply With Quote
  #39  
Old 12-30-2010, 11:23 PM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for your kind reply Lynne!

I applied the conditional and now I can't see the date/time even in my own profile
Reply With Quote
  #40  
Old 12-31-2010, 03:14 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jscieza View Post
Thanks for your kind reply Lynne!

I applied the conditional and now I can't see the date/time even in my own profile
That's what I get for not taking my own advise and actually looking at the code in the file to determine the variable names!

PHP Code:
if ($this->registry->userinfo['userid'] == $this->profile->userinfo['userid']) {
the date/time code

Reply With Quote
  #41  
Old 12-31-2010, 03:47 AM
jscieza jscieza is offline
 
Join Date: Apr 2007
Posts: 191
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to say thank you very much and Happy New Year! :up:
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 06:32 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.09654 seconds
  • Memory Usage 2,354KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_html
  • (4)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete