The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
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:
Please click the install button to show your support. Show Your Support
|
Comments |
#162
|
|||
|
|||
Code:
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); } Code:
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 |
#163
|
|||
|
|||
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= |
#164
|
||||
|
||||
Nice hack! Gonna install it now
|
#165
|
||||
|
||||
Quote:
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. |
#166
|
|||
|
|||
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 ? |
#167
|
|||
|
|||
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. |
#168
|
|||
|
|||
Quote:
|
#169
|
||||
|
||||
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.
|
#170
|
|||
|
|||
Quote:
|
#171
|
||||
|
||||
Quote:
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. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|