Elxis CMS Forum

Community => Elxis 2008.x Olympus (dev) => Topic started by: dados on December 06, 2008, 20:55:20

Title: Problem with index.php template
Post by: dados on December 06, 2008, 20:55:20
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: [Select]
<?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;; ?>
Title: Re: Problem with index.php template
Post by: Farhad Sakhaei on December 06, 2008, 21:00:37
Replace:

$GLOBALS[mosConfig_live_site]

With :

 <?php echo $mainframe->getTemplate(); ?>
Title: Re: Problem with index.php template
Post by: dados on December 06, 2008, 21:04:12
Okey thanks, I think this is work...
Title: Re: Problem with index.php template
Post by: dados on December 06, 2008, 21:05:57
I think this code is Okey but just see, thanks....

Code: [Select]
<?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;; ?>
Title: Re: Problem with index.php template
Post by: Farhad Sakhaei on December 06, 2008, 21:25:29
So is there any problem ?
Title: Re: Problem with index.php template
Post by: dados on December 06, 2008, 23:25:37
I think this code is Okey but just see, thanks....

Code: [Select]
<?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;; ?>

I want to know is this code correct?
Title: Re: Problem with index.php template
Post by: Farhad Sakhaei on December 07, 2008, 00:11:25
Yes  ::) ???
Title: Re: Problem with index.php template
Post by: dados on December 07, 2008, 00:37:54
Thanks... I have problem with first code, and I want to know is second is correct and can I use this for first index.php, ans it is work now. Thanks...