Log in

View Full Version : Need a script



ngaps
07-17-2008, 10:37 PM
here is an example of the script i need
http://www.newschannel9.com/sections/sports/high-school-sports-events/

Anyone know how to make it??

Nile
07-18-2008, 12:38 AM
Can you please make it clear what you want. Did you want the bread crumb displayed there?

ngaps
07-18-2008, 12:44 AM
yes thats it

Nile
07-18-2008, 01:01 AM
Did you want a javascript one, or a php?
Here's a php one:


<?php
$site = $_SERVER[PHP_SELF];
$path = explode('/',$site);
for($i=0;$i<count($path);$i++){
echo ($i==0)?"Home ".$path[$i] : chr(62).chr(32).ucfirst($path[$i]).chr(32);
}
?>

jscheuer1
07-18-2008, 01:17 AM
If you have PHP (other server side languages could also be used), some of these results will show you how:

http://www.google.com/search?client=opera&rls=en&q=PHP+breadcrumb&sourceid=opera&ie=utf-8&oe=utf-8

You can also always just hard code the links, example from the source code of the page you gave to illustrate this:


<div id='breadcrumb' class='floatLeft'><h4><a href='/'>Home</a></h4> <span>&gt;</span> <h3><a href='/sections/sports/'>Sports Headlines</a></h3> <span>&gt;</span> <h2><a href='/sections/sports/high-school-sports-events/'>High School Sports Events</a></h2></div>

The problem with any solution is though, there is no real way of knowing how someone got to that particular page. It is all based upon a guess of what is most likely, coupled with a knowledge of the site's directory and/or page structure.

Nile
07-18-2008, 02:39 AM
If you have PHP (other server side languages could also be used), some of these results will show you how:

http://www.google.com/search?client=opera&rls=en&q=PHP+breadcrumb&sourceid=opera&ie=utf-8&oe=utf-8

You can also always just hard code the links, example from the source code of the page you gave to illustrate this:


<div id='breadcrumb' class='floatLeft'><h4><a href='/'>Home</a></h4> <span>&gt;</span> <h3><a href='/sections/sports/'>Sports Headlines</a></h3> <span>&gt;</span> <h2><a href='/sections/sports/high-school-sports-events/'>High School Sports Events</a></h2></div>

The problem with any solution is though, there is no real way of knowing how someone got to that particular page. It is all based upon a guess of what is most likely, coupled with a knowledge of the site's directory and/or page structure.

What a bore. :o

jscheuer1
07-18-2008, 04:18 AM
What a bore. :o

How helpful. :p What is boring to you may be fascinating to others. In any case, it is the fact of the matter. I only mentioned it because many people imagine that a breadcrumb script can somehow read the minds of people, know where they've been, that sort of thing. It cannot.