|
#1
|
|||
|
|||
|
Requires question for addon
My new addon requires that exifer be included - which is automatically loaded in the index.php page - problem is, when it is loaded in the addons section of the admin suite, I get an error, because exifer is not included by default by the admin suite. See the problem?
I tried to use the require_once function, which I thought would have loaded exifer only if it wasnt loaded by index.php, and thus would work in the admin suite's addon tab. Guess not..... Fatal error: Call to undefined function: read_exif_data_raw() in D:\inetpub\ibejo\gallery2\addons\fancyarchive.php on line 265 If I include the line require or require once, I get an error in the index.php parsing, but it works fine in the admin suite.....excellent. Any thoughts? |
|
#2
|
||||
|
||||
|
use if (function_exists('functioname')) to check if the function exists or not. if it was not present define it with require_once.
check php manual for function_exists() did you check my portfolio addon at last?
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7 |
|
#3
|
|||
|
|||
|
That did the trick. Excellent! Thanks
|
| Post Reply |
| Thread Tools | |
|
|