PDA

View Full Version : Yesterday/Today Datestamp Hack


Pages : [1] 2

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 (https://vborg.vbsupport.ru).

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

Extra features:
Template-based version (https://vborg.vbsupport.ru/showthread.php?postid=246614#post246614): 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.)

Change "You last visited:" to the "Today 08:33PM" format (https://vborg.vbsupport.ru/showthread.php?postid=247456#post247456): Due to the way vB was coded, this does not happen by default. Follow the instructions in this link to make this change.

Change the date style to "Today, at 08:33 PM" (https://vborg.vbsupport.ru/showthread.php?s=&postid=247485#post247485)
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:
To modify forumhome.php: Follow the instructions here (https://vborg.vbsupport.ru/showthread.php?s=&postid=253266#post253266)
To modify forumdisplay.php: Follow the instructions here (https://vborg.vbsupport.ru/showthread.php?s=&postid=254532#post254532)
Comments and criticism are always welcome.
Please click the install button (https://vborg.vbsupport.ru/misc.php?s=&action=install&threadid=34527) 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
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
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!

bigmattyh
02-26-2002, 02:44 PM
Originally posted by Lucky
Any chance of getting this hack to work for all instances, such as You last visited: 02-26-2002 12:43 AM.Lucky:

This instance requires on additional hack. Here it is:

In index.php, around line 250, find this block of code:
if (isset($bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
$userlastvisit=$bbforumview[$forum['forumid']];
} else {
$userlastvisit=$bbuserinfo['lastvisit'];
}
After this block, just insert the following line:
$bbuserinfo['lastvisitdate'] = vbdate($dateformat, $bbuserinfo['lastvisit']);
This should fix this particular instance. Thanks for the tip!

Slowly but surely, the exceptions to this hack are finding there way out of the woodwork. There shouldn't be more than one or two more after this one -- if any.

r.cakir
03-07-2002, 08:21 AM
Hello bigmattyh
Maybe you can help me with this odd problem: I can't use the attached zip-file in your first post. After it's downloaded, decompressed and opened in a Editor (BBEdit) I see only unusable code. I use Mac OS X 10.1.3 and I don't have problems with all other downloads on this Board, except for this one.

It's possible for you to send me the file with Email (rcakir@osxserver.ch) ?

Thanks!

Kohhal
03-08-2002, 10:03 AM
Originally posted by Lucky
Any chance of getting this hack to work for all instances, such as You last visited: 02-26-2002 12:43 AM.

I want to get this working too but instead of it showing "You last visited: Today."(which the additional hack you supplied does) I want it to show the time too ie. "You last visited Today 12:43 AM."
Is this possible? How do I do it?

Cheers,

G :)

Ps. Great hack :up:

bigmattyh
03-08-2002, 05:43 PM
Thanks for the thumbs up!

Here's how you do what you're looking to do. By the way, this isn't directly related to my hack, but it does get the job done.

In index.php, around line 260, you'll see this line:
$bbuserinfo['lastvisitdate'] = vbdate($dateformat, $bbuserinfo['lastvisit']);
Immediately after it, insert this line:
$bbuserinfo['lastvisitdate'] .= " at " . vbdate($timeformat, $bbuserinfo['lastvisit']);
And you're set. I think you can probably figure out how to customize this. For example, if you want it to say, "You last visited Today, at 8:33 PM", you'd just insert a comma before the " at " in the above line.

That's it. :)

Okiewan
03-08-2002, 09:15 PM
Very nice.. thank you!

sTive
03-10-2002, 02:29 PM
Is there anybody who tried to use it under vb2.2.3b ?

bigmattyh
03-10-2002, 06:51 PM
I haven't installed vB 2.2.3 -- mostly because I don't want to upgrade now and then have to upgrade again when vB 3 comes out (hopefully next month).

Are you having problems with the hack under 2.2.3? If so, I can try to look into it for you.

FWC
03-10-2002, 10:49 PM
Originally posted by bigmattyh
Are you having problems with the hack under 2.2.3? If so, I can try to look into it for you. I upgraded from 2.2.2 to 2.2.4 this morning and this hack is working fine.

Recon_Boy
03-11-2002, 02:12 AM
Originally posted by FWC
I upgraded from 2.2.2 to 2.2.4 this morning and this hack is working fine.

Same here.

Kohhal
03-11-2002, 08:49 AM
Originally posted by bigmattyh
...Here's how you do what you're looking to do...
Perfect, thanks a lot. Installed perfectly :)

mersey
03-11-2002, 10:04 AM
very nice cheers m8 :)
im on 2.2.4 np here :)

sTive
03-12-2002, 10:26 AM
I have it working now. Thanks a lot ;)

JulianD
03-15-2002, 01:57 AM
Working sweet here with 2.2.4

cerebro
03-16-2002, 06:53 PM
Nice Hack!...i traslate to spanish...jejeje really easy

bigmattyh
03-16-2002, 11:13 PM
Wow... English, German, and now Spanish!

Cool.

julius
03-18-2002, 01:47 PM
It would possible to change only the date color instead of changing with "Today" and letting yesterday date inaltereded by the code?
This to left the index page well formatted in the lastpost column.

Destee
03-18-2002, 04:15 PM
Another Happy Camper ... 2.2.4 ... Thank You Bigmattyh.

bigmattyh
03-18-2002, 06:41 PM
Originally posted by julius
It would possible to change only the date color instead of changing with "Today" and letting yesterday date inaltereded by the code?

That sounds interesting... If I get some free time this week, I'll write it.

julius
03-18-2002, 10:00 PM
Thanks! :)

LamBras
03-21-2002, 03:11 PM
I want to use this hack on a German board, and everytime I try to replace $date="Today"; with $date="heute"; I get a parse error.
What do I miss?

Thanks.

bigmattyh
03-21-2002, 03:37 PM
I'm not sure why you'd be getting a parse error, unless you made some sort of mistake when editing the code. The lines should read exactly like this:

if ($date==$todaydate) {
$date="heute";
}

PS -- I'll be out of town for a couple of days, so anyone needs support, hold tight until Saturday!

Kohhal
03-22-2002, 10:31 AM
Originally posted by LamBras
I want to use this hack on a German board, and everytime I try to replace $date="Today"; with $date="heute"; I get a parse error.
I had a similiar problem. I wanted to replace "Today" with "Today at" and couldn't get it to work either :disappointed:
I'd be interested to know what's going wrong?

LamBras
03-22-2002, 11:10 AM
There might be a fixed length needed?

When replacing "today" with "heute", all is well.
When replacing "yesterday" with it's German correspondant "gestern", there occurs an error. When I chose " gestern" (mark the two leading blanks), all is well again.

Strange, maybe someone can enlighten us?

bigmattyh
03-23-2002, 05:43 AM
TheMasterG, LamBras:

I can't seem to replicate this problem on my own board.

What version of PHP are you running?

LamBras
03-23-2002, 08:06 AM
4.0.6

bigmattyh
03-23-2002, 02:34 PM
Well, honestly, I'm stumped. There should be no reason that you can't change what's in the quotes for $date="".

Stumped, I tells you. Stumped.

LamBras
03-23-2002, 04:04 PM
I can change it, but it must have the same length as "today" and "yesterday". Well, the workaround is using blanks. :)

r.cakir
03-24-2002, 03:38 PM
I use this hack also on a german Board. Without any problems. :surprised:

Hubsi
03-30-2002, 07:00 AM
thx for this hack, great work ;)

Hubsi

pHAZE_1
04-19-2002, 03:23 AM
it doesnt work.. i did everything correct twice and nothing shows up. ????

