php crumb trail

Joined
12 Feb 2006
Posts
17,627
Location
Surrey
don't know if anyone remembers me but you all helped me display all the folders below the current one which worked perfectly using the following code

Code:
<?php foreach ( glob("./*", GLOB_ONLYDIR) as $dir ) {
	if($dir=="./upload" || $dir=="." || $dir==".."){
	}else{
			echo "&raquo; <a href='$dir/imageview.php'>" . trim($dir, './') . "</a><br />";
	}
}	 ?>

After adding the code and seeing it all working thinking it would be good to leave a crumb trail (is that right saying) where it will display a link for the previous folders all the way to photos folder. for instance

photos >> Family >> Christmas >> 2007 >> Food

see how each is its own link and not just one big link.

After searching google the only stuff im finding doesn't work and has no comments so i can't learn how this works.

anyone care to show me how to do this and explain it to me?

finally small thing im hoping, i added a simple news system to dads gfs site whic she can add edit and delete news articles. the problem i just realised is that she will want stuff that is with bullet points, possibly colours etc so needs a text editor like this one and not the usual <input type=text" /> ones. Is there any i can simply just add into the site?

thanks all again youve been great help.
 

yay a reply :p . Didn't realise it was going to be a bigish job, thought it would be easy just something like, find root folder, display next folder name, display next, until the file or something like that.

anyways thanks for the help to come.
 
thankyou for doing this, you helping me huge amounts. when i started the site i wanted it to take jsut a week or so which it pretty much did but this bit killed me. other then stupid ie problems this is the last bit i need to get it useable so i really am greatful for your help.
 
thanks for the suggestion but i can't seem to get it to work. I have read it and read it and also read all the comments but can't seem to get it to do what i want from it.

by the sounds of it your code being more dynamic will be just what i am after so i am waiting out for that.

thanks again.
 
Back
Top Bottom