The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Thread created date -- partially working
Hrm.
This is not displaying on current threads, nor threads that I start, so I thought it was just not working -- BUT -- I just tested the Reported Post Creates Thread hack and it worked on that. When I report a post, it creates the thread and puts the date in place like it should. Bizarre. All this needs to do is display the thread creation date from thread.dateline on FORUMDISPLAY. Can anyone tell me what I am missing here -- perhaps using the wrong hook? Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <plugins> <plugin active="1" product="vBulletin"> <title>Thread Created Date</title> <hookname>threadbit_display</hookname> <phpcode><![CDATA[$threadcreated = vbdate($vbulletin->options['dateformat'], $thread[dateline]) . ' ' . vbdate($vbulletin->options['timeformat'], $thread[dateline]); ]]></phpcode> </plugin> </plugins> |
#2
|
|||
|
|||
Just a wild guess, but you might not have access to the $vbulletin->options['dateformat'] in this function. Check if that is filled.
|
#3
|
||||
|
||||
Well, from what I can see it appears to be. It is called in the query as thread.dateline, which was the same as in the identical query for this in 3.0.x -- no changes to the code other than the naming conventions (forumdisplay.php) for this routine.
I even tried just hacking it to be what is working in 3.0.x, same file, same function, same location -- same code above as I am using in 3.0.x (less the naming convention change). This is in the spot directly before the hook I am trying to use. Am I missing something quite elementary here? <~~ struggling a bit more with the 3.5 code than I did migrating from 2.x to 3.0 |
#4
|
||||
|
||||
Double checked.
It is definitely in the function -- it is used by the announcement date. :/ |
#5
|
||||
|
||||
|
#6
|
|||
|
|||
Did anyone get this working?
Thanks |
#7
|
||||
|
||||
Yep.
Plugin-Titel: name it what you want, e.g. Thread Start Date Hook: threadbit_process Plugin-Code: Code:
if ($thread['dateline']) { $thread['creationdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline'], 1); $thread['creationtime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']); } Code:
$thread[creationdate] |
#8
|
|||
|
|||
Hi - it works perfect, why don't you release it as a hack?
Danke Thomas |
#9
|
||||
|
||||
That's only a part of the bigger hack of kirby, so it's none of my work. Won't be fair to release this as a hack.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|