bigmattyh
04-20-2002, 05:59 PM
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.

Chris M
04-20-2002, 06:10 PM
Das hack war sehr gut...

It works on 2.2.5...

I am living proof of that:D

*Holy Cr*p - Heart Attack :confused:*:):D

Satan

UGate
04-28-2002, 11:05 PM
Wie kann ich Today in einer Farbe machen z.b.rot

Today in red ?

Hubsi
04-28-2002, 11:17 PM
wie w?rs mit z.b.

$date="<font color=red>Heute</font>";

;)

HyperS
04-29-2002, 01:35 PM
Great Hack man! Superb work.

KeithMcL
05-01-2002, 07:36 AM
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.

bigmattyh
05-01-2002, 10:13 AM
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/memberlist.php?s=&what=datejoined

Aaow AnD wHiTe
05-01-2002, 02:06 PM
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!! ^__^

bigmattyh
05-01-2002, 05:05 PM
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: if ($date==$todaydate) {
$date="Today";
}
if ($date==$yestdate) {
$date="Yesterday";
}... and replace it with this: 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

inetd
05-03-2002, 01:17 PM
* inetd click install button :)

Sinecure
05-03-2002, 01:48 PM
I found a small request I'd like for this hack, but I don't know if its possible. I noticed that on $bbuserinfo[lastvisitdate] the date shows up without the Today or Yesterday timestamp. Is it possible to hack the code so that the date given by this will display the today/yesterday plus the time? It already shows the date last visted and than the time, so the only thing that would need to be changed would be the actual way the date is outputed.

I'd take a screenshot and show you, but I'm using this code on my design for PJ v3 so, well, you get the piucture :)

Hopefully someone can take a look at this ;)

KeithMcL
05-03-2002, 03:36 PM
Hi Matt,

People are now showing as registering as "Today" and "Yesterday" fine. I think I thought they weren't showing properly because I have my timestamp set a different time than the time on server.

Thanks anyway Matt - Great Hack!

bigmattyh
05-03-2002, 08:45 PM
If you want $bbuserinfo[lastvisitdate] to follow the "Today 8:33 AM" format, here's how:

1) In index.php, around line 65, find:} else {
$welcometext = "";
eval("\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logincode')."\";");
}
2) Just after it, add this line:

eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");


Note: to change this to the "Today at 8:33 AM" format, go here (https://vborg.vbsupport.ru/showthread.php?postid=247456#post247456).

bigmattyh
05-03-2002, 09:08 PM
Screenshot:

Sinecure
05-03-2002, 10:14 PM
Would it be possible to make it so it says "Today at 04:47", with the AT in there for gramatical purposes? If its not to much trouble that is?

bigmattyh
05-03-2002, 10:22 PM
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:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

That's all!

Sinecure
05-04-2002, 02:28 AM
Worked Perfectly, Thanks!
BTW, great hack, totally usefull :)

inetd
05-04-2002, 04:29 AM
bigmattyh, good addon :) Add this for first post :)

bigmattyh
05-04-2002, 12:18 PM
Originally posted by inetd
Add this for first post :)

Good idea. And so it shall be done.

FWC
05-04-2002, 06:49 PM
That is a nice addon, bigmattyh. :cool:

Sinecure
05-04-2002, 07:51 PM
I think this hack should be incorporated into vb3. It makes it a lot easier to quickly judge when the post was made, which I find VERY usefull!

bigmattyh
05-06-2002, 07:11 AM
You'd think it would have been something they thought of from the beginning. Part of the reason why I've released so many mini-modifications (like I posted on the previous page) is that the code isn't completely consistent.

Hey, maybe vB3. :)

ZiRu$
05-06-2002, 08:32 PM
I installed this hack BUT when a post was yesterday or today on the forum home there not to the RIGHT like the normal time stamp. Anyone know how to fix this?

Aaow AnD wHiTe
05-07-2002, 03:16 AM
Thanx for your reply, Matt!! :) We will try it later and let you knwo how it goes. BTW Sinecure, 100% agree with you, this should be incorporated in vb3!

bigmattyh
05-07-2002, 03:21 AM
Originally posted by Hot Dogg
I installed this hack BUT when a post was yesterday or today on the forum home there not to the RIGHT like the normal time stamp. Anyone know how to fix this?

I don't know what could be causing your dates to be shifting, but I also can't tell what exactly you're talking about because your forums are closed to the public.

