Page 1 of 2

deleted index.php

Posted: Fri Aug 10, 2007 10:11 am
by jasminetea
Dear All,
I have deleted the index.php. My aim was to upload (with dreamweaver MX) a fireworks start page with two links to the EN and DE language sites (URLs as given in CMSMS). Well, I over-wrote the original index.php and the result was that any called page went to my uploaded fireworks exported page. I deleted the new index.php (which contained the fireworks images) and now have only "ZUGRIFF NICHT ERLAUBT Die angeforderte Seite darf nicht angezeigt werden" in my browser for every called page. I have checked that all the information is there in the CMSMS Content/pages, which it is. Even the original start page, content is there.

I have tried:
(a) making the original start page as seen within CMSMS default again.
(b) viewing the content of separate pages via CMSMS Content/Pages/view page - still ZUGRIFF NICHT ERLAUBT
(c) viewing the content of separate pages via CMSMS Content/Pages/Edit/Preview - SHOWS CORRECT CONTENT!!!
(d) making yet another start page within CMSMS and setting that as default

Can anyone provide any advice on (i) how I can get the site up again and (ii) whether it is possible to use a fireworks mx exported file as a new start page to link into CMSMS (including what does one do with the exported fireworks mx images required for said start page)

Yours, feeling rather idiotic,

JT

Re: deleted index.php

Posted: Fri Aug 10, 2007 10:20 am
by RonnyK
JT,

this is my config.php that is stored with 644.

Code: Select all

<?php
#CMS - CMS Made Simple
#(c)2004 by Ted Kulp (wishy@users.sf.net)
#This project's homepage is: http://cmsmadesimple.sf.net
#
#This program is free software; you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
#the Free Software Foundation; either version 2 of the License, or
#(at your option) any later version.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#GNU General Public License for more details.
#You should have received a copy of the GNU General Public License
#along with this program; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#
#$Id: index.php 3934 2007-05-10 14:16:56Z calguy1000 $

$dirname = dirname(__FILE__);
require_once($dirname.'/fileloc.php');

/**
 * Entry point for all non-admin pages
 *
 * @package CMS
 */	
#echo '<code style="align: left;">';
#var_dump($_SERVER);
#echo '</code>';

$starttime = microtime();

@ob_start();

clearstatcache();

if (!isset($_SERVER['REQUEST_URI']) && isset($_SERVER['QUERY_STRING']))
{
	$_SERVER['REQUEST_URI'] = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
}

if (!file_exists(CONFIG_FILE_LOCATION) || filesize(CONFIG_FILE_LOCATION) < 800)
{
    require_once($dirname.'/lib/misc.functions.php');
    if (FALSE == is_file($dirname.'/install/index.php')) {
        die ('There is no config.php file or install/index.php please correct one these errors!');
    } else {
        redirect('install/');
    }
}
else if (file_exists(TMP_CACHE_LOCATION.'/SITEDOWN'))
{
	echo "<__html><head><title>Maintenance</title></head></__body><p>Site down for maintenance.</p><__body></__html>";
	exit;
}

if (!is_writable(TMP_TEMPLATES_C_LOCATION) || !is_writable(TMP_CACHE_LOCATION))
{
	echo '<__html><title>Error</title></head></__body>';
	echo '<p>The following directories must be writable by the web server:<br />';
	echo 'tmp/cache<br />';
	echo 'tmp/templates_c<br /></p>';
	echo '<p>Please correct by executing:<br /><em>chmod 777 tmp/cache<br />chmod 777 tmp/templates_c</em><br />or the equivilent for your platform before continuing.</p>';
	echo '<__body></__html>';
	exit;
}

require_once($dirname.'/include.php'); #Makes gCms object

$params = array_merge($_GET, $_POST);

$smarty = &$gCms->smarty;
$smarty->params = $params;

$page = '';

if (isset($params['mact']))
{
  $ary = explode(',', cms_htmlentities($params['mact']), 4);
  $smarty->id = (isset($ary[1])?$ary[1]:'');
}
else
{
  $smarty->id = (isset($params['id'])?intval($params['id']):'');
}

