Closed Thread Icon

Preserved Topic: Directory nav script? (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=20922" title="Pages that link to Preserved Topic: Directory nav script? (Page 1 of 1)" rel="nofollow" >Preserved Topic: Directory nav script? <span class="small">(Page 1 of 1)</span>\

 
Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 05-31-2001 00:57

Ok, please don't attack me if this is so incredibly simple, but where can I find a PHP script that will embed those nifty directory bars at the top of the page? You know the sort:



[edit]Yes, I have looked for this and lots of things come close but I just can't find what's in the pic[/edit]



[This message has been edited by Bugimus (edited 05-31-2001).]

[This message has been edited by Bugimus (edited 05-31-2001).]

JKMabry
Maniac (V) Inmate

From: out of a sleepy funk
Insane since: Aug 2000

posted posted 05-31-2001 03:08

do a search on "breadcrumbs"

gotta keep abreast of the latest buzzwords

Jason

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 05-31-2001 05:09

Well... let me give you the off the top of the head stuff.

You could do it by embedding where you have gone, and then placing the information into all the links on the page, could do this by parsing the content in, and replacing the end with the correct query string.

You could use cookies, which may be painful.

The other way would be to hard code it.

Or... this seem novel, this might be the best way.

Keep the files in a strict directory structure, that then translates into the menu at the top.

You would traverse the directory stucture place it in an array than play it back.

That might be a bit time intensive however.

I was at downloads.cnet.com and looking theirs over on the surface.

CNET : Downloads : PC

which IMO would be set by the page I select (downloads.cnet.com) as well as computer type.

I then select internet (http://download.cnet.com/downloads/0-10013.html?tag=dir)

CNET : Downloads : PC : Internet

This is a bit interesting. We get a nice little .html page with a query string.
This is where a lot of different things can be occuring. The .html does not mean that the pages are not being parsed, in all likely hood they are all being parsed, and more likely than not all dynamically created, maybe on the daily or weekly basis. I would not claim to know how they are doing it.

I am assuming that the numbers in the file name are what trigger the structure. The organization is probabally stored in some advanced data structure, so that they can quickly do a find and then step backwards for the display.

If I were serving up that many files, I would probabally create a B-Tree (not binary) structure based on the current structure and use that. The numbers would be used for possition in the tree, and so forth.

It could get pretty complicated in here. I may not be complicated I would need to see the source.

Here is a page I found: http://www.evolt.org/article/Breadcrumbs_for_PHP_Lovers/17/4455/

And another one I picked up: http://www.zend.com/zend/spotlight/breadcrumb28.php

And the last one I will give you: http://www.phpbuilder.com/snippet/detail.php?type=snippet&id=184


bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 05-31-2001 05:47

Yar,

The real trick here is retrieving the valuess for the breadcrumb. Most sites are set up diferently and the content trees working differently making this kind of thing unique to your site.

In other words I know how we do it but I don't think it would help you.
It's in TcL to boot.


Walking the Earth like Kane

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 05-31-2001 06:18

True bliss comes when you go a step farther, and implement your entire navigation plan using database tables.
Decide how many levels deep your outline is, and implement that many columns for navigation values.
Every link in the site would be to index.php:
http://example.com/index.php?top=0&side=0&inner=0 would be your home page.

To insert a page into the middle of your hierarchy, just assign it an outline position and insert a row in your table. Your table will have a field that either contains the content, or a filesystem pointer to the content. In our case, we named an include file 0.0.0.inc for the content on the home page, and compute the correct include file name.

Then all your navigation bars, breadcrumbs, etc. are dynamic, can easily reflect the current page using color/highlighting/whatever. The real win is in maintenance. Just insert a table row and you've got a new page, with all the appropriate links in all the navbars throughout the site.

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 05-31-2001 07:58

Wow! Thank you all *very* much. I had no idea this method was called breadcrumbs but it's a good name for it. I'm sure I'll be able to find a solution from all these great resources.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 05-31-2001 09:49

Bugimus, I wrote a simple breadcrumbs JS for Pugzly. It parses directories from the URL (Pugzly organized web site in that way) and generate breadcrumbs. You can see it here: http://www.max.co.yu/ozone/crumbs3.html

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 05-31-2001 21:36

I was gonna say to post it on the Gurus Network. They have breadcrumbs working over there, and I'm pretty sure I even remember a thread Pugzly started about breadcrumbs in the forum there.



- Resolutions, Of All My Fruitless Searches -

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 06-01-2001 02:38

I can say this: after searching high and low for a bread crumbs script or tutorial, Mr. Max's script is PERFECTION in programming. I was going to find a way of posting his code on Gurus Network once I made sure it did what I needed. It grabs the directory structure and carves them into crumbs. It does things like Capitalize them, and has switches to turn the HOME and TITLE crumbs on/off. You can specify how far into the directory structure to go (from the beginning of the URL or from the end of the URL), and can take directories like "my_stuff" and turn it into a "My Stuff" bread crumb.

As far as I can tell, this latest version is flawless. I realize it's not PHP as Bugimus requested, but.....

Can you tell that I like it?

I have it in a site we're working on - check it out at SWAT.

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 06-01-2001 16:09

I got a JS error, and saw no BC... i.e. 5.0

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 06-01-2001 16:23

worked for me, IE 5.5/Win98.

WarMage
Maniac (V) Mad Scientist

From: Rochester, New York, USA
Insane since: May 2000

posted posted 06-01-2001 18:34

Yeah tried it on i.e. 5.5 and it works. You need to have an index.html in each of your folders pugs, it just takes me to the dir when I click the back links.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 06-01-2001 20:09

WarMage, the JS error that you're getting is probably caused by BrainJar's Navigation Bar script, because it works in IE5.5 / Mozilla only! So, that's not fault of my breadcrumbs script. Also, as far as index.html files are concerned, Pugzly is still developing that web site (read "it's under construction").

« BackwardsOnwards »

Show Forum Drop Down Menu