PHP and theme.html


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:
"&centerblock=<{foreach item=block from=$xoops_ccblocks}> 
<TD CLASS=blockTitle><
<TD CLASS=blockContent><

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:

$centerblock="<{foreach item=block from=$xoops_ccblocks}> 
<TD CLASS=blockTitle><
<TD CLASS=blockContent><

$myFile "centerblock.txt";
$fh fopen($myFile'w+') or die("can't open file");
$stringData $centerblock;

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?

Re: PHP and theme.html
  • 2005/9/2 22:22

  • adrock

  • Quite a regular

  • Posts: 291

  • Since: 2004/12/7

it may have to do with the fact that in order for the XOOPS code to be interpreted correctly, the includes from the header file need to be there.

Look at a regular theme and the php files included with the modules you intend to incorporate into flash to see which files will need to be included (defined) for the XOOPS codes to work.

I haven't tried using the codes in flash yet, but that would be where I would start!

Let us know how it goes!

Happy Xoopsing!
Affordable Web Hosting - Family - Fun!...and not always in that order!

Re: PHP and theme.html
  • 2005/9/2 22:38

  • Lance_

  • Home away from home

  • Posts: 983

  • Since: 2004/1/12

I have a .txt file with my flash banners text in it, in order to have the text appear in the flash I had to put (from pod's suggestion) the text file in the XOOPS root and in the folder of each module for it to appear all the time.

I have not found another way of doing it since.

GDL-Web.com :: Website development.
Xoopslance.com::Freelancing and Projects
thelionsden-arena.net:: Clan/League/Ladder Hosting

Re: PHP and theme.html

Thanks guys. Yeah, I am wrapping the flash file inside of the XOOPS header and footer. I found some tutorials that explain how to pull in variables that PHP makes into Flash. I can get it to work with a simple PHP script, but not from within the XOOPS template. It doesn't help that I am not much of a programmer, but I am trying!

Here's the info I've found out about doing these things:

Calling PHP functions from Flash:

Integrating Flash and MySQL:

Importing text files into Flash:

Using loadvariables to import PHP infor without test files:

Using Flash with PHP and MySQL:

I hope that these tutorials are helpful to others. I am not having a lot of luck making them work with Xoops.

I am thinking I may have to just pull info directly from the database. I will keep experimenting and post here if I come across anything cool.



Who's Online

202 user(s) are online (53 user(s) are browsing Support Forums)

Members: 0

Guests: 202



Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits