Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2001, 04:05 PM
Me2Be's Avatar
Me2Be Me2Be is offline
 
Join Date: Oct 2001
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd like to add a field where it shows the time a user last visited (in addition to the last post) in the user's profile (getinfo template).

Is this easy or hard to do?
Reply With Quote
  #2  
Old 03-21-2001, 04:17 PM
Guest
 
Posts: n/a
Default

add this on about line 1070 of member.php
Code:
  $user_lasttime = vbdate($timeformat,$userinfo[lastactivity]);
  $user_lastdate = vbdate($dateformat,$userinfo[lastactivity]);
then include $user_lasttime and $user_lastdate somewhere in your getinfo template
Reply With Quote
  #3  
Old 03-21-2001, 04:19 PM
Guest
 
Posts: n/a
Default

You may want to set it to N/A if the user has chosen to be invisible or alternatively set it to N/A for everyone but usergroupid 6.
Reply With Quote
  #4  
Old 03-21-2001, 04:21 PM
Guest
 
Posts: n/a
Default

In Member.php do a search for getinfo. Within that section look for:
Code:
    $lastpostdate=vbdate($dateformat,$userinfo[lastpost]);
Put this after it:
Code:
    $lastvisitdate=vbdate($dateformat,$userinfo[lastvisit]);
Reply With Quote
  #5  
Old 03-21-2001, 04:23 PM
Guest
 
Posts: n/a
Default

Freddie, how do you set it to N/A?

Wayne, is this in addition to what Kier said?
Reply With Quote
  #6  
Old 03-21-2001, 04:27 PM
Guest
 
Posts: n/a
Default

No... He just beat me to it.

Do something like this.
Code:
if ($userinfo[invisible]) {
  $lastvisit = "N/A";
} else {
   $user_lasttime = vbdate($timeformat,$userinfo[lastactivity]);
   $user_lastdate = vbdate($dateformat,$userinfo[lastactivity]);
   $lastvisit = $user_lastdate . "at". $user_lasttime;
}
Then put $lastvisit in your template.
Reply With Quote
  #7  
Old 03-21-2001, 04:28 PM
Guest
 
Posts: n/a
Default

You are both just SOOOOO fast! Thank you
Reply With Quote
  #8  
Old 01-06-2009, 01:13 PM
goxy63 goxy63 is offline
 
Join Date: Oct 2008
Location: its like another planet:D
Posts: 657
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can anyone modify above mentioned code that on mouse-hoover we can see date and time when visitor was there in profile !?

Where in template to place '$lastvisit' .....

Thanks in advance for any answer


__________________________________________________
Didnt want to post again in this thread so I write it here....(this part should be under Lynne's post)

@Lynne
oOOOoooUUUPS

Sorryz, didnt saw that, found thread through search....
Reply With Quote
  #9  
Old 01-06-2009, 02:10 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You shouldn't bump a eight year old thread. You should just start your own thread - it's easier for people to follow.
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:04 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04408 seconds
  • Memory Usage 2,222KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_onlinestatus
  • (9)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete