The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
vbdate
I want to show date stamp different in postbit. I dont wanna change default date stamp..
So i made plugin. PHP Code:
Any help ? Thanks |
#2
|
|||
|
|||
This line is missing a comma, it should be:
Code:
$tarih = vbdate('m-d-Y', $thread['dateline']); |
#3
|
|||
|
|||
Quote:
result still is: m-d-Y |
#4
|
|||
|
|||
OK, I think the problem is that if you have a language with a locale set, then vbdate uses strftime() to format the date rather than date(), and strftime() uses different format specifications. I think the solution is to set the 4th parameter of vbdate() to 'false' to make it use date(). There's also a 3rd parameter that says whether or not to use "yesterday" and "today" for recent dates, so you have to specify that as well (the default is 'false').
So, try this: Code:
$tarih = vbdate('m-d-Y', $thread['dateline'], false, false); |
#5
|
|||
|
|||
Quote:
10-18-201210-18-2012 |
#6
|
|||
|
|||
Hmm...you're echoing it at the postbit_display_start hook, so it's going to be displayed once per post. (You probably wouldn't want to use echo at all, but I assumed you were doing that as a test).
|
#7
|
|||
|
|||
Yep it's for test. I want to use $tarih in showthread. What do you suggest for <hookname> ?
|
#8
|
|||
|
|||
Maybe try showthread_complete.
|
#9
|
|||
|
|||
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|