Log in

View Full Version : Is there a add on or template for - date for posting a thread


lille L
12-16-2010, 04:53 AM
Yes, my header asks the question.
Is there a add on or template, which fix me a date for posting?

In vb only the date for the last post is showing, I need the info to incl date for original posting.
Today it shows nick, header, and date for last post.

In case some wonder, I mean new post, lastest post lists.
In the bolk at the left side.. (see pic) its only showing header, with the nick underneath.
I wonder if its possible to get the date for posting, at the side of the nick. Just like the bolk at the right, has both date and nick.

BirdOPrey5
12-17-2010, 02:22 AM
This can be done but you need two plugins and a template edit.

First go to Admin CP -> Plugin Manager -> Add a New Plugin

Product: vbulletin
Hook Location: threadbit_display
Title: make threadbit dates
Execution Order: 5
code:

$thread['fdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline']);
$thread['ftime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);

$thread['postdatex'] = $thread['fdate'] .' '. $thread['ftime'];

Set Active to YES

Save The Plugin

Now Add Another Plugin:

Product: vbulletin
Hook Location: search_results_threadbit
Title: make search dates
Execution Order: 5

$thread['fdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline']);
$thread['ftime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);

$thread['postdatex'] = $thread['fdate'] .' '. $thread['ftime'];

Set Active to YES

Save The Plugin

Now edit your threadbit template-
I suggest the following but you can put the date anywhere you want.

Find the code:
<span style="cursor:pointer" onclick="window.open('member.php?$session[sessionurl]u=$thread[postuserid]', '_self')">$thread[postusername]</span>

Right after it add:
- $thread[postdatex]

You can thank Lynne for the plugin code, it was from her mod here (https://vborg.vbsupport.ru/showthread.php?t=229187).

You'll get something like the attached image (without the "ZZ" I forgot to delete that from my code...)

lille L
12-17-2010, 06:37 AM
Oh fantastic !!!! Your are the best ! Thank you, works perfect!



--------------- Added 1292578307 at 1292578307 ---------------

Oh... now I see a bug..

the datestamp shows and works perfect. But it dosent show the original thread postdate. But as the same as in the other bolk. The last post date :)

lille L
12-17-2010, 09:11 AM
As this :)

the wired thing is that the datestamp is correct in CP sub list and inside the forums.
Its only the new post and todays post lists it dosent show correct...

BirdOPrey5
12-17-2010, 11:17 AM
Whoopsie... I forgot all about the search results...

OK, no problem... we need to do a couple things...

First in the plugin you already have we need to change $thread['postdate'] to $thread['postdatex']

Next in the template edit you need to change $thread[postdate] to $thread[postdatex].

Finally we have to add 1 more plugin...

go to Admin CP -> Plugin Manager -> Add a New Plugin

Product: vbulletin
Hook Location: search_results_threadbit
Title: make search dates
Execution Order: 5

$thread['fdate'] = vbdate($vbulletin->options['dateformat'], $thread['dateline']);
$thread['ftime'] = vbdate($vbulletin->options['timeformat'], $thread['dateline']);

$thread['postdatex'] = $thread['fdate'] .' '. $thread['ftime'];

Set Active to YES

Save The Plugin

You should now get the correct dates in both the forums and search results.(Which includes Today's Posts and New Posts). :)

--------------- Added 1292592135 at 1292592135 ---------------

Note: I have updated the original instructions so anyone searching for this later can simply follow the complete instructions in my earlier post, (post #2).

lille L
12-17-2010, 11:34 AM
eh.. thanks... :)
But now is all my threads gone???? All content in the forum :)

lille L
12-17-2010, 11:36 AM
But as you see... its three sites of content... supposed to be.. :p

lille L
12-17-2010, 11:40 AM
Ah... its working :)

I need to keep the postdate in both plugins... and the template. Then its all working :D
postadatex removed all the headliners ? :)

No its perfect everywhere! THANK you so much !