vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Yesterday/Today Datestamp Hack (https://vborg.vbsupport.ru/showthread.php?t=34527)

Craigr 08-17-2002 01:52 PM

Excellent hack worked great.

Craig

ExAvIoUr 08-19-2002 03:46 PM

Quote:

Originally posted by bigmattyh
If you would like your date to be formatted in the "Today, at 08:33 PM" format, here's how to do so:

When you install the hack, just insert ", at" into this line:
Code:

eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

That's all!

i can't find that code in index.php. can ne1 help me?

bigmattyh 08-19-2002 08:46 PM

Quote:

Originally posted by ExAvIoUr
i can't find that code in index.php. can ne1 help me?
It's towards the beginning of index.php. Keep in mind that it doesn't include the ", at" part of the code (the part in red). Just search for the first part of the string.

Tim Wheatley 08-23-2002 05:58 PM

Can this be used with 'yesterday' 'today' on 2.2.6?

ExAvIoUr 08-23-2002 06:44 PM

Quote:

Originally posted by bigmattyh
It's towards the beginning of index.php. Keep in mind that it doesn't include the ", at" part of the code (the part in red). Just search for the first part of the string.
i still can't find it. do u mean admin/index.php?

bigmattyh 08-23-2002 06:57 PM

Quote:

Originally posted by Tim Wheatley
Can this be used with 'yesterday' 'today' on 2.2.6?
If you're asking if it works on 2.2.6, yes.

Quote:

Originally posted by ExAvIoUr
i still can't find it. do u mean admin/index.php?
No. The line is around line 53 of your forum/index.php file. All you're doing is looking for a line that looks like this:
Code:

eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

and turning it into this:
Code:

eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
", at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");


Tim Wheatley 08-23-2002 07:55 PM

lol... Sorry. I meant to post that in Firefly's 'let users choose their own date format' thread, I had them both open at the same time.

Googa 08-23-2002 08:09 PM

Works well. Good hack! Thanks

ExAvIoUr 08-24-2002 07:44 PM

the closest thing i have to that is this

PHP Code:

$bbuserinfo['lastvisitdate'] = vbdate($dateformat$bbuserinfo['lastvisit']);
$bbuserinfo['lastvisitdate'] = " at " vbdate($timeformat$bbuserinfo['lastvisit']); 

is that it. and where do i put that.

ExAvIoUr 08-26-2002 10:49 PM

bump


All times are GMT. The time now is 03:00 PM.

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.02424 seconds
  • Memory Usage 1,740KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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