if (isset($smarty->id) && isset($params[$smarty->id . 'returnid']))
{
	$page = $params[$smarty->id . 'returnid'];
}
else if (isset($config["query_var"]) && $config["query_var"] != '' && isset($_GET[$config["query_var"]]))
{
	$page = $_GET[$config["query_var"]];

    //trim off the extension, if there is one set
    if ($config['page_extension'] != '' && endswith($page, $config['page_extension']))
    {   
        $page = substr($page, 0, strlen($page) - strlen($config['page_extension']));
    }
}
else
{
	$calced = cms_calculate_url();
	if ($calced != '')
		$page = $calced;
}

//See if our page matches any predefined routes
$page = rtrim($page, '/');
if (strpos($page, '/') !== FALSE)
{
	$routes =& $gCms->variables['routes'];
	
	$matched = false;
	foreach ($routes as $route)
	{
		$matches = array();
		if (preg_match($route->regex, $page, $matches))
		{
			//Now setup some assumptions
			if (!isset($matches['id']))
				$matches['id'] = 'cntnt01';
			if (!isset($matches['action']))
				$matches['action'] = 'defaulturl';
			if (!isset($matches['inline']))
				$matches['inline'] = 0;
			if (!isset($matches['returnid']))
				$matches['returnid'] = ''; #Look for default page
			if (!isset($matches['module']))
				$matches['module'] = $route->module;

			//Get rid of numeric matches
			foreach ($matches as $key=>$val)
			{
				if (is_int($key))
				{
					unset($matches[$key]);
				}
				else
				{
					if ($key != 'id')
						$_REQUEST[$matches['id'] . $key] = $val;
				}
			}

			//Now set any defaults that might not have been in the url
			if (isset($route->defaults) && count($route->defaults) > 0)
			{
				foreach ($route->defaults as $key=>$val)
				{
					$_REQUEST[$matches['id'] . $key] = $val;
					if (array_key_exists($key, $matches))
					{ 
						$matches[$key] = $val;
					}
				}
			}

			//Get a decent returnid
			if ($matches['returnid'] == '') {
				global $gCms;
				$contentops =& $gCms->GetContentOperations();
				$matches['returnid'] = $contentops->GetDefaultPageID();
			}

			$_REQUEST['mact'] = $matches['module'] . ',' . $matches['id'] . ',' . $matches['action'] . ',' . $matches['inline'];
			$page = $matches['returnid'];
			$smarty->id = $matches['id'];

			$matched = true;
		}
	}

	if (!$matched)
	{
		$page = substr($page, strrpos($page, '/') + 1);
	}
}

if ($page == '')
{
	global $gCms;
	$contentops =& $gCms->GetContentOperations();
	$page =& $contentops->GetDefaultContent();
}
else
{
    $page = preg_replace('/\</','',$page);
}

$pageinfo = PageInfoOperations::LoadPageInfoByContentAlias($page);

if (isset($pageinfo) && $pageinfo !== FALSE)
{
	$gCms->variables['pageinfo'] =& $pageinfo;

	if( isset($pageinfo->template_encoding) && 
	    $pageinfo->template_encoding != '' )
	{
	  set_encoding($pageinfo->template_encoding);
	}

	$gCms->variables['content_id'] = $pageinfo->content_id;
	$gCms->variables['page'] = $page;
	$gCms->variables['page_id'] = $page;

	$gCms->variables['page_name'] = $pageinfo->content_alias;
	$gCms->variables['position'] = $pageinfo->content_hierarchy;
	global $gCms;
	$contentops =& $gCms->GetContentOperations();
	$gCms->variables['friendly_position'] = $contentops->CreateFriendlyHierarchyPosition($pageinfo->content_hierarchy);
	
	$smarty->assign('content_id', $pageinfo->content_id);
	$smarty->assign('page', $page);
	$smarty->assign('page_id', $page);	
	$smarty->assign('page_name', $pageinfo->content_alias);
	$smarty->assign('page_alias', $pageinfo->content_alias);
	$smarty->assign('position', $pageinfo->content_hierarchy);
	$smarty->assign('friendly_position', $gCms->variables['friendly_position']);
}
else if (get_site_preference('enablecustom404') == '' || get_site_preference('enablecustom404') == "0")
{
	ErrorHandler404();
	exit;
}

$html = '';
$cached = '';

