The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Separate post.postdate
Hy ,
I have a little probleme, I want to put the date of a post on the left of the thread title and I wnat that on 3 lines. the first line to be the day , the second to be the month and the third to be the year. the problem is I dont' know how to separete the post.postdate variable in three parts day , month, year. Or if somoane can give me another ideea how to put the date in three separate lines without puting each part in his own div, table , etc Thanks! |
#2
|
||||
|
||||
Use the function vbdate on the postdate timestamp. That function should be in /includes/functions.php
|
#3
|
|||
|
|||
looks like this is over my head, maybe I am lucky and an addon will apear with something similar. Thanks for the help Lynne
|
#4
|
|||
|
|||
Exactly where do you want it to be (which template)?
|
#5
|
|||
|
|||
I want to use it in postbit_legacy
|
#6
|
|||
|
|||
OK, you could create a plugin using hook location postbit_display_complete and code like this:
PHP Code:
To see what the 'l', 'F', and 'Y' mean and what other things you could put there, see this page in the php manual: http://us2.php.net/manual/en/function.date.php If you haven't created a plugin before, see the vb manual here: https://www.vbulletin.com/docs/html/main/add_plugin |
Благодарность от: | ||
edyy |
#7
|
|||
|
|||
I've created the plugin and it works but it displays the date january 1970, how I make it to show the date of the post.
|
#8
|
|||
|
|||
Oops, 'postdate' should have been 'dateline' (in 3 places) - I fixed the code above.
|
#9
|
|||
|
|||
Works perfect. Thank you for your help.
--------------- Added [DATE]1330369427[/DATE] at [TIME]1330369427[/TIME] --------------- Yes I try to recreate your calendar, I hope you don't mind. The plugin kh99 made works perfect. |
#10
|
|||
|
|||
edyy is hoping to recreate the "Calendar" style date boxes I use on my forum.
Here is exactly what I have at the same hook location: Code:
$post['month'] = date('M', $post['dateline']); $post['month'] = strtoupper($post['month']); $post['day'] = date('d', $post['dateline']); $post['year'] = date('Y', $post['dateline']); Make sure the plugin is at the correct location AND you have it set to "Active". I use it to create the below: Attachment 136723 |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|