1
gabrielk
Re: Using PHP within a Theme File
  • 2006/2/28 22:39

  • gabrielk

  • Just popping in

  • Posts: 2

  • Since: 2006/2/28


Here's a sample of the code below. I've double checked the syntax (and did catch an error the first time around), but what's happening now doesn't quite seem like a syntax error. Basically, when I put the PHP code in the source of theme.html, it gets output on the final pagein the code as though it didn't get executed, just printed. So here's a sample of what I'm inputting...and when I view the pace, the source looks exactly like this:

CODE:
<td align="left">
<?php
$here = $_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];
if(strpos($here, 'modules/news')===true) {
// News/home page.
$box = 'box-home.swf';
$image = '';
} else {
// Default page.
$box = 'box-home.swf';
$image = 'Rene_Antonio_Intro.swf';
}
?>
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/swflash.cab#version=6,0,29,0" width="222" height="197">
<param name="movie" value="http://dev.yellowdress.net/rene/themes/rene_v2_4//flash/<?php echo $box; ?>" " />
<param name="quality" value="high" />
<embed src="http://dev.yellowdress.net/rene/themes/rene_v2_4//flash/<?php echo $box; ?>" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="222" height="197"></embed>
</object>
</td>



2
gabrielk
Using PHP within a Theme File
  • 2006/2/28 17:46

  • gabrielk

  • Just popping in

  • Posts: 2

  • Since: 2006/2/28


Hi,

I'm new to working with Xoops. I inserted some PHP code into my /themes/mytheme/theme.html file, however when I view the page, the PHP is printed in the source code and not actually executed. Any help as to what's going on, and how to get the PHP code to actually execute would be much appreciated, I'm stumped! :)




TopTop



Login

Who's Online

223 user(s) are online (132 user(s) are browsing Support Forums)


Members: 0


Guests: 223


more...

Donat-O-Meter

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

Latest GitHub Commits