![]() |
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! |
Use the function vbdate on the postdate timestamp. That function should be in /includes/functions.php
|
looks like this is over my head, maybe I am lucky and an addon will apear with something similar. Thanks for the help Lynne
|
Exactly where do you want it to be (which template)?
|
I want to use it in postbit_legacy
|
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 |
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.
|
Oops, 'postdate' should have been 'dateline' (in 3 places) - I fixed the code above.
|
1 Attachment(s)
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']); 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 |
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. |
All times are GMT. The time now is 07:00 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|