Take a look in your forumhome and forumdisplay templates and find the 'last post' columns (they're in the forum...bit templates) . Make sure that table cell containing the last post information is set to <td align="right>.

ZiRu$
05-09-2002, 01:53 AM
Originally posted by bigmattyh


I don't know what could be causing your dates to be shifting, but I also can't tell what exactly you're talking about because your forums are closed to the public.

Take a look in your forumhome and forumdisplay templates and find the 'last post' columns (they're in the forum...bit templates) . Make sure that table cell containing the last post information is set to <td align="right>.

here's what it looks like.......

ITs the TODAy thats not on the right

bigmattyh
05-09-2002, 02:44 AM
So, do you want it like this?

Boofo
05-09-2002, 03:27 AM
Is there a way to add the word "at" between the lastpostdate and lastposttime without it saying "Never at" when there is not a lastpostdate and lastposttime (like in the profile menu)?

inetd
05-09-2002, 12:49 PM
Originally posted by Hot Dogg


here's what it looks like.......

ITs the TODAy thats not on the right I have this problem too. How fix it? :(

bigmattyh
05-11-2002, 10:01 AM
I'll have to look into this ("Today" being on the right).

Are you saying that you want "Today" to be on the left? Like o8:33 PM Today?

inetd
05-11-2002, 10:53 AM
bigmattyh, no. "Today" not right in table...

Sinecure
05-11-2002, 07:58 PM
I think they are confused Matty. The table "BY DEFAULT" is aligned right. To you it looks like its aligned left because without the "today" or "yesterday" time stamp the content fills the entire cell, thus the reason you think its aligned left.

I beleive thats what they are trying to say. They would have to modify the forumdisplay_forumlists template and align that cell right.

ZiRu$
05-12-2002, 09:02 PM
Originally posted by Sinecure
I think they are confused Matty. The table "BY DEFAULT" is aligned right. To you it looks like its aligned left because without the "today" or "yesterday" time stamp the content fills the entire cell, thus the reason you think its aligned left.

I beleive thats what they are trying to say. They would have to modify the forumdisplay_forumlists template and align that cell right.

thats right....look at it...its not on the RIGHT.....like the original

Sinecure
05-13-2002, 01:03 AM
It looks to me like the today is aligned on the right?

ZiRu$
05-18-2002, 12:57 PM
Originally posted by Sinecure
It looks to me like the today is aligned on the right?


it is....but not on the VERY RIGHT.....like the normal one....look at the pic....look at the distance

bigmattyh
05-18-2002, 11:15 PM
There was a discussion about this alignment issue here (https://vborg.vbsupport.ru/showthread.php?postid=216409#post216409).

Matt

Boofo
05-19-2002, 12:03 AM
Well, I can't seem to make the " at " work now and the code is in there. Also, I can't get it to show for the last time you were on part of it. The code is there too, but it still shows the date, even when it is today or yesterday. Any ideas?

bigmattyh
05-19-2002, 12:33 AM
The instructions to make the "at" are here (https://vborg.vbsupport.ru/showthread.php?postid=247485#post247485).

The instructions to make the date work for "last visited" are here (https://vborg.vbsupport.ru/showthread.php?postid=223649#post223649).

Boofo
05-19-2002, 01:25 AM
Tried both of them and didn't work. It worked at one time, I know, but it sure isn't wotking now. It shows the today and yesterday in the last post fine (but with no "at") but not the welcome back info. Any other ideas? :)

Fatty_Bolger
05-19-2002, 03:49 AM
Thanks ever so much for this most excellent hack!! Very easy instructions, installed and functioning!! whoo hoo!

bigmattyh
05-19-2002, 04:08 AM
Boofo: I'm afraid I don't know why it wouldn't be working. I would suggest removing the hack and then re-installing it, and then see if that works!

Boofo
05-19-2002, 04:42 AM
It works, it just doesn't show the "at" or work with the last time on thing. It shows today and yestereday every where else it is supposed to. I tried un-installing and re-installing, and it still does the same thing. There must be another hack messing with it, but I can't figure out what it would be or where it would be at. If you want to look at any files or anything, let me know. :)

ZiRu$
05-22-2002, 03:07 AM
I changed this


<td nowrap align="right"><smallfont>$thread[lastreplydate] <font color="{timecolor}">$thread[lastreplytime]</font><br>by <a href="member.php?action=getinfo&find=lastposter&threadid=$thread[threadid]"><b>$thread[lastposter]</b></a></smallfont></td>


to


<td nowrap align="right" width="100%"><smallfont>$thread[lastreplydate] <font color="{timecolor}">$thread[lastreplytime]</font><br>by <a href="member.php?action=getinfo&find=lastposter&threadid=$thread[threadid]"><b>$thread[lastposter]</b></a></smallfont></td>


and it never worked

bigmattyh
05-22-2002, 03:20 AM
If your dates are not aligning correctly in forumhome.php, change the first line of the forumhome_lastpostby template to this:
<table cellpadding="0" cellspacing="0" border="0" id="ltlink" align="right"><tr align="right">

ZiRu$
05-25-2002, 04:37 AM
Originally posted by bigmattyh
Try changing the first line of the forumhome_lastpostby template to this:


worked perfect! Thanks alot :)

inetd
05-25-2002, 07:45 PM
bigmattyh, please help with align in forumdisplay. How template need changed?

bigmattyh
05-25-2002, 08:01 PM
I just looked at your forums, and it looks like the dates are aligning correctly.... If there still is a problem, try the template change I listed here (https://vborg.vbsupport.ru/showthread.php?postid=253266#post253266), or show me what you mean with a screen shot.

inetd
05-25-2002, 10:29 PM
bigmattyh, yes, i changed forumhome and all right on vb Main Page. But i need correct align in forumdisplay.
You understand me?

bigmattyh
05-25-2002, 11:11 PM
If your dates are not aligning correctly in forumdisplay.php, follow these instructions to fix them:

In the template forumdisplaybit, right after $threadrating find: <td bgcolor="$backcolor">
<table cellpadding="0" cellspacing="0" border="0" width="100%" id="ltlink"><tr align="right">Replace that code with this:
<td bgcolor="$backcolor">
<table cellpadding="0" cellspacing="0" border="0" id="ltlink" align="right"><tr align="right">

inetd
05-25-2002, 11:27 PM
Yahoo!
Work's great! bigmattyh - the best hacker!
* inetd clap one's hands :D

bigmattyh, please update hack with this changes

bigmattyh
05-26-2002, 12:14 AM
Thanks, inetd. The instructions have been edited in the first post, to reflect all the little add-ons here and there.

Velocd
05-26-2002, 12:21 AM
Just wanted to say excellent hack, makes things much more user-friendly ^_^

mjames
05-28-2002, 03:55 PM
Awesome hack, worked like a charm. :)

bigmattyh
05-30-2002, 02:39 AM
Thanks!

:bunny:

John F
05-30-2002, 04:57 PM
Excellent hack. I love it...but, there's a problem with posts containing polls.

The date displayed on the main forums page is showing "today" or "yesterday" when the last post could have been weeks ago.

Has anybody else spotted this and if so, is there a solution (even if i could stop the hack working for polls i'd be happy)?

Boofo
05-30-2002, 05:05 PM
I don't see that happening on my site. It works as it should in the poll areas as well and the other areas. Sorry. :)

John F
05-30-2002, 05:14 PM
I'm using version 2.2.5 - the problem is viewable at http://www.radiowavesforum.com/rw/index.php

bigmattyh
05-30-2002, 05:16 PM
I don't believe this is a problem with this hack. :) It looks like the issue on your board has to do with the dates for polls being stored incorrectly. This hack only formats the existing dates in the system so that they turn into "Today" or "Yesterday".

I have no idea what could be causing your particular problem, but I'd suggest that you take a look at any hacks you have that have anything to do with polls or new threads.

Also, another tip: Since you haven't yet upgraded to 2.2.6, when you do, install your hacks one at a time, and see if the problem persists. Of course, your dates will still be messed up (because they've been stored incorrectly), but you can test it out on a fresh test board, or in a private testing forum that you can set up.

Hope that helps.

Boofo
05-30-2002, 05:20 PM
I'm also using version 2.2.5. Have you tried to un-install and re-install the hack? Sometimes that straightens things out. It really shouldn't matter whether the area is a poll area or not. I would say check any hack that you installed that affects the poll area (if you have any that do). I know that's not what you want to hear, but I am at a loss on this one. Maybe the author of the hack has an idea. Sorry I couldn't be of more help. :)

Boofo
05-30-2002, 05:22 PM
I guess I didn't get my message typed as fast as you, bigmattyh. You beat me to the draw. :)

bigmattyh
05-30-2002, 05:22 PM
Originally posted by Boofo
Maybe the author of the hack has an idea. Sorry I couldn't be of more help. :) Ummm.... yeah. Maybe the author has an idea. I wish he would post already.

;)

bigmattyh
05-30-2002, 05:23 PM
Originally posted by Boofo
I guess I didn't get my message typed as fast as you, bigmattyh. You beat me to the draw. :)
They call me quickfingers.

Boofo
05-30-2002, 05:27 PM
Originally posted by bigmattyh

They call me quickfingers.

That's alot better than what they call me. ;)

lordofgun
06-01-2002, 03:27 AM
GREAT JOB! INSTALLED!

bigmattyh
06-02-2002, 02:57 AM
Thanks!

Illuvatar
06-09-2002, 04:06 PM
Well, I wanted to put the welcome/last visit/new posts into a sensible paragraph, the way it is here, so that it looks like this:
Mae Govannen!, Illuvatar
The time now is 02:59 PM.
You last visited: 06-08-2002 02:53 PM.
There have been 1 new posts and 1 updated threads since then.
View New Posts

In order to do this I modified my welcometext template to include the time is and last visited stuff lines that are normally in the forumhome template.

My welcometext now looks like this:
<smallfont>Mae Govannen!, <b>$username</b><br></smallfont>
The time now is $timenow.<br>
You last visited: $bbuserinfo[lastvisitdate].
<br>There have been <b>$getnewpost[posts]</b> new posts and <b>$getnewthread[threads]</b> updated threads since
then.

and the call in forum home looks like this:
<td align="right"><smallfont>$welcometext<br><b>$newposts</b></smallfont></td>
</tr>


My index.php file still has the code to change the $welcometext to read" Today, at blah blah", but it's not working anymore.

I hope I included enough information..hehehe...can someone help me with this? :(

I've been very pleased with this hack, and know it's probably something simple, but these old eyes just aren't seeing it!

Thanks,
Illu

bigmattyh
06-10-2002, 06:01 AM
Thanks for the kind words about the hack! :)

Did you try doing this? https://vborg.vbsupport.ru/showthread.php?postid=247456#post247456

That post explains how to get the "You last visited" date to follow the Today/Yesterday format.

Boofo
06-10-2002, 06:48 AM
Could that be the problem? I moved mine out of forumhome to the other template too. Wouldn't that cause it to stop working right? I akready did everything in the link you posted. :) It has to do with the welcome panel final hack, I think. :)


Originally posted by bigmattyh
Thanks for the kind words about the hack! :)