if (isset($_GET["print"]))
{
	($smarty->is_cached('print:'.$page, '', $pageinfo->template_id)?$cached="":$cached="not ");
	$html = $smarty->fetch('print:'.$page, '', $pageinfo->template_id) . "\n";
}
else
{
	#If this is a case where a module doesn't want a template to be shown, just disable caching
	if (isset($smarty->id) && $smarty->id != '' && isset($_REQUEST[$smarty->id.'showtemplate']) && $_REQUEST[$smarty->id.'showtemplate'] == 'false')
	{
		$html = $smarty->fetch('template:notemplate') . "\n";
	}
	else
	{
		$smarty->caching = false;
		$smarty->compile_check = true;
		($smarty->is_cached('template:'.$pageinfo->template_id)?$cached="":$cached="not ");
		$html = $smarty->fetch('template:'.$pageinfo->template_id) . "\n";
	}
}

#if ((get_site_preference('enablecustom404') == '' || get_site_preference('enablecustom404') == "0") && (!$config['debug']))
#{
#	set_error_handler($old_error_handler);
#}

if (!$cached)
{
	#Perform the content postrendernoncached callback
	reset($gCms->modules);
	while (list($key) = each($gCms->modules))
	{
		$value =& $gCms->modules[$key];
		if ($gCms->modules[$key]['installed'] == true &&
			$gCms->modules[$key]['active'] == true)
		{
			$gCms->modules[$key]['object']->ContentPostRenderNonCached($html);
		}
	}
	//Events::SendEvent('Core', 'ContentPostRenderNonCached', array(&$html));
}

#Perform the content postrender callback
reset($gCms->modules);
while (list($key) = each($gCms->modules))
{
	$value =& $gCms->modules[$key];
	if ($gCms->modules[$key]['installed'] == true &&
		$gCms->modules[$key]['active'] == true)
	{
		$gCms->modules[$key]['object']->ContentPostRender($html);
	}
}

Events::SendEvent('Core', 'ContentPostRender', array('content' => &$html));

header("Content-Type: " . $gCms->variables['content-type'] . "; charset=" . (isset($pageinfo->template_encoding) && $pageinfo->template_encoding != ''?$pageinfo->template_encoding:get_encoding()));

echo $html;

@ob_flush();

$endtime = microtime();

$db =& $gCms->GetDb();

if ($config["debug"] == true)
{
	echo "<p>Generated in ".microtime_diff($starttime,$endtime)." seconds by CMS Made Simple using ".(isset($db->query_count)?$db->query_count:'')." SQL queries and ".(function_exists('memory_get_usage')?memory_get_usage():'n/a')." bytes of memory</p>";
}

echo "<!-- Generated in ".microtime_diff($starttime,$endtime)." seconds by CMS Made Simple using ".(isset($db->query_count)?$db->query_count:'')." SQL queries -->\n";
#echo "<p>Generated in ".microtime_diff($starttime,$endtime)." seconds by CMS Made Simple (".$cached."cached) using ".(isset($db->query_count)?$db->query_count:'')." SQL queries and ".(function_exists('memory_get_usage')?memory_get_usage():'n/a')." bytes of memory</p>";
echo "<!-- CMS Made Simple - Released under the GPL - http://cmsmadesimple.org -->\n";

if (get_site_preference('enablesitedownmessage') == "1" || $config['debug'] == true)
{
	$smarty->clear_compiled_tpl();
	#$smarty->clear_all_cache();
}

if ($config["debug"] == true)
{
	#$db->LogSQL(false); // turn off logging
	
	# output summary of SQL logging results
	#$perf = NewPerfMonitor($db);
	#echo $perf->SuspiciousSQL();
	#echo $perf->ExpensiveSQL();

	#echo $sql_queries;
	foreach ($gCms->errors as $error)
	{
		echo $error;
	}
}

# vim:ts=4 sw=4 noet
?>

I have setup a choosing page as well, but I went for the choice to put that in the content-pages (the default one) and then push the user based on the choice to another content-page.

I don't know if this works but you might want to try.

Ronny

Re: deleted index.php

Posted: Fri Aug 10, 2007 2:37 pm
by jasminetea
Hi Ronny,
I have been looking at your config.php and trying to compare it with the standard one that I have (see below). Being new to both cmsms and php, it did go a bit above my head. My usual way is to compare, make changes and see what the result is until i have got it.

