Page 1 of 1
Problem with adding a flash in the sidebar
Posted: Thu Feb 02, 2006 7:09 pm
by Snowfox
I want to add this little funky flash:
http://julk.net.free.fr/nectarine/ticker/necta_julk.php
Into my sidebar, with the html bugget plugin, but the problem is
that it loads the flash incorrect not showing the playlist as it should,
but if i open the flash just with my browser it works. Any ideas ?
Posted: Thu Feb 02, 2006 9:44 pm
by judebert
I believe PHP in nuggets is disabled for security reasons.
In fact, I don't even know if it'll work in Smarty templates. Try adding it to your header for a test: edit your index.tpl to add the required PHP and see what happens.
Posted: Fri Feb 03, 2006 2:45 pm
by Snowfox
No luck either, putting the flash in the header ends in the same
resault like putting it into the html nugget.
Posted: Fri Feb 03, 2006 5:36 pm
by judebert
Yeah, I was afraid of that.
You can run PHP from your templates through a customization file called config.inc.php. For instance, you could create a config.inc.php in your template directory with this content:
Code: Select all
<?php
ob_start();
include your_php_file.php
$data = ob_get_contents();
ob_end_clean();
$serendipity['smarty']->assign('my_content', $data);
?>
Then modify your template with {$my_content} wherever you want the output to go. You've got to be careful with paths:
see this entry for embedding PHP in your blog.
You could also try the externalphp sidebar plugin, which allows you to call (as the name suggests) external PHP programs.
The documentation for using PHP in your templates is here.