Did you try doing this? https://vborg.vbsupport.ru/showthread.php?postid=247456#post247456

That post explains how to get the "You last visited" date to follow the Today/Yesterday format.

Illuvatar
06-10-2002, 03:16 PM
but that IS the puzzler now isn't it Boofo? :bunny:

Just like you all I did was template changes, to make the today thing work in the welcome piece only requires a change to the index.php file, and I didn't mess with that.

In fact here is what that piece of the index.php looks like:
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
eval("\$welcometext = \"".gettemplate('forumhome_welcometext')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
eval("\$newposts = \"".gettemplate('forumhome_newposts')."\";");

} else {
$welcometext = "";
eval("\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logincode')."\";");
}
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

I'm thinking that maybe it has to do with the fact that I am now "calling" $welcometext from my forumhome template, but I'm not sure as to why that would affect it. :ermm:

Boofo
06-10-2002, 03:45 PM
Like yours, mine worked before I added the welcome panel final box to the top of my home page. After I moved the code in there, it stopped working in that spot. Everywhere else it seems to be working fine though. I have seen alot of times calling code meant for one place to another place does not always work. I guess that's why you have to edit more than one file most of the time to get some things to work in different places. Hopefully, someone will be able to come up with a fix for this somehow. :)

By the way: My code looks exactly like yours here, so that should tell us something, huh? :)

Originally posted by Illuvatar
but that IS the puzzler now isn't it Boofo? :bunny:

Just like you all I did was template changes, to make the today thing work in the welcome piece only requires a change to the index.php file, and I didn't mess with that.

In fact here is what that piece of the index.php looks like:
$getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'");
if ($bbuserinfo['userid']!=0) {
$username=$bbuserinfo['username'];
eval("\$welcometext = \"".gettemplate('forumhome_welcometext')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
eval("\$newposts = \"".gettemplate('forumhome_newposts')."\";");

} else {
$welcometext = "";
eval("\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
eval("\$logincode = \"".gettemplate('forumhome_logincode')."\";");
}
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

I'm thinking that maybe it has to do with the fact that I am now "calling" $welcometext from my forumhome template, but I'm not sure as to why that would affect it. :ermm:

Illuvatar
06-10-2002, 04:02 PM
Well Boofo, the only difference between you and I is that you've applied that welcome panel hack, and I kinda thought that having an avatar displayed on the main board would take away form the look that we're trying to achieve, so I didn't apply it.

All I really wanted was for the welcome area to read more like a paragraph. :classic: I'm kinda wierd that way, but i feel that if it's gonna be something that my users are looking at regulary, I want it to flow right.....hehehe Take a look ifin you like, I think it's just about there!!http://warofthering.net/forums/vbulletin225/upload/index.php?s

and yes, I soooo hope someone can find a simple fix for this, we're going to be going live here in a week or so, and I need to be done with the forums bit so that I can focus on remainder of the site. The thing that gets me is that it's probably right there, and I'm just not php literate enough to see it!! :cross-eyed:

Boofo
06-10-2002, 04:23 PM
True, we did it a little different but basically the same. We moved the information to a new template and now it doesn't work for us. :)

I just checked out your site and now I'm jealous. :) How did you get your page to be so wide that it almost takes up the whole screen (left to right)? I have mine set at 100% and I still have room left on both sides. :)

I like the movie your site is about and can't wait for the DVD. :)

If you have any free ideas floating around, I'd be interested in hearing them. You seem like you have got it all together over there. :)

Originally posted by Illuvatar
Well Boofo, the only difference between you and I is that you've applied that welcome panel hack, and I kinda thought that having an avatar displayed on the main board would take away form the look that we're trying to achieve, so I didn't apply it.

All I really wanted was for the welcome area to read more like a paragraph. :classic: I'm kinda wierd that way, but i feel that if it's gonna be something that my users are looking at regulary, I want it to flow right.....hehehe Take a look ifin you like, I think it's just about there!!http://warofthering.net/forums/vbulletin225/upload/index.php?s

and yes, I soooo hope someone can find a simple fix for this, we're going to be going live here in a week or so, and I need to be done with the forums bit so that I can focus on remainder of the site. The thing that gets me is that it's probably right there, and I'm just not php literate enough to see it!! :cross-eyed:

Illuvatar
06-10-2002, 05:46 PM
I'm very pleased with the way it's come out as well! :)

We all loved the movie and are a bunch of Tolkien freaks. :p

And the forum is only just a piece, we've got a lot of sections, concerning artwork, the books, an armoury, etc....

As far as width, we have both the main table and content table to 100%, and our forum title width is 1000, we also have textarea widths at the bottom as IE 4+ = 70, Netscape Nav 4+ = 50, and Netscape 6+ = 40.

Hope this helps.


Illu

bigmattyh
06-10-2002, 10:26 PM
Hey guys,

Try adding this line just before the block of code you posted:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");I just tried it on my board, and it works. :)

Illuvatar
06-10-2002, 10:33 PM
You put that immediatly before the $getnewposts, so that it's there AND in the $welcometext if then else statement below?

Boofo
06-10-2002, 10:36 PM
You da Man! Finally, it is working again. :) Do we need to take that code out AFTER that block then or do we need to leave it in there too? (It's the same code). And thanks for the fix, sir! :)

Originally posted by bigmattyh
Hey guys,

Try adding this line just before the block of code you posted:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");I just tried it on my board, and it works. :)

Illuvatar
06-10-2002, 10:40 PM
My bunny is a jumpin!!

I answered my own question and just did as you suggested!! And it works like a charm!!

Boofo......it appears that since we did what we did, that it became one of those funky code placement issues. Outside of the if-then-else statement it works just fine. And yes!! Delete the dupe code!! In fact I just moved mine from where it was to above the $getnewpost, and SHAZAM! :D

Thanks Bigmattyh!! It's folks like you that keep me coming around and keep my board looking sharp!!


Illu

Boofo
06-10-2002, 11:09 PM
I got you beat! I moved mine above the $getnewthread (which was above my $getnewposts). :lick: Does that mean I win because mine is higher? :)

All seriousness aside, thanks to both of you, bigmattyh and Illuvatar. bigmattyh for figuring out the fix for it (which I always knew you could and would) and Illuvatar for stepping forward and helping convince them that it wasn't just me having problems. :)

bigmattyh, will this work there even if I didn't move the stuff out of forumhome? If so, you might want to change your original file to reflect that so you won't have to run into this again form the newbies later on down the road.

Thanks again, guys! And illuvatar, I would still like to get a few ideas from you about my site. I can use all of the help I can get. :) PM me if you're interested.

Originally posted by Illuvatar
My bunny is a jumpin!!

I answered my own question and just did as you suggested!! And it works like a charm!!

Boofo......it appears that since we did what we did, that it became one of those funky code placement issues. Outside of the if-then-else statement it works just fine. And yes!! Delete the dupe code!! In fact I just moved mine from where it was to above the $getnewpost, and SHAZAM! :D