Can I ask? Is it very difficult to set a different homepage? and more importantly, how can I get my original site back online? Thanks for your patience. If it is any consolation, I have kicked myself more than once today for my rashness in putting a new index.php onto the server!

Really looking forward to hearing from you.

JT

My config.php (I have deleted the logins etc. not knowing the netiquette. Hope this is okay)

Global Settings in the admin panel)
#after making any changes to path or url related options

#-----------------
#Database Settings
#-----------------

#This is your database connection information.  Name of the server,
#username, password and a database with proper permissions should
#all be setup before CMS Made Simple is installed.
$config['dbms'] = [deleted info];
$config['db_hostname'] = [deleted info];
$config['db_username'] = [deleted info];
$config['db_password'] = [deleted info];
$config['db_name'] = [deleted info];

#If app needs to coexist with other tables in the same db,
#put a prefix here.  e.g. "cms_"
$config['db_prefix'] = 'cms_';

#Use persistent connections?  They're generally faster, but not all hosts
#allow them.
$config['persistent_db_conn'] = false;

#Use ADODB Lite?  This should be true in almost all cases.  Note, slight
#tweaks might have to be made to date handling in a "regular" adodb
#install before it can be used.
$config['use_adodb_lite'] = true;

#-------------
#Path Settings
#-------------

#Document root as seen from the webserver.  No slash at the end
#If page is requested with https use https as root url
#e.g. http://blah.com
$config['root_url'] = '[deleted info];
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on')
{
$config['root_url'] = str_replace('http','https',$config['root_url']);
}

#Path to document root. This should be the directory this file is in.
#e.g. /var/www/localhost
$config['root_path'] = '[deleted info];

#Name of the admin directory
$config['admin_dir'] = 'admin';

#Where do previews get stored temporarily?  It defaults to tmp/cache.
$config['previews_path'] = '[deleted info];

#Where are uploaded files put?  This defaults to uploads.
$config['uploads_path'] = '[deleted info];

#Where is the url to this uploads directory?
$config['uploads_url'] = $config['root_url'] . '/uploads';


#---------------
#Upload Settings
#---------------

#Maxium upload size (in bytes)?
$config['max_upload_size'] = 20000000;

#Permissions for uploaded files.  This only really needs changing if your
#host has a weird permissions scheme.
$config['default_upload_permission'] = '664';

#------------------
#Usability Settings
#------------------

#Allow smarty {php} tags?  These could be dangerous if you don't trust your users.
$config['use_smarty_php_tags'] = false;

#CMSMS Debug Mode?  Turn is on to get a better error when you
#see {nocache} errors.
$config['debug'] = false;

#Automatically assign alias based on page title?
$config['auto_alias_content'] = true;

#------------
#URL Settings
#------------

#Show mod_rewrite URLs in the menu? You must enable 'use_hierarchy' for this to work for modules
$config['assume_mod_rewrite'] = false;

#Extension to use if you're using mod_rewrite for pretty URLs.
$config['page_extension'] = false;

#If you don't use mod_rewrite, then would you like to use the built-in
#pretty url mechanism?  This will not work with IIS and the {metadata} tag
#should be in all of your templates before enabling.
$config['internal_pretty_urls'] = true;

#If you're using the internal pretty url mechanism or mod_rewrite, would you like to
#show urls in their hierarchy?  (ex. http://www.mysite.com/parent/parent/childpage)
$config['use_hierarchy'] = true;

#If using none of the above options, what should we be using for the query string
#variable?  (ex. http://www.mysite.com/index.php?page=somecontent)
$config['query_var'] = false;

#--------------
#Image Settings
#--------------

#Which program should be used for handling thumbnails in the image manager.
#See http://wiki.cmsmadesimple.org/index.php ... ge_Manager for more
#info on what this all means
$config['image_manipulation_prog'] = 'GD';
$config['image_transform_lib_path'] = '/usr/bin/ImageMagick/';

#Default path and URL for uploaded images in the image manager
$config['image_uploads_path'] = '[deleted info];
$config['image_uploads_url'] = $config['root_url'] . '/uploads/images';


#------------------------
#Locale/Encoding Settings
#------------------------

