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
  #72  
Old 04-20-2002, 05:59 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
it doesnt work.. i did everything correct twice and nothing shows up. ????
Well, keep in mind that as a couple of new versions of vB have come out, the line references are slightly off. For example, in functions.php, the replacement code for vbdate() is a few dozen lines further down.

I don't know if that's the problem you're encountering, but if you do the replacements correctly, the hack should be working correctly.
Reply With Quote
  #73  
Old 04-20-2002, 06:10 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Das hack war sehr gut...

It works on 2.2.5...

I am living proof of that

*Holy Cr*p - Heart Attack *

Satan
Reply With Quote
  #74  
Old 04-28-2002, 11:05 PM
UGate's Avatar
UGate UGate is offline
 
Join Date: Dec 2001
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wie kann ich Today in einer Farbe machen z.b.rot

Today in red ?
Reply With Quote
  #75  
Old 04-28-2002, 11:17 PM
Hubsi Hubsi is offline
 
Join Date: Mar 2002
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wie w?rs mit z.b.

PHP Code:
$date="<font color=red>Heute</font>"
Reply With Quote
  #76  
Old 04-29-2002, 01:35 PM
HyperS HyperS is offline
 
Join Date: Dec 2001
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Hack man! Superb work.
Reply With Quote
  #77  
Old 05-01-2002, 07:36 AM
KeithMcL's Avatar
KeithMcL KeithMcL is offline
 
Join Date: Nov 2001
Location: Dublin, Ireland
Posts: 85
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Strange - I installed this hack yesterday (2002-04-30) and had a look at my memberlist to see if it worked, but I couldn't see any one who had joined for "Today" or "Yesterday".

I then had a look at it again this morning (2002-05-01) and those that registered yesterday i'm seeing them as being registered "Today" and not seeing anyone as being registered "Yesterday" even though some people have.

My forums can be found at www.webdevforums.com

Any help Big Matt would be appreciated.
Reply With Quote
  #78  
Old 05-01-2002, 10:13 AM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Keith,

I took a look at your members list, and like you, I found that vB was reporting that two people registered Today. But then the next most recent registration is on 26-04-02 (4-5 days ago).

I need some more info to see if there's a problem. Could you post the datestamps from when Lisle and chachet joined, and could you also let me know the timezone of your server?

Thanks,
Matt

http://www.webdevforums.com/memberli...hat=datejoined
Reply With Quote
  #79  
Old 05-01-2002, 02:06 PM
Aaow AnD wHiTe's Avatar
Aaow AnD wHiTe Aaow AnD wHiTe is offline
 
Join Date: Dec 2001
Location: Barcelona, Spain
Posts: 89
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanx for this great hack, Matt. Is really useful!! Would it be possible to make the word "Today" template-based? Cause we have a Spanish and an English template, and our english users keep seeing "Hoy" (spanish word for "Today") and it's a little confusing

Thanx in advance for your help!! ^__^
Reply With Quote
  #80  
Old 05-01-2002, 05:05 PM
bigmattyh's Avatar
bigmattyh bigmattyh is offline
 
Join Date: Nov 2001
Posts: 141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aaow and White (and anyone else who is interested in a template-based version of this hack):

Here is how to convert this hack so that it uses templates.

First, find this block of code:
PHP Code:
    if ($date==$todaydate) {
      
$date="Today";
    }
    if (
$date==$yestdate) {
      
$date="Yesterday";
    } 
... and replace it with this:
PHP Code:
    if ($date==$todaydate) {
      eval(
"\$date= " ".gettemplate('today')."";");
    }
    if (
$date==$yestdate) {
      eval(
"\$date= " ".gettemplate('yesterday')."";");
    } 
Then create 2 custom templates, called "today" and "yesterday". Within these templates, just type the word you want to appear for today and yesterday. You can do this for as many template sets as you want -- vB will pick the right one from the current style setting.

Hope this helps,
Matt
Reply With Quote
  #81  
Old 05-03-2002, 01:17 PM
inetd inetd is offline
 
Join Date: Nov 2001
Posts: 332
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

[high]* inetd click install button [/high]
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:17 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.04886 seconds
  • Memory Usage 2,322KB
  • 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
  • (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