Thanks Bigmattyh!! It's folks like you that keep me coming around and keep my board looking sharp!!


Illu

bigmattyh
06-10-2002, 11:10 PM
Originally posted by Boofo
Do we need to take that code out AFTER that block then or do we need to leave it in there too? (It's the same code). Just take it out. That line of code has to be parsed BEFORE the welcometext template is set (or wherever you use the $bbuserinfo['lastvisitdate'] variable), so any time you use it afterwards is just wasted code.

Thanks for the enthusiasm, guys. :)

bigmattyh
06-10-2002, 11:13 PM
Originally posted by Boofo
bigmattyh, will this work there even if I didn't move the stuff out of forumhome? I'm not sure, but I don't have a whole lot of time right now to look into it or fix anything. So hopefully the newbies will look at this stuff!

Keyser S?ze
06-16-2002, 06:45 PM
running 2.2.6 here, its installed, but still the dates dont show up right, worked great in 2.2.5 but now that i upgraded wont work

i see it working here in 2.2.6 was anything special done to get it to work?

FWC
06-16-2002, 07:16 PM
Originally posted by IceMalee
running 2.2.6 here, its installed, but still the dates dont show up right, worked great in 2.2.5 but now that i upgraded wont work

i see it working here in 2.2.6 was anything special done to get it to work? I didn't have to change anything from 2.2.5 to 2.2.6 with this hack. It worked fine with both versions.

bigmattyh
06-16-2002, 08:14 PM
Originally posted by IceMalee
running 2.2.6 here, its installed, but still the dates dont show up right, worked great in 2.2.5 but now that i upgraded wont workHey IceMalee,

I checked out our forums via your www link -- the dates and times seem to be working all right... is there some other problem going on?

xug
06-19-2002, 04:35 AM
Since I have installed this hack my 'maxloggedin' in messed up!

What could be the problem??

Boofo
06-19-2002, 04:40 AM
Just to show you what I still don't know about vbulletin, what is "maxloggedin" and where do you use it? :)

Originally posted by xug
Since I have installed this hack my 'maxloggedin' in messed up!

What could be the problem??

xug
06-19-2002, 04:52 AM
In the database the maxloggedin table is now updated constantly, its the place where vB stores the "Most Users ever online"

bigmattyh
06-19-2002, 06:05 AM
Hey xug,

Well, in the 3+ months that this hack has been out, your issue is certainly a first. :)

I'm fairly certain (99.44% sure) that the maxloggedin problem isn't related to this hack. Although I have seen some issue somewhere on this board about your particular problem, I can't remember what the specific issue was.

Try a search here, for maxloggedin. If that doesn't work, try over at vbulletin.com.

Matt

Kars10
07-01-2002, 12:54 PM
Works great!!
Thank you very much! :)

bigmattyh
07-03-2002, 01:02 PM
Danke schoen! I'm glad you like it.

hagi
07-03-2002, 03:25 PM
is their a way where u can code it so if its like date = July 4th, then it shows Independence Day and date = December 25th, then it shows Christmas?

Bugz
07-04-2002, 12:58 AM
UPGRADING FROM VERSION 1:

1. Open functions.php, in your /forum/admin/ directory.
2. Scroll down to around line 1500, where you should find the altered version of the function vbdate (which you modified in version 1 of this hack). This function ends with the following lines:

} else {
$date = date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
}
return $date;
}

3. After this block of code, add the following block:

function vbdatenoty($format,$timestamp) {
global $bbuserinfo,$timeoffset;

return date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
}


when i do this i get this error


Fatal error: Cannot redeclare vbdatenoty() (previously declared in /home/bugz/public_html/vb/admin/functions.php:1633) in /home/bugz/public_html/vb/admin/functions.php on line 1660

i am runnign 2.2.6 php version 4.2.1 . any ideas ?

Bugz
07-04-2002, 03:19 AM
you sould really change the install file that ptoblem i had before.

its already in the code. and because it was in there twice i was getting that error


also my member list sais i reged "Today, at " and thats it any way to fix this ?

http://vb.bugz.m-c-web.com/memberlist.php?s=

Gary King
07-05-2002, 02:41 PM
Nice hack! Gonna install it now :)

bigmattyh
07-05-2002, 02:41 PM
Originally posted by Bugz
Fatal error: Cannot redeclare vbdatenoty() (previously declared in /home/bugz/public_html/vb/admin/functions.php:1633) in /home/bugz/public_html/vb/admin/functions.php on line 1660Hi Bugz,

The function vbdatenoty() isn't a standard vb function, so I'm guessing you probably pasted it twice without knowing it... or something. I made that function up, and named it, so if you didn't paste it twice, some other hack you installed decided to use that same name (although I wouldn't know why).

As for your second post, I can't see what you're talking about. I visited your forums, and the Last Visited date (the only recent date I can get) is working fine.

PeterNRG
07-06-2002, 09:09 AM
As cool as this hack is, I think you can take it a bit further.

I believe that people don't really have an idea how old a post is by looking at a date or timestamp. I think it would be much cooler to give them this kind of information:

1 minute old
5 minutes old
35 minutes old
1 hour old
5 hours old
2 days old
2 weeks old
etc....

Or maybe with the correct date between brackets, like this:
5 minutes old (07-07-2002 15:15).

Another feature of this "TIME POSTED AGO" hack could be that the admin can specify a period of when the normal date should be displayed again. For example, if a post is older than 1 month, then it will not display the '1 month old' message, but simple the date.

I've seen this feature on other boards, take a look for example at http://www.dpreview.com/forums/forum.asp?forum=1002 (it's not a vb board though), it seems like it works very well there, and you get an immediate idea of how old posts are.

What do you think? Am I making any sence ? :)

Bugz
07-07-2002, 07:19 PM
this is my members list looks like when somone regesters on like today.

i made a test user today.

sorry for the image quality im not on my comp and was forced to use MSpaint.

Bugz
07-07-2002, 11:44 PM
Originally posted by PeterNRG
As cool as this hack is, I think you can take it a bit further.

I believe that people don't really have an idea how old a post is by looking at a date or timestamp. I think it would be much cooler to give them this kind of information:

1 minute old
5 minutes old
35 minutes old
1 hour old
5 hours old
2 days old
2 weeks old
etc....

Or maybe with the correct date between brackets, like this:
5 minutes old (07-07-2002 15:15).

Another feature of this "TIME POSTED AGO" hack could be that the admin can specify a period of when the normal date should be displayed again. For example, if a post is older than 1 month, then it will not display the '1 month old' message, but simple the date.

I've seen this feature on other boards, take a look for example at http://www.dpreview.com/forums/forum.asp?forum=1002 (it's not a vb board though), it seems like it works very well there, and you get an immediate idea of how old posts are.

What do you think? Am I making any sence ? :)

i dont know php nor asp but i do know that there totally diffrent type of programming. so i assume it would be maby difficult to do this in a vb (php) prgramming

bigmattyh
07-08-2002, 03:33 PM
It could be done. I'll look at it today, and if it isn't too time-consuming, I'll write a separate hack for it.

Bugz
07-08-2002, 03:45 PM
Originally posted by Bugz
this is my members list looks like when somone regesters on like today.

i made a test user today.

sorry for the image quality im not on my comp and was forced to use MSpaint.
......

bigmattyh
07-09-2002, 09:56 PM
Originally posted by Bugz

...... Yes, I figured that one out. You're only seeing "Today, at ______" because you must have applied the "at" variation to this hack (found here (https://vborg.vbsupport.ru/showthread.php?s=&postid=247485#post247485)) somewhere other than the "Last visited" date.

