Futallaby - Image Rotation (7)

1 Name: !bTnTCCl4gE 2005-07-21 11:26 ID:NZ03gzkZ [Del]

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 ^_^

2 Name: Albright!LC/IWhc3yc 2005-07-21 22:03 ID:VBVsvioC [Del]

Could you post or link to the script? Also, how are you embedding it in the page?

3 Name: !bTnTCCl4gE 2005-07-21 22:17 ID:NZ03gzkZ [Del]

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.

4 Name: Furi!EuK0M02kkg 2005-07-21 23:56 ID:Heaven [Del]

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...

5 Name: Albright!LC/IWhc3yc 2005-07-22 03:21 ID:VBVsvioC [Del]

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".

6 Name: !bTnTCCl4gE 2005-07-22 12:08 ID:NZ03gzkZ [Del]

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

7 Name: !WAHa.06x36 2005-07-22 12:28 ID:Heaven [Del]

Should've read this thread: http://4-ch.net/tech/kareha.pl/1102969545

Also, obligatory "use Wakaba" comment.

Name: Link:
Leave these fields empty (spam trap):
More options...
Verification: