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
  #22  
Old 09-14-2009, 10:53 AM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice and useful...thanks for this Lynne
Reply With Quote
  #23  
Old 02-09-2010, 09:09 PM
Nordinho Nordinho is offline
 
Join Date: Aug 2004
Location: Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very nice, ty!
Reply With Quote
  #24  
Old 03-02-2010, 05:58 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will install VB4 soon, does anyone know is this option default there?

My users love this option
Reply With Quote
  #25  
Old 03-06-2010, 07:41 PM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lynne....is this goin to make it work with vB 4.0.2?

hope so...

best regards

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

I don't see why it couldn't work in 4.0.2 except the template edit would be different for 4.0.
Reply With Quote
  #27  
Old 03-07-2010, 08:42 AM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks Lynne...tried to find the line at includes/class_profileblock.php can't find it...seems to be that they change it or...

would you be so kind (as always) please to re code this at your spare time...my members are keep bugging me on this one

thanks and best regards

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

Hi Lynne tried to figure out and make this work but no luck at all...

as i said can't find this and can you please help me on this...


Code:
eval('$visitorbits .= "' . fetch_template('memberinfo_visitorbit') . '";');
to includes/class_profileblock.php

but i added it instead here to think and hope the right place is...but...

Code:
$visitorbits = '';
		foreach ($visitors AS $user)
		{
			fetch_musername($user);
			$user['invisiblemark'] = !$user['visible'] ? '*' : '';
			$user['buddymark'] = in_array($user['userid'], $buddylist) ? '+' : '';
$user['date'] = vbdate($this->registry->options['dateformat'],$user['dateline']);            
$user['time'] = vbdate($this->registry->options['timeformat'], $user['dateline']);
$userdateline = $user['date'] .' '. $user['time'];  
			$templater = vB_Template::create('memberinfo_visitorbit');
				$templater->register('user', $user);
			$visitorbits .= $templater->render();
		}

Upload the plugins without touching it i guess its look okay..hope so...

Code:

<plugins>
	<plugin active="1" executionorder="5" product="vbulletin">
		<title><![CDATA[Get Recent Visitor Date & Time]]></title>
		<hookname>member_profileblock_recentvisitors_query</hookname>
		<phpcode><![CDATA[$hook_query_fields= ',profilevisitor.dateline';]]></phpcode>
	</plugin>
</plugins>
and edit the template "memberinfo_visitorbit"

FROM:

Code:
<li>&nbsp;<a class="username" href="{vb:link member,{vb:raw user}}">{vb:raw user.musername}</a>{vb:raw user.invisiblemark}{vb:raw user.buddymark}</li>
TO:

Code:
<li>&nbsp;<a class="username" href="{vb:link member,{vb:raw user}}" title="{vb:raw user.dateline}">{vb:raw user.musername}</a>{vb:raw user.invisiblemark}{vb:raw user.buddymark}</li>

but got anonym numbers only or say can't get it right...


any idea pls...what wrong?

thanks and best regards...

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

Change this line:
PHP Code:
                $templater->register('user'$user); 
To this:
PHP Code:
                $templater->register('user'$user);
                
$templater->register('userdateline'$userdateline); 
And you also have the variable name wrong in the template, it should be title="{vb:raw userdateline}"
Reply With Quote
  #30  
Old 03-10-2010, 12:10 PM
princeedward's Avatar
princeedward princeedward is offline
 
Join Date: Jan 2007
Location: Deutschland
Posts: 901
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

....hmmm...did it too that variable way but also didn't go well... but now i got it...million thanks once again Lynne for your never ending assistance or support here and there...just informed my members and they're really quite happy about this...


so tested to my vb default skin and style skin...we can release it to vB4.0.0 Modification Section...i mean... YOU can release it now...if you have time enough

for the others to feel the heat of this wonderful mod of yours...

great...and much appreciated your assistance here once again...as always...

Reply With Quote
  #31  
Old 03-10-2010, 01:47 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 princeedward View Post
what i mean...is YOU can release it now...if you have time enough
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.
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 01:24 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.05879 seconds
  • Memory Usage 2,353KB
  • 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
  • (5)bbcode_code
  • (2)bbcode_html
  • (4)bbcode_php
  • (1)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
  • (4)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