Can anyone help me wrap this code into a php table? Can anyone help me wrap this code into a php table?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Can anyone help me wrap this code into a php table?

Started by dke, January 10, 2008, 11:10:42 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

dke

Hi,

I'm no coder and i'm trying to figure out how to wrap this code:


<html>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<div align="center">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '750',
'height', '250',
'src', 'flow',
'FlashVars', 'xmlPath=http://dkeserver.mine.nu/flow.php', <!--Absolute path to 'flow.php'-->
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'flow_link',
'bgcolor', '#FFFFFF',
'name', 'flow',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'flow',
'salign', ''
); //end AC code
}
</script>
</body>
</html>


Into this PHP table code:

starttable("100%");

echo '<tr><td class="tableh2"><b><b>Recently added files</b></td></tr>';
endtable();
?>


I cannot figure out how to mix php and html without breaking the PHP using ?>

I would like to do something like this:

starttable("100%");

echo '<tr><td class="tableh2"><b><b>Recently added files</b></td></tr>';
echo '<td class="tableb">';
<html>
<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
<div align="center">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '750',
'height', '250',
'src', 'flow',
'FlashVars', 'xmlPath=http://dkeserver.mine.nu/flow.php', <!--Absolute path to 'flow.php'-->
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'flow_link',
'bgcolor', '#FFFFFF',
'name', 'flow',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'flow',
'salign', ''
); //end AC code
}
</script>
</body>
</html>
endtable();
?>


Can any PHP/HTML wiz help me?

Thanks!

Joachim Müller

Use the heredoc syntax:starttable("100%");

echo '<tr><td class="tableh2"><b>Recently added files</b></td></tr>';
echo <<< EOT
<td class="tableb">';
<div align="center">
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js. In Flash, run \"Apply Active Content Update\" in the Commands menu to copy AC_RunActiveContent.js to the HTML output folder.");
} else {
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0',
'width', '750',
'height', '250',
'src', 'flow',
'FlashVars', 'xmlPath=http://dkeserver.mine.nu/flow.php', <!--Absolute path to 'flow.php'-->
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'window',
'devicefont', 'false',
'id', 'flow_link',
'bgcolor', '#FFFFFF',
'name', 'flow',
'menu', 'true',
'allowFullScreen', 'false',
'allowScriptAccess','sameDomain',
'movie', 'flow',
'salign', ''
); //end AC code
}
</script>
EOT;
endtable();
?>
Then edit themes/yourtheme/theme.php and add<script language="javascript">AC_FL_RunContent = 0;</script>
<script src="AC_RunActiveContent.js" language="javascript"></script>
into a new line before</head>, as you mustn't add mutliple instances of the tags <html> or <body>.
You should really read up some HTML tutorials first to understand the basics.

dke