You can't use the "at" modification within vbdate() itself -- not the way vB is written. You should only use the "at" modification in specific places where you want to see "at". It isn't appropriate in many places because vB only passes a date -- and not a time -- to many displayed dates throughout the system.

Hope that helps.

Bugz
07-10-2002, 12:27 AM
Originally posted by bigmattyh
Yes, I figured that one out. You're only seeing "Today, at ______" because you must have applied the "at" variation to this hack (found here (https://vborg.vbsupport.ru/showthread.php?s=&postid=247485#post247485)) somewhere other than the "Last visited" date.

You can't use the "at" modification within vbdate() itself -- not the way vB is written. You should only use the "at" modification in specific places where you want to see "at". It isn't appropriate in many places because vB only passes a date -- and not a time -- to many displayed dates throughout the system.

Hope that helps.

ill try that out.

Bugz
07-10-2002, 12:46 AM
* Bugz kicks bugz in the ass !

i just relized the member list doesnt show the time they registerd.

lol even after you posted that about the time i didnt understand..

well i put , at in the template after today and such thats why it was showing. :)

good hack

bigmattyh
07-10-2002, 04:35 PM
I'm glad you got it to work. :)

rootnik
07-16-2002, 12:10 AM
This is awesome, thanks bigmattyh!

Martin64
07-17-2002, 07:09 PM
Sweet hack - it's the first one that took less than one minute to implent. :D

* Martin64 clicks install

asweetdeal
07-21-2002, 03:58 PM
Help! I installed the hack and it works wonderfully, and my Mods love it, however, I have now lost the date (not the time) in my posts... what did I do wrong? Using vbulletin 2.5

Thanks!
ASweetDeal

bigmattyh
07-30-2002, 07:11 PM
Hey ASweetDeal,

I'd recommend checking out your templates. This hack doesn't do anything to eliminate the dates from anything, because of the way vB handles dates and times. You might try comparing the templates of the affected areas with the originals and seeing if there are any changes. If that doesn't work, I'll wrack my brain for more. :)

Matt

bigmattyh
08-05-2002, 06:19 PM
Woo hoo!!!

Made it into vB3!!!

Sha na na na na na na na na na! Ka blammo!

Learner29
08-09-2002, 06:34 PM
thank you thank you thank you

I installed this hack and it is straightforward.....

it works very nicely ...

I even translated it and it works on non -english forums.... ;-)

2 X Viverridae
08-14-2002, 01:04 PM
Couldn't wait fer it to come out in vB3 - installed!

Thanks!

Craigr
08-17-2002, 01:52 PM
Excellent hack worked great.

Craig

ExAvIoUr
08-19-2002, 03:46 PM
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:
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?

bigmattyh
08-19-2002, 08:46 PM
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.

Tim Wheatley
08-23-2002, 05:58 PM
Can this be used with 'yesterday' 'today' on 2.2.6?

ExAvIoUr
08-23-2002, 06:44 PM
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?

bigmattyh
08-23-2002, 06:57 PM
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.

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:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");
and turning it into this:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
", at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

Tim Wheatley
08-23-2002, 07:55 PM
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.

Googa
08-23-2002, 08:09 PM
Works well. Good hack! Thanks

ExAvIoUr
08-24-2002, 07:44 PM
the closest thing i have to that is this


$bbuserinfo['lastvisitdate'] = vbdate($dateformat, $bbuserinfo['lastvisit']);
$bbuserinfo['lastvisitdate'] = " at " . vbdate($timeformat, $bbuserinfo['lastvisit']);


is that it. and where do i put that.

ExAvIoUr
08-26-2002, 10:49 PM
bump

bigmattyh
08-26-2002, 10:51 PM
Originally posted by ExAvIoUr
the closest thing i have to that is this


$bbuserinfo['lastvisitdate'] = vbdate($dateformat, $bbuserinfo['lastvisit']);
$bbuserinfo['lastvisitdate'] = " at " . vbdate($timeformat, $bbuserinfo['lastvisit']);


is that it. and where do i put that. I don't know what you're trying to do. What's the problem?

ExAvIoUr
08-26-2002, 11:02 PM
i am trying to get the word at in there. so it couls say yesterday "AT" blah blah. in the forumhome.

i am trying to find this code:


eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");


the closest that i have is this:

$bbuserinfo['lastvisitdate'] = vbdate($dateformat, $bbuserinfo['lastvisit']);
$bbuserinfo['lastvisitdate'] = " at " . vbdate($timeformat, $bbuserinfo['lastvisit']);


do u get it

Boofo
08-26-2002, 11:11 PM
Change this:

$bbuserinfo['lastvisitdate'] = vbdate($dateformat, $bbuserinfo['lastvisit']);
$bbuserinfo['lastvisitdate'] = " at " . vbdate($timeformat, $bbuserinfo['lastvisit']);

to this:

eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

ExAvIoUr
08-26-2002, 11:18 PM
i changed it and its the same. no change to it.

i will check it over to make sure i have done it right.

bigmattyh
08-26-2002, 11:19 PM
Okay.

You aren't supposed to be looking foreval("\$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.

Boofo
08-26-2002, 11:20 PM
Make sure you have it right below this:

// if user is know, then welcome

Boofo
08-26-2002, 11:24 PM
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. :)

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.

ExAvIoUr
08-26-2002, 11:36 PM
bigmattyh, u lost me with ur post. what exactly am i suppose to do?

bigmattyh
08-26-2002, 11:51 PM
We'll do this like a choose-your-own-adventure.

#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. (https://vborg.vbsupport.ru/showthread.php?postid=290897#post290897) 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. ;)

ExAvIoUr
08-27-2002, 12:00 AM
in post 86 (https://vborg.vbsupport.ru/showthread.php?postid=247485#post247485) that the one that i want to do.

how do i do it?

bigmattyh
08-27-2002, 12:10 AM
This has officially gotten annoying. How motivated do you think I am going to be to help you if you won't even read the posts I write? Do you think I have hours and hours of free time for which I have no other use than to spend helping people who won't read?

*sigh*

Read the above post. Follow the actions in NUMBER TWO. Click on the link that says "do this." Is that spelled out easy enough for you?

I will not respond to any more of your requests unless you prove that you have investigated the matter further than asking "wut am i doing wrong? thx". YOU HAVE TO PUT FORTH EFFORT HERE, BUDDY. I AM NOT YOUR PERSONAL HELP DESK.

ExAvIoUr
08-27-2002, 12:35 AM
i followed number 2. it failed. as i mentioned b4. then i went to the first post. i went to the link for the "extra feature". i don't have that code in my file. as i said b4. than boofo recommended what to do. i tried it and nothing happend.

so i have read the whole thing.

i have never demanded nething or asked u to help me. but u were kind enuff to do so, so i appreicate what u have done but nothing worked unless i have done something wrong.

DWZ
08-31-2002, 12:52 PM
Hey,

I have this installed on my 2.2.5 board and it was working fine. Today I downloaded 2.2.7 and I have put all my hacks back into the code.

I uploaded the new files to my test server, but whenever I access any file I get:Parse error: parse error, unexpected '}' in /home/dwz/public_html/vbtest/admin/functions.php on line 1763

Warning: Cannot add header information - headers already sent by (output started at /home/dwz/public_html/vbtest/admin/functions.php:1763) in /home/dwz/public_html/vbtest/admin/functions.php on line 1711

Fatal error: Call to undefined function: vbdate() in /home/dwz/public_html/vbtest/admin/sessions.php on line 399When looking at functions.php around that area, I find it's talking about this hack. I have this in functions.php around that area:# Start replaced code for "Yesterday/Today Datestamp Hack" hack
/*REPLACED CODE:
function vbdate($format,$timestamp) {
*/
function vbdatenoty($format,$timestamp) {
# End replaced code for "Yesterday/Today Datestamp Hack" hack
global $bbuserinfo,$timeoffset;

return date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);

}
# Start added code for "Yesterday/Today Datestamp Hack" hack
global $bbuserinfo,$timeoffset, $dateformat, $timeformat;

if ($dateformat==$format) {
$todaystamp=mktime();
$todaydate=date($format,$todaystamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
$yestdate=date($format,(($todaystamp-86400)+($bbuserinfo['timezoneoffset']-$timeoffset)*3600));
$date = date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
if ($date==$todaydate) {
$date="Today";
}
if ($date==$yestdate) {
$date="Yesterday";
}
} else {
$date = date($format,$timestamp+($bbuserinfo['timezoneoffset']-$timeoffset)*3600);
}
return $date;
}That last line there is line number 1763, what I'm having problems with. Line 1711 is:setcookie($name, $value, $expire, $cookiepath, $cookiedomain, $secure);When looking at sessions.php, I find that it's talking about this:// get formatted date/time
if ($bbuserinfo['lastvisit']) {
$bbuserinfo['lastvisitdate'] = vbdate($dateformat." ".$timeformat,$bbuserinfo['lastvisit']);
} else {
$bbuserinfo['lastvisitdate'] = "Never";
}Line 399, what i'm having problems with is the $bbuserinfo['lastvisitdate'] = vbdate($dateformat." ".$timeformat,$bbuserinfo['lastvisit']);part. I know your hack doesn't change sessions.php, but I havn't touched that file with adding in my new hacks.

Any idea?

Thanks :)

Alan

Rock
08-31-2002, 01:33 PM
Thanks alot for this hack m8! :D

KarateKid
08-31-2002, 02:31 PM
could someone fix the problem for 2.2.7 like DWZ showed it?

DWZ
09-02-2002, 10:33 AM
hmmmmm.... I just added in the hack again for the hell of it, and it worked?

Same code and all, well, at least I think it was, and it's working?

oh well, we will see how we go :)

Erwin
09-02-2002, 10:40 AM
I had the same problem when I upgraded - you need to remove the repeated vbdate function to avoid a repeat function error, and watch that each { is closed with a } to avoid the parse error.

:)

KarateKid
09-05-2002, 03:04 PM
@bigmattyh:

Could you please fix the bug, cause I'm using 2.2.7 and need your hack! :)

Best regards

bigmattyh
09-05-2002, 03:45 PM
I don't think there's a bug per se... It sounds like mistakes were made in copying the hack code to the newer files. (Leaving out the opening { bracket would do it.)

If you could post the specific error message PHP is giving you, I can help you out. :)

EDIT: Just to clarify things, all you're doing with this hack is replacing the standard vbdate() function with the new hacked version. And you're adding the vbdatenoty() function. The line numbers change with every version, but the process is essentially the same.

KarateKid
09-05-2002, 08:14 PM
I get many errors:


Parse error: parse error in /forum/admin/functions.php on line 2294

Warning: Cannot add header information - headers already sent by (output started at /forum/admin/functions.php:2294) in /forum/admin/functions.php on line 1591

Fatal error: Call to undefined function: get_bbarraycookie() in /forum/index.php on line 284

Illuvatar
09-06-2002, 07:58 PM
Hey bigmattyh!!!

* Illuvatar moves site to new server, installs 2.2.7, and reapplys this most excellent hack with NO PROBLEMS!!

lol

And get this...

I even modified the code a little cause I liked the "Today, at" in the last visited piece, and I wanted it on my individual forum display as well!

All I did was this:

if ($date==$todaydate) {
$date="Today, at";
}
if ($date==$yestdate) {
$date="Yesterday, at";


and worked like a champ!

Many thanks again!

Illu

Baptizer
09-06-2002, 08:37 PM
Wonder why he didnt add the ", at" that way in the first place...seems easier. I dont know much about code, but is there a reason why he chose to add it the other way? loads faster? god i stupid!

Greystang302
09-08-2002, 08:35 AM
Hi, I am running vB 2.2.7 and I just installed this hack tonight. Everything seems to be working as advertised except for the display in Trilobyte's Welcome Panel hack. I have attached an image to show what the problem looks like.

I followed your instructions in this post (https://vborg.vbsupport.ru/showthread.php?postid=260035#post260035) and it made no difference irregardless of which line I posted it above ($getnewthread or $getnewpost). Any ideas about what could have gone wrong? I followed the instructions to the letter...

bigmattyh
09-09-2002, 11:04 AM
Originally posted by KarateKid
I get many errors...
Open up your functions.php file and post the offending section of it here -- from about line 2292 to 2296. That way I can see what's up.

Wonder why he didnt add the ", at" that way in the first placeI seem to remember that there are some problems with doing it this way. Like on your memberlist page, you might get "Today, at" ... and no time. It's been a while, so I could be wrong.

Greystang302:
I don't have the welcome panel installed on my forums, so I can't troubleshoot this one. It looks like the value for $bbuserinfo[lastvisit] is being replaced elsewhere in the welcome panel code... Can you find a line in that hack that assigns a value to $bbuserinfo[lastvisit]? If so, comment it out (by typing // before any text on that line.

Greystang302
09-09-2002, 12:57 PM
I will check on that after work tonight Matty, I was also looking at the code while eating breakfast this morning and it looks like for some reason some of the edits that I made to the file didn't get uploaded? Not sure what could have happened though...

I will verify this tonight and post the findings. :) Thanks for the help!

Greystang302
09-10-2002, 02:39 AM
Well, I got the hack working again except for the Welcome Panel. I got home from work late so I didn't have time to do anything else otherwise. There is a code difference in the 2.2.7 release, but it's not major. I will post all of this tomorrow, I am beat! Gotta get to sleep for now...

ExAvIoUr
09-11-2002, 06:01 AM
Very nice hack indeed ... simple and works. :)

Wanted to do as many others mentioned and have it display up top also like You last visited: 09-11-2002 01:58 AM

... but I don't have any code matching what you specified in an earlier post in my index.php:

if (isset($bbforumview[$forum['forumid']]) and $bbforumview[$forum['forumid']]>$bbuserinfo['lastvisit']) {
$userlastvisit=$bbforumview[$forum['forumid']];
} else {
$userlastvisit=$bbuserinfo['lastvisit'];
}


or anything close to it .... I have instead:

if (($fview = get_bbarraycookie('forumview', $forum['forumid'])) > $bbuserinfo['lastvisit']) {
$userlastvisit=$fview;
} else {
$userlastvisit=$bbuserinfo['lastvisit'];

thanx for any assistance anyone can offer. :)

Greystang302
09-11-2002, 08:49 PM
That code was one of the differences with 2.2.7 that I mentioned before... it was part of a change to the original code to fix an AOL cookie-dumping problem. I just haven't had a chance to post about it yet. :)

bigmattyh
09-12-2002, 06:01 PM
Okay... I haven't upgraded to 2.2.7 (and I'm not planning to yet!), so I can't say for sure if this will work, but give it a try:

