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)

bigmattyh 01-26-2002 10:00 PM

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.

TheComputerGuy 01-27-2002 10:51 AM

Thanks for a cool hack!

Lesane 01-27-2002 11:00 AM

Great hack, well done. Thnx

Martz 01-27-2002 01:14 PM

Excellent hack :)

Remi 01-27-2002 02:14 PM

well done, thanks :up:

djr 01-27-2002 02:49 PM

Nice and clean! Should be in vB long ago :-) Maybe v3?

- djr

Siggi 01-27-2002 03:46 PM

Great hack, well done. Thnx

:pleased:

fonzerelli_79 01-27-2002 06:06 PM

good work bigmattyh

also, the instructions were very laid out and easy to read

keep em coming big man!!!

FWC 01-27-2002 06:29 PM

Very nice! Thanks. :up:

Nemesis77 01-27-2002 08:41 PM

I replace the code in functions.php but nothing changed still says date and time

bigmattyh 01-27-2002 10:33 PM

I'd be interested to see your board, so that I can help you out.

But I'm sure it isn't www.abcnews.com -- which is what you've listed as your www page.

Nemesis77 01-27-2002 11:53 PM

i don't have a board. I just install hacks and do work for Avenger board called Verbal Warfare.

bigmattyh 01-28-2002 12:02 AM

The hack should work anywhere vbdate() is called. Check to see that it's called in the places that it isn't working. Without seeing your files, I can't diagnose the problem!

Good luck,
Matt

Remi 01-28-2002 02:17 AM

Nemesis77

It is working but the threads in your test forum are older than two dayes.

post a new thread and you will see the hack working perfictly :greedy:

Twig Deez 01-28-2002 02:42 AM

this is just superb. simple, but so effective! thanks! :D

Twig Deez 01-28-2002 05:34 AM

well, here's something i've noticed: see the attachment.

there's now a space between the last post info and lastpost.gif,
whereas before they were tucked in real tight together.
this is the case everywhere -except- the lowest forum in each category,
where the small gap has been maintained.

what is the reason for this, and is there a simple fix?

bigmattyh 01-28-2002 06:05 AM

Twig Deez,

I've looked at your board, and I think that's a template problem with forumdisplaybit. Take a look at that nested table that has the date display info -- and do two things:

1) In the <table> tag, set align="right"
2) Remove width="100%"

That ought to do it, I think.

FWC 01-28-2002 06:21 AM

Quote:

Originally posted by Twig Deez
well, here's something i've noticed: see the attachment.

there's now a space between the last post info and lastpost.gif,
whereas before they were tucked in real tight together.
this is the case everywhere -except- the lowest forum in each category,
where the small gap has been maintained.

what is the reason for this, and is there a simple fix?

I fixed this in the forumdisplay by going to the forumdisplaybit template and adding width="100%" to the <td> for the last post time and poster. I think this will work in all the templates with the nested table for the lastpost.gif.

Twig Deez 01-28-2002 06:37 AM

thanks for checking that for me, bigmattyh;
your fix didn't work, but fwc, yours did! on both forumhome and in forumdisplay.

thank you both for your assistance, i'm now 125% satisfied with this hack! :D

bigmattyh 01-28-2002 06:38 AM

Cool.

FWC 01-28-2002 07:19 AM

I second that cool. :)

Martz 01-28-2002 11:28 AM

1 thing I have noticed is "edited by" messages in the post bit alaso use this time format, and by default it creates a gramatical error:

Last edited by Nickname on Today at 18:38
Last edited by Nickname on Yesterday at 18:38
Last edited by Nickname on 26-01-2002 at 18:38

See what I mean?

bigmattyh 01-28-2002 09:32 PM

I've noticed this issue, and I'm currently working on an upgrade to fix this, so that the replacement is more context-sensitive.

SirSteve 02-01-2002 12:33 PM

Some of my users like it, some don't. Can this be an option in their user cp?

Cluster 02-01-2002 11:02 PM

Quote:

Originally posted by Martz
1 thing I have noticed is "edited by" messages in the post bit alaso use this time format, and by default it creates a gramatical error:

Last edited by Nickname on Today at 18:38
Last edited by Nickname on Yesterday at 18:38
Last edited by Nickname on 26-01-2002 at 18:38

See what I mean?

I, too, am looking forward to a fix for this. The same thing is happening in "Who's Online"'s most-users count.

Other than that, it's a BRILLIANT hack.

Erwin 02-01-2002 11:08 PM

Easy - thanks!

bigmattyh 02-02-2002 12:25 AM

Just to keep you updated, this weekend, I'm going to work on a fix for the issues mentioned above. Specifically, I'll be fixing the problem that causes grammatical errors on some pages.

So if anyone's interested, check back on Monday for a fix!

Recluse 02-10-2002 06:07 AM

its a few days late but did you get it fixed?

Edgar 02-14-2002 07:10 PM

Very effective hack,thanks a lot :)

tanster 02-16-2002 09:37 PM

Works beautifully.

Thank you!
:) Jennie

bigmattyh 02-21-2002 12:04 AM

Hey everybody,

I posted a couple of weeks ago that I would post an upgrade that would fix some of the minor unintended side effects of this hack. For example, the last-edited-by tagline can say "Last updated on Today at 8:32 PM." There are only a few places where this is an issue, but I am about to fix them. I now have the time to do it.

I will post a document with fixes later tonight. :)

Cluster 02-21-2002 12:09 AM

Woohoo! I have been anxiously (but patiently) awaiting this for some time now.

This is the only hack I use on my board.

Thanks a lot for working on it!

bigmattyh 02-21-2002 01:41 AM

The bug has been fixed, and the new release can be downloaded in the first post of this thread.

Enjoy! :)

James Cridland 02-21-2002 08:17 PM

Thank you for that. Actually, I wrote a similar (unpublished) hack for UBB, and always wanted it on vBulletin but didn't have the patience to add it. :)

NYI Fan 02-21-2002 09:25 PM

works great - thanks!

bigmattyh 02-25-2002 04:19 AM

I've got to ask the mods here (and what better place to do it than in this thread) --

Is that my hack you're using on this forum?? If so, :) :) :) :)!

kippesp 02-25-2002 07:10 AM

Looks like this is your hack. I was sure when I saw "by FireFly on Today 02:03 AM"

Lucky 02-26-2002 06:12 AM

Works just fine.

Thank you.

Lucky 02-26-2002 06:15 AM

Any chance of getting this hack to work for all instances, such as You last visited: 02-26-2002 12:43 AM.
To: You last visited: Today 12:43 AM.

Wolf42 02-26-2002 09:51 AM

Works perfectly on my board. Thanks very much!


All times are GMT. The time now is 04:31 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.02922 seconds
  • Memory Usage 1,809KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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