#Locale to use for various default date handling functions, etc.  Leaving
#this blank will use the server's default.  This might not be good if the
#site is hosted in a different country than it's intended audience.
$config['locale'] = '';

#In almost all cases, default_encoding should be empty (which defaults to utf-8)
#and admin_encoding should be utf-8.  If you'd like this to be different, change
#both.  Keep in mind, however, that the admin interface translations are all in
#utf-8, and will be converted on the fly to match the admin_encoding.  This
#could seriously slow down the admin interfaces for users.
$config['default_encoding'] = '';
$config['admin_encoding'] = 'utf-8';

#---------------------------------------------
#Use the old stylesheet logic?  It's much slower, but it works with older
#versions of CMSMS.  You'll also need this set to true if there is a module
#that uses a stylesheet callback.  Leave it as false instead you really
#need it.
$config['old_stylesheet'] = false;

# URL of the Admin Panel section of the User Handbook
$config['wiki_url'] = 'http://wiki.cmsmadesimple.org/index.php ... dmin_Panel';

#Enable backwards compatibility mode?  This basically will allow some
#modules written before 1.0 was released to work.  Keep in mind that this
#will use a lot more memory and isn't guaranteed to fix the problem.
$config['backwards_compatible'] = false;

#Not used anymore... kept around, just in case
$config['disable_htmlarea_translation'] = false;
$config['use_Indite'] = true;
?>

Re: deleted index.php

Posted: Fri Aug 10, 2007 2:43 pm
by RonnyK
Sorry JT,

I meant off course my index.php, as you said that one was deleted. So the code is the index.php and NOT config.php (that was a typo).

Ronny

Re: deleted index.php

Posted: Fri Aug 10, 2007 3:09 pm
by jasminetea
Ronny,
Thanks very much. It is a delight to see the site again. If I can ask, do you have any suggestions on using a different index page for the whole site? i.e. I have made a somewhat graphic start page in fireworks. Before starting with CMSMS, I would always export this to dreamweaver and then launch it as the index.htm file. Thanks for getting my site up again.

JT

p.s. A somewhat academic question. I wanted to have the individual horizontal navigation buttons a different shade to one another in their natural state. i.e. reading from left to right
"Start" at #999999
"Netzwerk" at 90% of #999999
"Schulungen" at 80% of #999999
"Support" at 70% of #999999
"Referenzen" at at 60% of #999999
"Kontakt" at 50% of #999999

I am not concerned about their 'over' state or 'down' state. I also assume that on 60% and 50% I would need to change the writing from white to black. Is this possible through CSS?

As mentioned, I am more than happy with it as it is and am now curious to know how far CMSMS is possible to adapt.

I am using the CSS Navigation: Simple - Horizontal

Re: deleted index.php

Posted: Fri Aug 10, 2007 5:52 pm
by Dr.CSS
If you set an index.html into your root it should come up first, put links to the other pages made with CMSMS you can still have your intro page...

To style each link diff. you can add {$node->id} or {$node->alias} to the li or a class, if using node id which is a number put an a or some letter in front of it as CSS wont take numbers for styling, a{$node->id}...

These have to be put into your menu template, Layout > Menu Manager, if you are using a default menu call {menu template='simple_navigation.tpl'} then copy it and put these calls in then call the new template in your tag w/o the .tpl ending {menu template='nameofyourtemplate'}...

Something like this... the first one will give you 2 classes for currentpage so you can have .currentpage {styling} and .thepagealis {styling}

{if $node->current == true}
url}" class="currentpage {$node->alias}"> {$node->menutext}

alias}"[/color]>alias}"[/color] href="{$node->url}"{if $node->target ne ""} target="a{$node->target}"{/if}> {$node->menutext}

styling horizontal menu / changing color of individual menu items

Posted: Mon Aug 13, 2007 2:28 pm
by jasminetea
Hi Mark

I have been trying most of the day your directions as well as further searching in the Forum. Unfortunately, I am still stuck. So this is what I have done.

1. created saved the default menu (simple_navigation.tpl) as 'booksimplenav' without .tpl
2. in my EN template I have changed the menu reference to the new menu 'booksimplenav'
3. I replaced in booksimplenav

CODE
{if $node->current == true}
Current page is {$node->hierarchy}: {$node->menutext}