Replace this:
if (($fview = get_bbarraycookie('forumview', $forum['forumid'])) > $bbuserinfo['lastvisit']) {
$userlastvisit=$fview;
} else {
$userlastvisit=$bbuserinfo['lastvisit'];

With this:
if (($fview = get_bbarraycookie('forumview', $forum['forumid'])) > $bbuserinfo['lastvisit']) {
$userlastvisit=$fview;
} else {
$userlastvisit=vbdate($bbuserinfo['lastvisit']);

And then insert $userlastvisit into your template where you want the date to appear.

ExAvIoUr
09-13-2002, 12:24 AM
you ^#^&@^&! you fecked my board!

hehe just kidding m8, thanx for the suggestion. tried it out and got:

Warning: Missing argument 2 for vbdate() in /home/choicein/public_html/forums/admin/functions.php3 on line 1609

sounds simple enugh to do, but beyond me at this point. hehe

bigmattyh
09-13-2002, 08:15 PM
Right... Sorry 'bout that.

Try replacing the 4th line (from my suggestion above) with:
$userlastvisit=(vbdate($dateformat,$bbuserinfo['lastvisit']).", at ".vbdate($timeformat,$bbuserinfo['lastvisit']));

julius
09-15-2002, 08:30 AM
Great Hack!
Thanks.

Areku
09-26-2002, 10:34 AM
/me installed it onto v2.2.0!

AyaRose
09-29-2002, 07:09 PM
It looks like a cool hack , I hope we get this when vb3 comes out

Paul
09-30-2002, 06:48 AM
The "at" addition instructions do not make any sense whatsoever in the context of 2.2.8. What file does this change need to be made? I've searched high and low for that eval statement and I don't see it anywhere.

In index.php, I made the following change:

Find:
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);


And REPLACE with:


// Hack: Today/Yesterday
/*
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
*/
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']) . ", at ";
// End hack: Today/Yesterday hack

bigmattyh
10-02-2002, 07:16 AM
Originally posted by LoveShack
The "at" addition instructions do not make any sense whatsoever in the context of 2.2.8.Yeah, so I've heard.

I won't be much help on this particular issue. Evidently, 2.2.8 changed some things that directly affect the ", at" functioning of this hack, and unfortunately, I don't have the time to investigate.

Talisman
10-14-2002, 01:00 AM
Nice hack, thanks. You made it simple for us to install by being thorough with those updates.

Well done.

bigmattyh
10-14-2002, 11:54 PM
Originally posted by Talisman
Nice hack, thanks. You made it simple for us to install by being thorough with those updates.

Well done. Thanks -- I appreciate that. :)

bigmattyh
11-27-2002, 06:07 PM
I don't like to bump. But it's been over 5 weeks since anyone's posted to this thread.

One last spin around the vB-verse before vB3 makes it obsolete. Huzzah!

N9ne
11-27-2002, 06:41 PM
Question: will this hack work properly under 2.2.8...ie. no innaccuracies in the text, such as some areas not making sense?

Dean C
11-28-2002, 06:47 AM
Yes it works for me on vb 2.2.8 :)

- miSt

Paul
12-02-2002, 05:22 AM
Hi,

When sending a reply to a private message (which automatically quotes the private message), I get the following:


User wrote on Today 1:27 AM:
Hi there. This is a test message.


Before I go opening up the code at 2:30 in the morning, is anyone else experiencing this? :)

Thanks,
Paul

Smoothie
12-02-2002, 05:44 AM
Get the same ;)

KarateKid
12-02-2002, 06:59 AM
Info: it also works with 2.2.9 :)

Xer
12-03-2002, 07:33 AM
o...working on my 2.2.9 vbb
thx hack~

Paul
12-03-2002, 11:06 AM
Originally posted by LoveShack
Hi,

When sending a reply to a private message (which automatically quotes the private message), I get the following:



Before I go opening up the code at 2:30 in the morning, is anyone else experiencing this? :)

Thanks,
Paul

By the way, I did verify that this was in fact a problem with my particular installation. I modified this hack when I installed it so that if vbdate() was passed a third argument, it would behave as it did before the yesterday/today hack was installed.

The argument, in this case doesn't matter--it simply counts--if it's more than 2, the yesterday/today replacement isn't made.

I won't provide the fix here since it doesn't apply to the same code. If you're getting it though, you'll need to make provisions to do the same.

Best wishes,
Paul

*UFA*3M
12-13-2002, 01:46 AM
Installed on 2.2.9 works thanks!!

Trabia
12-21-2002, 05:09 AM
I am a complete newbie to vB hacking and this was the first one I tried, worked a treat on 2.2.9!

Nice clear instructions and does what it says on the tin, thanks for helping a complete lameass gain some confidence (y)

agfisdn
12-28-2002, 05:55 PM
Installed on 2.2.9 in a few secs !

Thanx bigmattyh !

5/5

glas
12-29-2002, 05:50 PM
I'm using 2.2.9...tried installing it but doesn't work...now there's problems.

http://www.charming-holly.com/hhg

Bugz
12-29-2002, 11:36 PM
Originally posted by glas
I'm using 2.2.9...tried installing it but doesn't work...now there's problems.

http://www.charming-holly.com/hhg

uninstall and retry it i just applyed the hack on my new site forums that are not open yet. so i know they work.

i just checked an unhacked version of functions and you souldnt even be near the line 812 with this hack



bigmattyh remember when I was a dip++++ and asked about why it said at, in my member list I figured it was the template way back when right. so when I just installed it I did it again and was gonna post about it but instead I searched for my post and realized what it was. :cheeky: I helped my self lol.

glas
12-30-2002, 12:53 AM
Got it fixed...

drumsy
01-10-2003, 08:45 PM
Anyone have this in another format for download other than .rtf?

Red Blaze
02-24-2003, 02:53 PM
EDIT: Nevermind about the error, it's fixed thanks to my co-admin. The hack works great. :)

Nomb
02-25-2003, 12:00 AM
For the format "Yesterday/Today, at 6:00 pm" in 2.2.8 (Probably the same for 2.2.9) I just changed this (In admin/functions.php):


if ($date==$todaydate) {
$date="Today";
}
if ($date==$yestdate) {
$date="Yesterday";
}


to this:


if ($date==$todaydate) {
$date="Today, at";
}
if ($date==$yestdate) {
$date="Yesterday, at";
}


:D

Great Hack!

jcary
02-26-2003, 07:49 PM
<i>Edited by jcary:</i> Solved my own problem! Great hack!

Thanks.

Josh

julius
02-28-2003, 09:23 AM
When you forward or send a reply to a private message, in the out box and the in box there is
Fw: julius

quote:

julius wrote on Today 11:59 AM:



The "Today" is still there after some days. I think it would be better the date
Fw: julius

quote:

julius wrote on 02-28-2003 11:59 AM:


as when you edit a post.

ChevyMan
03-03-2003, 09:06 AM
I like this but I do not have a date showing now so I cannot change it. Do someone know how to add the date to the last posted?

Gutspiller
03-21-2003, 12:49 PM
05-03-02 at 04:22 PM bigmattyh said this in Post #86 (https://vborg.vbsupport.ru/showthread.php?postid=247485#post247485)
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:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

That's all!

What file is that in? I can't seem to find that code in my function.php
:(

Gutspiller
03-21-2003, 12:50 PM
05-03-02 at 04:22 PM bigmattyh said this in Post #86 (https://vborg.vbsupport.ru/showthread.php?postid=247485#post247485)
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:
eval("\$bbuserinfo[lastvisitdate] = \"".vbdate($dateformat,$bbuserinfo[lastvisit]).
" , at ".vbdate($timeformat,$bbuserinfo[lastvisit])."\";");

That's all!

What file is that in? I can't seem to find that code in my function.php
:(