okay this one's got me stumped, I tried hand crafting a php script to do image rotation in futallaby, but it always ends up with a broken image and doesn't load it in the page. If I run the PHP script itself it outputs what it's supposed to. I even tried hard coding the php file to simply outputting one image, but it still doesnt work.
Any help please? Or links to a good rotation script that works with futallaby would be nice to
TIA ^_^
Could you post or link to the script? Also, how are you embedding it in the page?
I'm embedding it in the page with the variable in the config.php:
define(TITLEIMG, 'random.php'); //Title image (point to php file if rotating)
this is the line in the Futallaby script that interprets it:
$titlepart.= '<img src="'.TITLEIMG.'" onclick="this.src=this.src;" alt="'.TITLE.'" />';
I've ended up dropping it down to just a shell script to try to get it to respond statically, but that isn't even working:
<?
print"banner1.jpg";
?>
that one of course doesnt' bring up the image when I run the php script itself, but I had it say print'<img src="banner1.jpg">'; and that would show the image if I ran the random.php script itself
I dunno, maybe I'm overlooking something obvious.
Just looking at
http://php.planetmirror.com/manual/en/function.define.php
It could be that the syntax you need is define("CONST", 'random.php'); I haven't bothered trying, but the CONST string may need to be quoted. This could be the problem.
The define() function returns a bool. You should check whether it's returning true with your syntax. If it returns true, and still doesn't work, then... umm...
Yes, TITLEIMG should be in quotes.
If that's still not working, try changing "random.php" to the full path of the script: "http://www.server.xyz/something/random.php".
meh neither of those worked. the define function is returning true, and the output line in Futallaby is outputting the IMG tag as img src="random.php" as it should, but it still didnt work as it's supposed to (at least sound like it's supposed to).
Ended up finding this function:
http://www.zend.com/manual/function.header.php
and changed the shell script to:
<?
header('Location: '.'banner1.jpg');
?>
and that seems to work
Should've read this thread: http://4-ch.net/tech/kareha.pl/1102969545
Also, obligatory "use Wakaba" comment.