vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Profile Enhancements - Date & Time of Profile Visitor (https://vborg.vbsupport.ru/showthread.php?t=200903)

princeedward 03-10-2010 03:46 PM

Quote:

Originally Posted by Lynne (Post 2000913)
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?

:p

jscieza 12-30-2010 02:20 AM

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

Lynne 12-30-2010 03:08 AM

Quote:

Originally Posted by jscieza (Post 2141127)
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/

jscieza 12-30-2010 04:21 AM

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

Lynne 12-30-2010 05:05 PM

Quote:

Originally Posted by jscieza (Post 2141165)
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);

jscieza 12-30-2010 10:04 PM

Hi Lynne,

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

https://vborg.vbsupport.ru/

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

Lynne 12-30-2010 11:00 PM

Quote:

Originally Posted by jscieza (Post 2141543)
Hi Lynne,

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

http://img63.imageshack.us/img63/7162/demoz.gif

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



jscieza 12-30-2010 11:23 PM

Thanks for your kind reply Lynne!

I applied the conditional and now I can't see the date/time even in my own profile :mad:

Lynne 12-31-2010 03:14 AM

Quote:

Originally Posted by jscieza (Post 2141585)
Thanks for your kind reply Lynne!

I applied the conditional and now I can't see the date/time even in my own profile :mad:

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



jscieza 12-31-2010 03:47 AM

Just wanted to say thank you very much and Happy New Year! :up:


All times are GMT. The time now is 02:54 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.03668 seconds
  • Memory Usage 1,749KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete