![]() |
time format?
Ok so with help from staff I was able to change my forums last post time to say "X minutes ago"
So now I want to change this in a older mod I have. The code is like this.... Code:
$gnptime = vbdate('H:i', $gthread[lastpost]); |
Try something like:
PHP Code:
|
so I replace 'timeformat' with what???
BTW thanks for answering ! |
You don't replace it with anything. The variable being used $vbulletin->options['timeformat'] will be in your vBulletin date/time format options.
If you want to learn about the "H:i" modifier characters, view this page: http://us2.php.net/manual/en/function.date.php Have you tried PHP Code:
If you want to do it in a more complicated way it would be: PHP Code:
|
thanks that was what I meant to ask sorry I wasnt more clear.
What im trying to achieve is X minutes ago |
Quote:
|
I know and I did thank you but that didnt do anything.... See I used 'H:i A' BUT It still shows army time. I tried the other guys code and it shows the wrong time.
heres mine..... 21-03, 21:08 PM I want it to look like 21-3, 9:08 PM Lastly I really wanted it to look say it was posted 1 minute ago... 21-3, 1 Minute ago IS this possible? |
That's why I gave you the php manual page, it tells you how to make your own date format string. But since you're too lazy, here...
For "21-3, 9:08 PM" Use: PHP Code:
PHP Code:
|
sorry I am lazy I thought maybe someone knew off the top of their head as ive seen this on many forums. THanks for your hard work. Lately I have been lazy, working alot! thanks!
--------------- Added [DATE]1237755290[/DATE] at [TIME]1237755290[/TIME] --------------- OK I see what u mean by the date thing so I guess I will remove that. Now I tried some of the code without the date thing but that only will show just a comma now? Any idea on that? I have tried the coding found at php website with no good results. |
All times are GMT. The time now is 02:33 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:
|