Community > Elxis 2008.x Olympus (dev)

Problem with index.php template

(1/2) > >>

dados:
Please tell me is this code correct because I have some problems, this is beginning code in index.php for template.

Elxis version: Elxis 2008.0 Stable rev1891 [ Olympus ] 10-February-2008
PHP Version: 5.2.5

I have also installed dsmenu module....


--- Code: ---<?php defined( &#39;_VALID_MOS&#39; ) or die( &#39;Direct Access to this location is not allowed.&#39; );
$iso = explode( &#39;=&#39;, _ISO );
echo &#39;<?xml version="1.0" encoding="&#39;.$iso[1].&#39;"?&#39; .&#39;>&#39;._LEND;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo _LANGUAGE; ?>" xml:lang="<?php echo _LANGUAGE; ?>"<?php echo (_GEM_RTL) ? &#39; dir="rtl"&#39; : &#39;&#39;; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php mosShowHead(); ?>
<link href="<?php echo $mosConfig_live_site; ?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css<?php echo (_GEM_RTL) ? &#39;-rtl&#39; : &#39;&#39;; ?>.css" rel="stylesheet" type="text/css" media="all" />
<?php if ( $my->id ) { initEditor(); } ?>
<?php echo "<link rel=\"stylesheet\" href=\"$GLOBALS[mosConfig_live_site]/templates/$GLOBALS[cur_template]/css/template_css.css\" type=\"text/css\"/>" ; ?><?php echo "<link rel=\"shortcut icon\" href=\"$GLOBALS[mosConfig_live_site]/images/favicon.ico\" />" ; ?>
<?php echo &#39;<link href="&#39;.$mainframe->getCfg(&#39;live_site&#39;).&#39;/modules/dsmenu/dsmenu_h.css" rel="stylesheet" type="text/css" />&#39;; ?>

--- End code ---

Farhad Sakhaei:
Replace:

$GLOBALS[mosConfig_live_site]

With :

 <?php echo $mainframe->getTemplate(); ?>

dados:
Okey thanks, I think this is work...

dados:
I think this code is Okey but just see, thanks....


--- Code: ---<?php 
defined( &#39;_VALID_MOS&#39; ) or die( &#39;Direct Access to this location is not allowed.&#39; );
$iso = explode( &#39;=&#39;, _ISO );
echo &#39;<?xml version="1.0" encoding="&#39;.$iso[1].&#39;"?&#39; .&#39;>&#39;._LEND;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo _LANGUAGE; ?>" xml:lang="<?php echo _LANGUAGE; ?>"<?php echo (_GEM_RTL) ? &#39; dir="rtl"&#39; : &#39;&#39;; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; <?php echo _ISO; ?>" />
<?php mosShowHead(); ?>
<link href="<?php echo $mosConfig_live_site; ?>/templates/<?php echo $mainframe->getTemplate(); ?>/css/template_css<?php echo (_GEM_RTL) ? &#39;-rtl&#39; : &#39;&#39;; ?>.css" rel="stylesheet" type="text/css" media="all" />
<?php if ( $my->id ) { initEditor(); } ?>
<?php echo &#39;<link href="&#39;.$mainframe->getCfg(&#39;live_site&#39;).&#39;/modules/dsmenu/dsmenu_h.css" rel="stylesheet" type="text/css" />&#39;; ?>

--- End code ---

Farhad Sakhaei:
So is there any problem ?

Navigation

[0] Message Index

[#] Next page

Go to full version