The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
I want use date() in Plugin
hi
I Want Replases function date() With jdate() but i insert new plugin and i give error Code:
Fatal error: Cannot redeclare date() in D:\xampp\htdocs\vbulletin\global.php(29) : eval()'d code on line 6 hook = global_start Code:
function date($format, $timestamp = TIMENOW, $doyestoday = false, $locale = true, $adjust = true, $gmdate = false, $userinfo = '') { require_once(DIR . '/includes/jalali.php'); global $vbulletin, $calendarinfo, $vbphrase, $serveroffset, $blog, $start, $forum, $thread; return jdate($format ,$timestamp=' ',$none='' ,$time_zone='' ,$tr_num='fa'); } |
#2
|
|||
|
|||
In php you can't replace a function by providing another implementation. You'll have to find another way to do whatever you're trying to do.
|
#3
|
|||
|
|||
Plz Help
|
#4
|
|||
|
|||
Well, I think most if not all displayed dates in vb use the function vbdate() in includes/functions.php, so maybe you could edit that function and change it to use your date function.
|
#5
|
|||
|
|||
I know this way.
I want to bring a total change in XML for a beginner users need not have to change the functions.php files! --------------- Added [DATE]1339135309[/DATE] at [TIME]1339135309[/TIME] --------------- Please help Give me a way to offer a product I do not need to change the original files --------------- Added [DATE]1339144872[/DATE] at [TIME]1339144872[/TIME] --------------- Please help Give me a way to offer a product I do not need to change the original files |
#6
|
|||
|
|||
Please help
Give me a way to offer a product I do not need to change the original files |
#7
|
|||
|
|||
Sorry, but I really don't think it's possible to replace all date calls in one place without editing the code. Another option would be to find every place that a date is displayed (or at least some important places that you are specifically interested in) and see if you can find hooks that allow you to modify them.
|
Благодарность от: | ||
SANBOR |
#8
|
|||
|
|||
for this
https://vborg.vbsupport.ru/showthread.php?t=284179 Please submit ideas and comments and other way |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|