RE: [PHP] location bar
At 06:14 PM 8/15/2001, Wolfgang Schneider wrote: oops - i forgot - I use functions similar tp the ones used on php.net. when i call the function i pass $title to it define $title and it should work. :-) ~kurth On Tue, 14 Aug 2001 11:39:55 -0400, Kurth Bemis wrote: just stick this in a function as I did and you'll be sailing.its easy to update, and Extremely flexible. look at my code.. (rest snipped) Hi Kurth, and others I adjusted your code for the purpose of my site (replacing he values in the array and the homepage address, etc) ... but when I plugged it into a page for testing; i got the following results: Location : Home / Warning: Undefined variable: link in visitheadnav-1.inc on line 70 Besucher / Warning: Undefined index: support.php3 in visitheadnav-1.inc on line 68 Warning: Undefined variable: title in visitheadnav-1.inc on line 73 The code is part of an include file named visitheadnav-1.inc ... and apparently there is some link there in the code which is an undefined variable ... but I have no idea what this error message is about :-(The results Home/ and Besucher/ are actually correct ... it's just the undefined link problem I need to get figured out ... Here's the code I inserted into my visitheadnav-1.inc: p class=fn8Location : a href=http://www.bibelcenter.de.;Home/a / ?php $patharray = explode (/,$SCRIPT_NAME); $scriptname = basename($SCRIPT_NAME); for ($dirsi = 1; $dirsi count($patharray); $dirsi++) { $dirs = array( 'visitor' = 'Besucher', 'info' = 'Information', 'bibel' = 'Bibelarbeit', 'bibliothek' = 'Bibliothek', 'gebet' = 'Gebetsraum', 'links' = 'Internet Links', 'kids' = 'Kinderecke', 'shop' = 'Bookshop' ); $linkdes = $dirs[$patharray[$dirsi]]; $link = $link . /$patharray[$dirsi]; if ($patharray[$dirsi] == $scriptname){ $linkdes = $title; $slash = ; $linkhtml = a href=\$link\$linkdes/a$slash; if ($patharray[$dirsi] == index.php){ $link = ; $linkdes = ; $slash = ; $linkhtml = ; } }else{ $slash = / ; $linkhtml = a href=\$link\$linkdes/a$slash; } echo $linkhtml; } ?/p Any ideas, what may be wrong and causing these error messages? God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] location bar
On Tue, 14 Aug 2001 11:39:55 -0400, Kurth Bemis wrote: just stick this in a function as I did and you'll be sailing.its easy to update, and Extremely flexible. look at my code.. (rest snipped) Hi Kurth, and others I adjusted your code for the purpose of my site (replacing he values in the array and the homepage address, etc) ... but when I plugged it into a page for testing; i got the following results: Location : Home / Warning: Undefined variable: link in visitheadnav-1.inc on line 70 Besucher / Warning: Undefined index: support.php3 in visitheadnav-1.inc on line 68 Warning: Undefined variable: title in visitheadnav-1.inc on line 73 The code is part of an include file named visitheadnav-1.inc ... and apparently there is some link there in the code which is an undefined variable ... but I have no idea what this error message is about :-(The results Home/ and Besucher/ are actually correct ... it's just the undefined link problem I need to get figured out ... Here's the code I inserted into my visitheadnav-1.inc: p class=fn8Location : a href=http://www.bibelcenter.de.;Home/a / ?php $patharray = explode (/,$SCRIPT_NAME); $scriptname = basename($SCRIPT_NAME); for ($dirsi = 1; $dirsi count($patharray); $dirsi++) { $dirs = array( 'visitor' = 'Besucher', 'info' = 'Information', 'bibel' = 'Bibelarbeit', 'bibliothek' = 'Bibliothek', 'gebet' = 'Gebetsraum', 'links' = 'Internet Links', 'kids' = 'Kinderecke', 'shop' = 'Bookshop' ); $linkdes = $dirs[$patharray[$dirsi]]; $link = $link . /$patharray[$dirsi]; if ($patharray[$dirsi] == $scriptname){ $linkdes = $title; $slash = ; $linkhtml = a href=\$link\$linkdes/a$slash; if ($patharray[$dirsi] == index.php){ $link = ; $linkdes = ; $slash = ; $linkhtml = ; } }else{ $slash = / ; $linkhtml = a href=\$link\$linkdes/a$slash; } echo $linkhtml; } ?/p Any ideas, what may be wrong and causing these error messages? God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] location bar
Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re location bar How can a location bar such as the sample below be generated in php to be displayed in web pages ... Location : home:/category:sub_1:/page title Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/
RE: [PHP] location bar
The navigation system you are refering to is called breadcrumb navigation. You can find implementations of this all over the place. Try hotscripts.com or google.com. Kevin -Original Message- From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 12:35 AM To: php-general Subject: [PHP] location bar Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re location bar How can a location bar such as the sample below be generated in php to be displayed in web pages ... Location : home:/category:sub_1:/page title Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] location bar
At 11:02 AM 8/14/2001, Kevin L wrote: I had a similar problem.jason murray gave me some ideas ;-) just stick this in a function as I did and you'll be sailing.its easy to update, and Extremely flexible. look at my code.. font face=Verdana, Arial, Helvetica, sans-serif size=-2Location : a href=http://www.usaexpress.net;Home/a / ?php $patharray = explode (/,$SCRIPT_NAME); $scriptname = basename($SCRIPT_NAME); for ($dirsi = 1; $dirsi count($patharray); $dirsi++){ $dirs = array( 'company' = 'Company', 'services' = 'Services', 'support' = 'Support', 'mac' = 'Mac', 'winnt' = 'Windows NT', 'win9x' = 'Windows 9X', 'unix' = 'Linux And Unix', 'customers' = 'Customers', 'noc' = 'NOC', 'help' = 'USAexpress.net Help' ); $linkdes = $dirs[$patharray[$dirsi]]; $link = $link . /$patharray[$dirsi]; if ($patharray[$dirsi] == $scriptname){ $linkdes = $title; $slash = ; $linkhtml = a href=\$link\$linkdes/a$slash; if ($patharray[$dirsi] == index.php){ $link = ; $linkdes = ; $slash = ; $linkhtml = ; } }else{ $slash = / ; $linkhtml = a href=\$link\$linkdes/a$slash; } echo $linkhtml; } ?/font you can see it in action at www.usaexpress.net. look at the location below our logo. ~kurth The navigation system you are refering to is called breadcrumb navigation. You can find implementations of this all over the place. Try hotscripts.com or google.com. Kevin -Original Message- From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 12:35 AM To: php-general Subject: [PHP] location bar Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re location bar How can a location bar such as the sample below be generated in php to be displayed in web pages ... Location : home:/category:sub_1:/page title Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] location bar
if you're asking on how to show where you are, then this is what you could do: Create an array of page names: ie: $page_name = Array( '/' = 'Home', '/page1' = 'Page One' ); ... and so on Then just do echo $page_name[strtolower($PHP_SELF)]; This is only appropriate for small static sites, and is not really a solution. try to extend this idea, with maybe use of databases and go ahead. Also, look for such scripts. Tons of code was written already and some module like this, I think, you can easily find. Cheers, Maxim Maletsky www.PHPBeginner.com -Original Message- From: Wolfgang Schneider [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 14, 2001 3:35 PM To: php-general Subject: [PHP] location bar Hi everyone, I am somewhat new at the use of php and would appreciate if someone could help me with a question re location bar How can a location bar such as the sample below be generated in php to be displayed in web pages ... Location : home:/category:sub_1:/page title Is there a specific setup needed in terms of the directory structure on the server? Or will this only function with database type website? Thanks in advance for any input and helpful ideas ... God bless you with His grace and peace Wolfgang Looking for Biblical information? COME AND SEE! -- ONLINE Courses: http://classes.bibelcenter.de ... NEW! -- BibelCenter: http://www.bibelcenter.de -- Bookstore: http://www.worthy.net/BibelCenter/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]