Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.