RE: [PHP] SiteMap
| From: | Christopher Thompson | Date: | Thu, 14 Sep 2000 22:40:09 +0000 |
| Subject: | RE: [PHP] SiteMap | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-16850@lists.php.net to get a copy of this message | ||
Directed Graphs. Graph Theory. set of vertices, edges between the vertices,
adjacency lists!?
How about a database table with:
Key (unique autonumber value)
Page
Link
Scan the pages and create a data row for each link:
Key Page Link
1 index.php menu1.php
2 index.php menu2.php
3 menu1.php page1.php
4 menu2.php page2.php
5 menu3.php page3.php
The data table becomes a singly linked list that you can walk to build your
map. Just add some caption text to the records (e.g. <title>) and off you
go.
index.php
/ \
menu1.php menu2.php
/ / \
page1.php page2.php page2.php
> -----Original Message-----
> From: Sebastian Bergmann [mailto:sb@phpOpenTracker.de]
> Sent: Thursday, September 14, 2000 2:01 AM
> To: php-general@lists.php.net
> Subject: Re: [PHP] SiteMap
>
>
> Sebastian Bergmann wrote:
> > $adjacency_list[ "A" ][ 0 ] = "B"; // A -> B
> > $adjacency_list[ "A" ][ 0 ] = "C"; // A -> C
> > $adjacency_list[ "B" ][ 0 ] = "C"; // B -> C
>
> Sorry, I made a mistake here:
>
> $adjacency_list[ "A" ][ 0 ] = "B"; // A -> B
> $adjacency_list[ "A" ][ 1 ] = "C"; // A -> C
> $adjacency_list[ "B" ][ 0 ] = "C"; // B -> C
>
> --
> <?php $a=explode(" " ,"119 130 128 129 45 110 123 124 129 117
> 114 127 45 ".
> "125 117 125 45 117 110 112 120 114
> 127");for($i=0;$i<sizeof($a);$i++)print
> chr($a[$i]-13); /* http://sb.phpOpenTracker.de |
> sb@phpOpenTracker.de */ ?>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>