with CODE
{if $node->current == true}
url}" class="currentpage {$node->alias}"> {$node->menutext}

alias}">alias}" href="{$node->url}"{if $node->target ne ""} target="a{$node->target}"{/if}> {$node->menutext}

Now I am lost. I have tried:
(a) changing 'alias' to the 'network' one of my pages is called network
(b) deleting second paragraph completely beginning 'alias}"'
(c) in CSS 'Navigation: Simple - Horizontal' changing
CODE from

/* menu list items */
div#menu_horiz li {
  float: left; /* makes the list horizontal */
  list-style: none; /* hides the list bullet */
  margin: 0 ;
  border-right: 1px solid #CCCCCC;
  background-color: #999999;

}

to CODE
/* menu list items */
div#menu_horiz li {
  $node->network;
  float: left; /* makes the list horizontal */
  list-style: none; /* hides the list bullet */
  margin: 0 ;
  border-right: 1px solid #CCCCCC;
  background-color: #000000;


}


Simply to see whether Network went black, which it did not.

I wonder whether you could provide some more help. Thanking you in advance for your time and trouble, the former of which I appreciate very much,

Cheers,
JT

p.s. trust that you had a good weekend?

Re: deleted index.php

Posted: Mon Aug 13, 2007 5:18 pm
by Dr.CSS
I forgot to add, If you look at the rendered page source view you will see the class of each li and a this is what you use in your CSS...



div#menu_horiz li.network{  or a.network depending on which part you are targeting...
  $node->network; << delete this
  float: left; /* makes the list horizontal */
  list-style: none; /* hides the list bullet */
  margin: 0 ;
  border-right: 1px solid #CCCCCC;
  background-color: #000000;
}

Styling of individual buttons on horizontal navigation

Posted: Tue Aug 14, 2007 11:57 am
by jasminetea
Hi Mark,
I hope that you don't mind me persisting with this problem. So, where I am at the moment. Following your code suggestions, I have managed to have a different colour between the horizontal 'buttons' in their down position i.e. once the page is selected and once it is showing in the browser. This is fantastic and will be of great help in the next site planned to be build.

However, what I would like is an individual difference in colour between the buttons in their 'natural' or 'up' state. i.e. on every page with the exception of the selected and showing page. On the selected page, I would like to have it always green. so, for example if support is selected then the individual horizontal navigation buttons would read (left to right). Of course, I still need to work out the colour codes for the percentages.

"Start" at #999999
"Netzwerk" at 90% of #999999
"Schulungen" at 80% of #999999
"Support" at 70% of #006600
"Referenzen" at at 60% of #999999
"Kontakt" at 50% of #999999

Here is my full code which results in the 'down' scenario i.e. different colour for when page is selected rather than different 'up' or 'natural' state. I am trying it only on two pages as a test: 'network' and 'home-2'. I have marked-up your suggestions in red.

But before the code,
Thanks and sincerely hoping that I am not monopolising your time.

Best regards,
JT

CODE IN MENU TEMPLATE 'booksimplenav'
{* CSS classes used in this template:
.activeparent - The top level parent when a child is the active/current page
li.active0n h3 - n is the depth/level of the node. To style the active page for each level separately. The active page is not clickable.
.clearfix - Used for the unclickable h3 to use the entire width of the li, just like the anchors. See the Tools stylesheet in the default CMSMS installation.
li.sectionheader h3 - To style section header
li.separator - To style the ruler for the separator *}

{if $count > 0}

{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="" times=$node->depth-$node->prevdepth}
{elseif $node->depth prevdepth}
{repeat string="" times=$node->prevdepth-$node->depth}

{elseif $node->index > 0}
{/if}


{if $node->current == true}
url}" class="currentpage {$node->alias}"> {$node->menutext}





{elseif $node->parent == true}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}>{$node->hierarchy}: {$node->menutext}

{elseif $node->type == 'sectionheader'}
{$node->menutext}

{elseif $node->type == 'separator'}


{else}
url}"{if $node->accesskey != ''} accesskey="{$node->accesskey}"{/if}{if $node->tabindex != ''} tabindex="{$node->tabindex}"{/if}{if $node->titleattribute != ''} title="{$node->titleattribute}"{/if}{if $node->target != ''} target="{$node->target}"{/if}>{$node->hierarchy}: {$node->menutext}

{/if}

{/foreach}
{repeat string="" times=$node->depth-1}

{/if}


CODE IN CSS Test pages 'network' and 'home-2'
/********************
MENU
*********************/

/* hack for Internet Explorer */
* html div#menu_horiz {
  /* hide ie/mac \*/
  height: 1%;
  /* end hide */
}

/*
background-color for the entire menu row,
covering 100% of the width and text center-aligned
*/
div#menu_horiz {
  background-color: #CCCCCC;  /* background color for the entire menu row */
  width: 100%;
  margin: 0;
}




/*
the menu ul box has top and left border,
right border is provided by the li elements
*/
div#menu_horiz ul {
  margin: 0;
  padding: 0;
  border-bottom: 0px solid #006600;
  border-left:  0px solid #FFFFFF;
  height:1.8em;
}




/* menu list items */
div#menu_horiz li {
  float: left; /* makes the list horizontal */
  list-style: none; /* hides the list bullet */
  margin: 0 ;
  border-right: 1px solid #CCCCCC;
  background-color: #999999;

}


div#menu_horiz li a.network {
  padding: .4em 1em .4em 1.4em; /* padding inside the list item box */
  margin: 0; /* margin outside each list item box */
  text-decoration: none; /* no underline for links */
  color: #FFFFFF;
  background: #000000 url(images/cms/arrow-right2.gif) no-repeat 0.5em center; ;
  display: block; /* IE has problems with this, fixed above */
  background-color: #000000;
}

div#menu_horiz li a.home-2 {
  padding: .4em 1em .4em 1.4em; /* padding inside the list item box */
  margin: 0; /* margin outside each list item box */
  text-decoration: none; /* no underline for links */
  color: #FFFFFF;
  background: #004400 url(images/cms/arrow-right2.gif) no-repeat 0.5em center; ;
  display: block; /* IE has problems with this, fixed above */
  background-color: #004400;
}




/* the links, that is each list item */
div#menu_horiz a {
  padding: .4em 1em .4em 1.4em; /* padding inside the list item box */
  margin: 0; /* margin outside each list item box */
  text-decoration: none; /* no underline for links */
  color: #FFFFFF;
  background: url(images/cms/arrow-right2.gif) no-repeat 0.5em center; ;
  display: block; /* IE has problems with this, fixed above */
}


/* hover state for links */
div#menu_horiz li a:hover {
  background-color: #006600;
}
div#menu_horiz a.activeparent:hover {
  background-color: #006600;
  color: #006600;
}

/* active parent, that is the first-level parent of a child page that is the current page */
div#menu_horiz li.activeparent a {
  background: #006600 url(images/cms/arrow-down.gif) no-repeat 0.4em center;
  color: #fff;
}

div#menu_horiz h3 {
  padding: 0.4em 1em .4em 1.4em; /* padding inside the list item box */
  margin: 0; /* margin outside each list item box */
  text-decoration: none; /* no underline for links */
  color: #fff;
  background: #006600 url(images/cms/arrow-right-active2.gif) no-repeat 0.4em center; ;
  display: block; /* IE has problems with this, fixed above */
  font-size: 1em;                          /* instead of the normal font size for */
}

Re: deleted index.php

Posted: Tue Aug 14, 2007 3:16 pm
by Dr.CSS
The
{if $node->current == true}
url}" class="currentpage {$node->alias}"> {$node->menutext}
will only effect the current page as in the selected page so your CSS in red will only color the lia.netwok if that is the page they are on...

It sounds like you want the color to graduate from side to side depending which page is selected...

page 1 dark, page 2 lighter, page 3 lighter, page 4 (selected) lightest, page 5 darker, page 6 darker still, page seven darkest...

This could be achieved with an image but the page name widths would all have to be the same... and the image would have to be quite wide to accommodate the first and last name places so if the first name was selected it would have the selected image color and all the name places to the right would graduate in color to the end...

This is a good place to get color numbers...

http://www.colorschemer.com/online.html

Re: deleted index.php

Posted: Tue Aug 14, 2007 3:44 pm
by jasminetea
Hi Again,
Yes I am trying to get a graduation from a stylistic point of view. However, it should not be page dependent. So, from every page


