FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Using server to list CSS page list in menu
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Using server to list CSS page list in menu [message #172039] Fri, 28 January 2011 05:14 Go to next message
drum118 is currently offline  drum118
Messages: 1
Registered: January 2011
Karma: 0
Junior Member
Below is a scrip I use for menu on various sections of my site that
started out being one thing and now is something different.

At this time I have over 500 variations of this scrip as each of them
have different years as well some have less pages while others have
more. The section names always changes.

I am new to PHP as this would cut down on changing each page when I
add more pages to a section or that section has more years added than
plan.

I want to do one page of code for each different menu and put it on
the server to changes all the efected pages. A section call Toronto/
Women'sCollege can be Mississuga/AbsoluteWorld or Transit/Hamilton and
so on.

I know I am looking at over a 1,000 different types of combination of
menus and will climb over time.

If I write page code call Women'sCollege.txt the following code would
show up on thar text file.That file would be place in a folder call
call menu or Torontomenu on the server.

On the web pages is where I am not sure how to do the code and it
could be something like this:
<?php include("./menu/Women'sCollege.txt"); ?> or <?php include("./
urbanToronto/Women'sCollege.txt"); ?> or <?php include("./transit/
MississaugaTransit.txt"); ?> depending if it's an urban site or a
transit site.

I am not sure where to put the folder and the text files and it has
been years since I did anything with the cgi and have forgot most of
it.

Any help or pointers are welcome and time I start looking at server
side coding based on how my site is growing.

I have 10 subdomain for my site now.

Thanks

<div class="container">
<div class="shadow">
<div class="color">
<ul class="menu">
<li><a href="http://
davidfisher.biz" accesskey="1" title="This link will take you back to
the David Fisher Site Page.">Main Home Page</a></li>
<li><a href="javascript:
history.go(-1)" accesskey="2" title="Link back to the previse
page">Back</a></li>
<li id="current"><a
href="http://urban.davidfisher.biz" accesskey="3" title="This link
will take you back to the Urban Site Main Page.">Urban Home Page</a></
li>
<li><a href="http://
urban.davidfisher.biz/Toronto/Women'sCollege/Women'sCollege.html"
accesskey="4" title="This like will take you back to the Women's
College Hospital redevelopment Site Home
Page.">Site&nbsp;Home&nbsp;Page</a></li>
<li><a href="#"
title="Used for the drop down menu only for 2009.">2009<!--[if IE
7]><!--></a><!--<![endif]-->
<!--[if lte IE
6]><table><tr><td><![endif]-->
<div class="subHolder">
<div class="subShadow">
<div class="subColor col4">
<ul class="subMenu">
<li><a href="http://
urban.davidfisher.biz/Toronto/Women'sCollege/2009/
Women'sCollege2009-1.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2009-1.">page-1</a></li>
<!--
<li><a href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2009/
Women'sCollege2009-2.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2009-2.">page-2</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2009/
Women'sCollege2009-3.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2009-3.">page-3</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2009/
Women'sCollege2009-4.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2009-4.">page-4</a></li> -->
</ul>
</div>
</div>
</div>
<!--[if lte IE 6]></td></
tr></table></a><![endif]-->
</li>
<li><a href="#"
title="Used for the drop down menu only for 2010.">2010<!--[if IE
7]><!--></a><!--<![endif]-->
<!--[if lte IE
6]><table><tr><td><![endif]-->
<div class="subHolder">
<div class="subShadow">
<div class="subColor col2">
<ul class="subMenu">
<li><a href="http://
urban.davidfisher.biz/Toronto/Women'sCollege/2010/
Women'sCollege2010-1.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2010-1.">page-1</a></li>
<!--
<li><a href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2010/
Women'sCollege2010-2.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2010-2.">page-2</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2010/
Women'sCollege2010-3.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2010-3.">page-3</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2010/
Women'sCollege2010-4.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2010-4.">page-4</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2010/
Women'sCollege2010-5.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2010-5.">page-5</a></li>-->
</ul>
</div>
</div>
</div>
<!--[if lte IE 6]></td></
tr></table></a><![endif]-->
</li>
<li><a href="#"
title="Used for the drop down menu only for 2011.">2011<!--[if IE
7]><!--></a><!--<![endif]-->
<!--[if lte IE
6]><table><tr><td><![endif]-->
<div class="subHolder">
<div class="subShadow">
<div class="subColor col2">
<ul class="subMenu">
<li><a href="http://
urban.davidfisher.biz/Toronto/Women'sCollege/2011/
Women'sCollege2011-1.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2011-1.">page-1</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2011/
Women'sCollege2011-2.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2011-2.">page-2</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2011/
Women'sCollege2011-3.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2011-3.">page-3</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2011/
Women'sCollege2011-4.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2011-4.">page-4</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2011/
Women'sCollege2011-5.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2011-5.">page-5</a></li>
</ul>
</div>
</div>
</div>
<!--[if lte IE 6]></td></
tr></table></a><![endif]-->
</li>
<li><a href="#"
title="Used for the drop down menu only for 2012.">2012<!--[if IE
7]><!--></a><!--<![endif]-->
<!--[if lte IE
6]><table><tr><td><![endif]-->
<div class="subHolder">
<div class="subShadow">
<div class="subColor col2">
<ul class="subMenu">
<li><a href="http://
urban.davidfisher.biz/Toronto/Women'sCollege/2012/
Women'sCollege2012-1.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2012-1.">page-1</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2012/
Women'sCollege2012-2.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2012-2.">page-2</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2012/
Women'sCollege2012-3.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2012-3.">page-3</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2012/
Women'sCollege2012-4.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2012-4.">page-4</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2012/
Women'sCollege2012-5.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2012-5.">page-5</a></li>
</ul>
</div>
</div>
</div>
<!--[if lte IE 6]></td></
tr></table></a><![endif]-->
</li>
<li><a href="#"
title="Used for the drop down menu only for 2013.">2013<!--[if IE
7]><!--></a><!--<![endif]-->
<!--[if lte IE
6]><table><tr><td><![endif]-->
<div class="subHolder">
<div class="subShadow">
<div class="subColor col2">
<ul class="subMenu">
<li><a href="http://
urban.davidfisher.biz/Toronto/Women'sCollege/2013/
Women'sCollege2013-1.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2013-1.">page-1</a></li>
<!--
<li><a href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2013/
Women'sCollege2013-2.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2013-2.">page-2</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2013/
Women'sCollege2013-3.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2013-3.">page-3</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2013/
Women'sCollege2013-4.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2013-4.">page-4</a></li>
<li><a
href="http://urban.davidfisher.biz/Toronto/Women'sCollege/2013/
Women'sCollege2013-5.html" accesskey="" title="You can see more
Photo's and read more write-ups on this project by following this link
to page 2013-5.">page-5</a></li>-->
</ul>
</div>
</div>
</div>
<!--[if lte IE 6]></td></
tr></table></a><![endif]-->
</li>
<li><a
href="mailto:dave(at)davidfisher(dot)biz" accesskey="5" title="You can send
me an email by clicking the link">Contact</a></li>
<li><a href="http://
urban.davidfisher.biz/Toronto/Women'sCollege/
Women'sCollegeupdate.html" accesskey="6" title="This will take you to
the update page telling you what changes has been made for the site as
well when">Update Page</a></li>
</ul>
</div>
</div>
</div>
Re: Using server to list CSS page list in menu [message #172046 is a reply to message #172039] Fri, 28 January 2011 09:57 Go to previous messageGo to next message
Derek Turner is currently offline  Derek Turner
Messages: 48
Registered: October 2010
Karma: 0
Member
On Thu, 27 Jan 2011 21:14:23 -0800, drum118 wrote:

> Any help or pointers are welcome and time I start looking at server side
> coding based on how my site is growing.

Here's one: "photos" does not take an apostrophe.
Re: Using server to list CSS page list in menu [message #172049 is a reply to message #172039] Fri, 28 January 2011 14:41 Go to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/28/2011 12:14 AM, drum118 wrote:
> Below is a scrip I use for menu on various sections of my site that
> started out being one thing and now is something different.
>
> At this time I have over 500 variations of this scrip as each of them
> have different years as well some have less pages while others have
> more. The section names always changes.
>
> I am new to PHP as this would cut down on changing each page when I
> add more pages to a section or that section has more years added than
> plan.
>
> I want to do one page of code for each different menu and put it on
> the server to changes all the efected pages. A section call Toronto/
> Women'sCollege can be Mississuga/AbsoluteWorld or Transit/Hamilton and
> so on.
>
> I know I am looking at over a 1,000 different types of combination of
> menus and will climb over time.
>
> If I write page code call Women'sCollege.txt the following code would
> show up on thar text file.That file would be place in a folder call
> call menu or Torontomenu on the server.
>
> On the web pages is where I am not sure how to do the code and it
> could be something like this:
> <?php include("./menu/Women'sCollege.txt"); ?> or<?php include("./
> urbanToronto/Women'sCollege.txt"); ?> or<?php include("./transit/
> MississaugaTransit.txt"); ?> depending if it's an urban site or a
> transit site.
>
> I am not sure where to put the folder and the text files and it has
> been years since I did anything with the cgi and have forgot most of
> it.
>

It really doesn't matter where you put them, as long as they are in a
directory accessible to your web server. Use $_SERVER['DOCUMENT_ROOT']
to identify the absolute path to the server root directory then a
relative path to your menu based off of that.

But you don't necessarily need PHP for this - SSI (Server Side Includes)
can include files, also. And are you sure you're using cgi? Most
hosting companies run PHP as a module.

<completely irrelevant html and javascript snipped>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: sort array of objects by muliple values
Next Topic: Best strategy for creating an application scoped variable?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 23:20:24 GMT 2024

Total time taken to generate the page: 0.02408 seconds