Version: 1.00, by bigmattyh
Developer Last Online: Mar 2014
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.
The following are add-ons that may be helpful depending on your specific needs.
Extra features:
Template-based version : Allows you to specify different values for "Today" and "Yesterday" -- useful if you have multiple language style sets on your board. (i.e., you can set the value for today to "Today" in your English style set, and "Aujourd'hui" for your Francais style set.)
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:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
", at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");
You're supposed to be replacing the existing $bbuserinfo[lastvisitdate] lines with that line.
Replace your lines that you have with the above line.
And finally, if you're trying to insert ", at" into every instance where the date is called, this isn't the way to do it. The way to do it is through templates... But you probably know that since you've at least scanned through this thread to find an answer to your question.
That doesn't quite work with ALL of the dates, although most of them can be changed through the templates. The editpost.php is one place for example that you have to change the date and time hardcode to be able to use "at" with it.
Quote:
Originally posted by bigmattyh And finally, if you're trying to insert ", at" into every instance where the date is called, this isn't the way to do it. The way to do it is through templates... But you probably know that since you've at least scanned through this thread to find an answer to your question.
#1: What are you trying to accomplish? If you want to insert ", at" into the "You last visited" line on your index home page, go to #2!
If you want to insert ", at" into other dates -- not just the "You last visited" line, go to #3!
#2: You want to insert ", at" into the "You last visited" line on your index home page. Simple. Just do this. If that fails, re-read the instructions on how to do this. There's a link in the first post of this thread.
#3: You want to insert ", at" into other dates -- not just the "You last visited" line. Then you'll have to learn more. Start by reading through the posts to this thread. For some date conversions, yes, it's necessary to hack the code, but for many of them, you'll have to change your templates, which is very easy to do.
In any case, you need to read through the posts of this thread, because your issue has been brought up about half a dozen times before, and answered. I have faith that you'll be able to figure out not only how this hack works but how to fix it, too. If you still need help after you've read all the posts and you've looked at the code and tried to figure it out, I will be happy to help you further.