Jump to content

PHP in PHP


tpsilver10

Recommended Posts

I'm trying to build a template for Joomla for this site that I'm doing, but I want it to break out of the template for the forum (because of the width).

 

I'm trying to use if else to use different CSS, with luck.

 

Where I run into trouble is if I then try and load the Joomla components. It doesn't render any of it, I assume because they're php tags inside of the if else statement.

 

Anyone know a way around it?

 

<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php $iso = split( '=', _ISO );
echo '<?xml version="1.0" encoding="'. $iso[1] .'"?' .'>';
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php mosShowHead(); ?>
<?php
if ( $my->id ) {
initEditor();
}

if ((mosCountModules( 'user1' )) && (mosCountModules( 'user2' ))) {
//if both modules are loaded, we need a 50%-layout for them
$usera = 'user1';
$userb = 'user2';
} else if ((mosCountModules( 'user1' )) || (mosCountModules( 'user2' ))) {
// if only one, then 100% no matter which one.
$usera = 'user3';
$userb = 'user3';
}
?>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<link href="<?php echo $mosConfig_live_site;?>/templates/spursca/css/template_css.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="header">
<img src='<?php echo $mosConfig_live_site;?>/templates/spursca/images/header_logo.jpg' />
</div>
<?php if ($_GET['option'] == 'com_fireboard'){
echo "<div id='forumcontainer'>
<!--rounded top--><div id='topleft'><div id='topright'><?php elseif (mosCountModules( 'left' )) { mosLoadModules ( 'left',-3); } ?></div></div><!--rounded top-->
<div class='news'>Forum</div><br />
<!--container--></div><!--container-->";
}
else { echo "<div id='container'>
<!--rounded top--><div id='topleft'><div id='topright'>Top</div></div><!--rounded top-->
<div id='wrapper'>
<div id='left'>
<div class='news'>Stfs</div><br />
<div class='headlines'>sda</div>
<!--left--></div><!--left-->
<div id='right'>
<div class='search'>asd</div>
	<!--right--></div><!--right-->
<!--wrapper--></div><!--wrapper-->
<br class='clear:both' />
<!--container--></div><!--container-->"; } ?>
</body>
</html>

Link to comment
https://forums.phpfreaks.com/topic/56398-php-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.