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
  #272  
Old 05-31-2003, 03:15 PM
cyrus's Avatar
cyrus cyrus is offline
 
Join Date: Oct 2001
Posts: 159
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

EXCELLENT, THIS ONES SO EASY TO INSTALL AND JUST AS USEFUL

KEEP IT UP !
Reply With Quote
  #273  
Old 06-01-2003, 11:18 AM
julius julius is offline
 
Join Date: Nov 2001
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
02-28-03 at 01:23 PM julius said this in Post #247
When you forward or send a reply to a private message, in the out box and the in box the "Today" is still there after some days. I think it would be better in these cases the date, as when you edit a post.
I solved this:

in private.php find (NOT the first, but the second at about line 514):
PHP Code:
    $message[postdate]=vbdate($dateformat,$message[dateline]);
    
$message[posttime]=vbdate($timeformat,$message[dateline]); 
and change to:
PHP Code:
    $message[postdate]=vbdatenoty($dateformat,$message[dateline]);
    
$message[posttime]=vbdatenoty($timeformat,$message[dateline]); 
That's all.
Reply With Quote
  #274  
Old 06-12-2003, 04:49 PM
reismarktq2 reismarktq2 is offline
 
Join Date: Feb 2003
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

With the exception of a few Finns, most of my users like this hack very much. Would anyone know how to make this hack a user-selectable option so that I can appease the not-so-silent minority on my boards?
Reply With Quote
  #275  
Old 07-01-2003, 02:20 PM
Ninth Dimension's Avatar
Ninth Dimension Ninth Dimension is offline
 
Join Date: Oct 2001
Location: London, England.
Posts: 739
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack, thank you
Reply With Quote
  #276  
Old 11-17-2003, 09:12 AM
kristian's Avatar
kristian kristian is offline
 
Join Date: Feb 2003
Location: Cambridgeshire, UK
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed first time withou any problems at all...

vBulletin Version 2.3.3

Might be nice to update the install document with new code references as the version this was originaly written for is well outdated.
Reply With Quote
  #277  
Old 11-29-2003, 04:14 PM
VirtualHogwarts VirtualHogwarts is offline
 
Join Date: Nov 2003
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

/me clicks install!

Love this .. dont understand why it's not defualt but hey easy install none the less!
Reply With Quote
  #278  
Old 12-26-2003, 11:24 PM
Shell Geeks's Avatar
Shell Geeks Shell Geeks is offline
 
Join Date: Dec 2003
Location: Southern California
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does anyone have a text file of this hack? I have downloaded it three times and the text file looks like
PHP Code:
\clbrdrb\brdrs\brdrw15\brdrcf1 \clbrdrr
\brdrnone \cltxlrtb\clftsWidth3\clwWidth2088\clshdrawnil
\par   global $bbuserinfo,$timeoffset$dateformat$timeformat;
\
par 
\par   if ($dateformat==$format) \{
\
par     $todaystamp=mktime();
\
par     $todaydate=date($format,$todaystamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
\
par     $yestdate=date($format,(($todaystamp-86400)+($bbuserinfo['timezoneoffset']-$timeoffset)*3600));
\
par     $date date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
\
par     if ($date==$todaydate) \{
\
par       $date="Today";
\
par     \}
\
par     if ($date==$yestdate) \{
\
par       $date="Yesterday";
\
par     \}
\
par   \} else \{
\
par     $date date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
\
par   \}
\
par   return $date;
\
par \}
\
par 
\par {\listtext\pard\plain\f35\fs20\insrsid9528220 \hich\af35\dbch\af0\loch\f35 
Reply With Quote
  #279  
Old 12-28-2003, 06:50 PM
enginethatcan't enginethatcan't is offline
 
Join Date: Jul 2003
Location: MA
Posts: 143
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed
Reply With Quote
  #280  
Old 01-24-2004, 03:55 AM
DarkSavior DarkSavior is offline
 
Join Date: Mar 2003
Location: Finland
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, easy install! Works great on 2.3.4! Two thumbs up!
Reply With Quote
  #281  
Old 01-24-2004, 04:13 PM
TheLab TheLab is offline
 
Join Date: May 2003
Posts: 88
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok after i resolved my noob problems i installed it and it works great on 2.3.2
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:46 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.06261 seconds
  • Memory Usage 2,331KB
  • 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_php
  • (1)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
  • (3)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