View from page 1
[page 1 (#006600)]  [page 2 (90% black)]  [page 3 (80% black)]  [page 4 (70% black)]  [page 5 (60% black)]   

View from page 2
[page 1 (100% black)]  [page 2 (#006600)]  [page 3 (80% black)]  [page 4 (70% black)]  [page 5 (60% black)] 

View from page 3
[page 1 (100% black)]  [page 2 (90% black)]  [page 3 (#006600)]  [page 4 (70% black)]  [page 5 (60% black)] 


View from page 4
[page 1 (100% black)]  [page 2 (90% black)]  [page 3 (80% black)]  [page 4 (#006600)]  [page 5 (60% black)] 

View from page 5
[page 1 (100% black)]  [page 2 (90% black)]  [page 3 (80% black)]  [page 4 (70% black)]  [page 5 (#006600)] 

So the graduation will be the same from left to right for all pages with an interruption of green on page tab which is currently showing. The graduation would be indifferent to section name given to it in the create pages and always follow the graduation pattern. For example, if in three weeks time I thought that 'page 2' would be better in the first position and change it around in the page contents of CMSMS, the changed page 2 (now practically page1) would automatically take the shading of the old page 1, and, if the old page 1 was now in the former position of page 2, then the old page 1 (now practically page 2) has the shading of the old page 2. I hope that this is not too confusing.

On inserting images, I suppose that I could insert a very small image 20px high and 1px wide on repeat with each image being slightly different. But again, how can I do this in the 'up' or 'natural' state of the button. i.e. even when it is not the page showing. Does this make any sense?

I mentioned at the beginning that it is not the end of the world it is partially an experiment and mostly learning. The site as it stands is more than good enough. So, if you have more pressing and needy enquiries to deal with - please don't worry.

Best,
JT

Re: deleted index.php

Posted: Tue Aug 14, 2007 3:46 pm
by jasminetea
I have seen a post on inserting images. Let me work through that one first and then get back to you.

Cheers,
JT

Re: deleted index.php

Posted: Tue Aug 14, 2007 4:01 pm
by Dr.CSS
OK you have 2 choices to target the page independent of the name...

$node->hierarchy -- Hierarchy position, (e.g. 1.3.3)

$node->index -- Count of this node in the whole menu

So if you add this into the menu manager template, in diff. places to see if it shows up where you want it, I've put numbers in before just to see where they show up then take them out, you will have to put a letter in front of them as CSS won't work with numbers alone like a{$node->index} should give the home page 'a15', at least in most of my installs it defaults to 15 well for id anyways, anyways just add one then render the page and see what the source shows...

I have to go tile around the bathroom sink be back later...

Re: deleted index.php

Posted: Fri Aug 17, 2007 1:53 pm
by jasminetea
Hi Mark,
I hope the bathroom sink went well? Okay, I will need a bit more time on this one and I hope it is okay if I get back to you early next week [so no need to respond to this message!]. I have also been looking at whether it is possible to CSS style the tags (my source code following) which I believe is a different way of sorting out the hierarchy. Not much luck yet and have not found much by googling or foruming round the net (from which I assume that this is either not possible or harebrained). But it is all part of the learning process. Will continue with your suggestions and I will be in touch later next week. Thanks for all the assistance so far. Have a good weekend.

Cheers,
JT


      Navigation
     


1.1: Home



1.2: Network



Training




1.5: Support



1.6: Case Studies



1.7: Contact




 
 

Re: deleted index.php

Posted: Fri Aug 17, 2007 5:48 pm
by Dr.CSS
Go here, link below, and put #000000 in Color 1 and #FFFFFF in Color 2 and in Midpoints use 10, hit blend and it will give you the numbers for black to white in 10 steps/graduations...

If you need more or a longer graduation take some of the ones it comes up with and put them in 1 and 2 then blend again, like 5d5d5d in 1 and d1d1d1 in 2...

http://multiintech.com/ColorBlender.html

ps. if you look at the source for that page then copy/paste and save it as a .html it will work on your desktop...

I'll go to http://cmsmsdemo.multiintech.com/ and make one for you to look at...

EDIT: look at http://cmsmsdemo.multiintech.com/index. ... horizontal...
login on Home page to see what I did using {$node->hierarchy} as a class...