Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: 1.00, by bigmattyh bigmattyh is offline
Developer Last Online: Mar 2014 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-26-2002 Last Update: Never Installs: 326
 
No support by the author.

YESTERDAY/TODAY DATESTAMP HACK - Updated 5/25/02
Tested and working on vB 2.2.1 -> 2.2.6

Description: This hack replaces the standard "05-25-02, 02:45 PM" date with "Today" or "Yesterday" anywhere you have a date posted, if the date matches today's or yesterday's date.

Demo: Installed on vBulletin.org.

The following are add-ons that may be helpful depending on your specific needs.

Extra features: Helpful template hacks: Due to the way the standard vB template set handles date columns in forumhome.php and forumdisplay.php, some template changes may be of use:Comments and criticism are always welcome.
Please click the install button to show your support.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #182  
Old 08-17-2002, 01:52 PM
Craigr's Avatar
Craigr Craigr is offline
 
Join Date: May 2002
Location: Ayr, Scotland
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent hack worked great.

Craig
Reply With Quote
  #183  
Old 08-19-2002, 03:46 PM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #184  
Old 08-19-2002, 08:46 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #185  
Old 08-23-2002, 05:58 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this be used with 'yesterday' 'today' on 2.2.6?
Reply With Quote
  #186  
Old 08-23-2002, 06:44 PM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #187  
Old 08-23-2002, 06:57 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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])."\";");
Reply With Quote
  #188  
Old 08-23-2002, 07:55 PM
Tim Wheatley's Avatar
Tim Wheatley Tim Wheatley is offline
 
Join Date: Nov 2001
Location: England
Posts: 489
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #189  
Old 08-23-2002, 08:09 PM
Googa Googa is offline
 
Join Date: Jan 2002
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works well. Good hack! Thanks
Reply With Quote
  #190  
Old 08-24-2002, 07:44 PM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #191  
Old 08-26-2002, 10:49 PM
ExAvIoUr ExAvIoUr is offline
 
Join Date: Jan 2002
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
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 07:55 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.04726 seconds
  • Memory Usage 2,314KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_code
  • (1)bbcode_php
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete