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:
le="color: #000000"><?php <{php}> print "¢erblock=<{foreach item=block from=$xoops_ccblocks}> <TABLE CELLSPACING=1 CELLPADDING=5 WIDTH=100%> <TR> <TD CLASS=blockTitle><{$block.title}></TD> </TR> <TR> <TD CLASS=blockContent><{$block.content}></TD> </TR> </TABLE> <{/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:
le="color: #000000"><?php <{php}> $centerblock="<{foreach item=block from=$xoops_ccblocks}> <TABLE CELLSPACING=1 CELLPADDING=5 WIDTH=100%> <TR> <TD CLASS=blockTitle><{$block.title}></TD> </TR> <TR> <TD CLASS=blockContent><{$block.content}></TD> </TR> </TABLE> <{/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?