winstone
01-07-2010, 04:05 AM
Hello,
I'm working on a widget which uses it's own scheduled tasks and currently is in a separate PHP file within root of my forum, I've implemented the vb cache (datamanager, serialize etc) and it's working great, but when I put the whole code inside the PHP Widget, I get following error:
"Fatal error: Cannot redeclare class vB_Bootstrap_Forum in /home/superper/public_html/includes/class_bootstrap.php on line 1443"
The only other way I can put the code into the widget is by making the output of PHP file in Javascript format like bellow and then including the PHP file into a HTML widget like <script src="myPHPfile.php">
my PHP file produces output like bellow
echo 'document.write(" blah blah '.$someVar.' blah blah ");';
Doing it like this does the job, but only for people with Javascript enabled browsers, and there is another problem with search engines not being able to read the output
Any idea how I can put the whole code directly inside the widget?
Thanks
I'm working on a widget which uses it's own scheduled tasks and currently is in a separate PHP file within root of my forum, I've implemented the vb cache (datamanager, serialize etc) and it's working great, but when I put the whole code inside the PHP Widget, I get following error:
"Fatal error: Cannot redeclare class vB_Bootstrap_Forum in /home/superper/public_html/includes/class_bootstrap.php on line 1443"
The only other way I can put the code into the widget is by making the output of PHP file in Javascript format like bellow and then including the PHP file into a HTML widget like <script src="myPHPfile.php">
my PHP file produces output like bellow
echo 'document.write(" blah blah '.$someVar.' blah blah ");';
Doing it like this does the job, but only for people with Javascript enabled browsers, and there is another problem with search engines not being able to read the output
Any idea how I can put the whole code directly inside the widget?
Thanks