1
Hello,
I am trying to figure out how I can pull in XOOPS block content into a Flash Dynamic Text block. If I can get this to work, it would open up all kinds of design possibilities.
Flash can import variables that PHP creates with the print command, like this:
print "¢erblock=block content here";
But when I try this in my theme file with blocks:
<{php}>
print "¢erblock=<{foreach item=block from=$xoops_ccblocks}>
<{$block.title}> |
<{$block.content}> |
<{/foreach}>";
<{/php}>
I get:
Parse error: parse error, unexpected '.', expecting '}'
I also tried the fwrite command to write the block info to a text file on the server that Flash can read:
<{php}>
$centerblock="<{foreach item=block from=$xoops_ccblocks}>
<{$block.title}> |
<{$block.content}> |
<{/foreach}>"
$myFile = "centerblock.txt";
$fh = fopen($myFile, 'w+') or die("can't open file");
$stringData = $centerblock;
fwrite($fh, $stringData);
fclose($fh);
<{/php}>
But that doesn't seem to work. I don't see the centerblock.txt file anywhere, although I am not sure where it would put it--in the theme directory, or the root dir where index.php is?
Anyway, maybe I am going about this all wrong and should be pulling data directly from the database.
Can anyone help me out?