The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#2
|
|||
|
|||
Each thread has a dateline field where the date and time stamp is stored.
In forumdisplay.php look for the line that starts with Code:
$threads=$DB_site->query("SELECT Code:
$threads=$DB_site->query("SELECT thread.dateline AS threadstart, Then look for: Code:
$lastreplytime=date($timeformat,$thread[lastpost]+(($timeoffset+$bbtimezoneoffset)*3600)); Code:
$threadstart=date($timeformat,$thread[threadstart]+(($timeoffset+$bbtimezoneoffset)*3600)); Just a note though. Make sure you back up first because I haven't tested this. Unless there is a syntax error it should work though. |
#3
|
|||
|
|||
Great! Works perfectly.
Only one thing: I wanted both the time and the date. Fortunately, I was able to figure that out based on looking at what you had me doing, and the other stuff around it. The first part of your instructions, the part about thread.dateline, would remain unchanged. The second part is where my modification comes in. Instead of adding Code:
$threadstart=date($timeformat,$thread[threadstart]+(($timeoffset+$bbtimezoneoffset)*3600)); Code:
$threadstarttime=date($timeformat,$thread[threadstart]+(($timeoffset+$bbtimezoneoffset)*3600)); $threadstartdate=date($dateformat,$thread[threadstart]+(($timeoffset+$bbtimezoneoffset)*3600)); I put these in the forumdisplaybit template, in the same column as the thread starter. I changed the font from normalfont to smallfont, and put a linebreak in so the thread starter's name is on one line, and the date and time are on the second line. I also put in the font color tags so the time is a different color, like it is in the last post column (speaking of that column, I also put in a linebreak and switched it to smallfont, so both columns have the same look). The linebreaks are so these columns don't get too wide, which is esp. a problem for those with 800x600 displays, because it compresses the thread name column too much. If you want to see the final result, look here: http://www.jjr512.com/bbs/forumdisplay.php?forumid=1 |
#4
|
|||
|
|||
Looks good. I am glad you got it to work the way you wanted to.
|
#5
|
|||
|
|||
I have noticed a rather odd problem.
For some threads, the start date in the forum list, that shows up from this hack, shows as some date in the year 1901. Now if you go in the thread itself and look at the post date of the first post, it is not 1901, but appears to be correct. So far, I've only seen this happen a few times, and it looks like it's always with threads that were started in the UBB days. It doesn't seem to happen with any threads that were started after migrating to vB. Any comments? Suggestions? Fix ideas? |
#6
|
|||
|
|||
And as someone just pointed out, the start date that you see in the forum view, as a result of this hack, for the threads started in UBB days are all the same: Dec. 13, 1901, at 3:45pm.
So to recap, all threads that were started in the UBB show up with a start date/time as Dec. 13 1901 3:45pm in the forum view, which is what the hack does. The actual date and time, in the actual thread, are correct. Weird. |
#7
|
|||
|
|||
I dont really know. but I think a good reason will be Bug 2000
|
#8
|
|||
|
|||
Since UBB stores all of its contents in HTML format, the import script has to try and interpret what it sees. If you changed the default date format to something the import script doesn't recognize then it will either
1. Interpret it wrong. 2. Not import a valid date which MySQL will not let be inserted into the database. 3. MySQL/PHP will convert the erroneous data into an integer and insert that which will give you false results. 4. PHP will insert a ZERO and is simply displaying the earliest date it know. |
#9
|
|||
|
|||
OK, well, I guess the thing I can't figure out is this.
I thought this hack got its data from the same source as displays the post date in the first post. If you open the thread and look at the first post, you will see that the date is correct. A correct date, in this case, is anything from or after May 17, 2000, which was when the BBS opened (in UBB form). But, out in the forum view, the date is always that 1901 date. If this hack gets its info from the same source, shouldn't the data be the same? Or is the hack mininterpreting the data, or is it getting it from a different source? In either case, could the hack be rewritten so that it either interprets the data correctly, or else gets it from the same source as the date that's displayed in the post itself? Take a look: http://www.jjr512.com/bbs/forumdisplay.php?forumid=2 And set the view to longer than a month, if necessary, and go back to the oldest page. Look at all the thread start dates in the column that normally just has the thread starter's name. Then go into that thread and look at the post date for the first post. They should match; they don't. For any posts started after the vB migration, they do. This is why I'm confused. |
#10
|
|||
|
|||
You asked for thread start date which is different from the date that is saved for a post.
Each are different things. Every new thread creates not only a thread record but a post record. The thread record records information relating to the thread as a whole and is cross-referenced with the actual posts through the threadid. Now without looking at your actual data stored in the database, I can be sure where the problem is. I believe the date can be modified to reflect the date of the first post as opposed to the thread date but I will have to look into it. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|