SQLized index

From: jwarnica@ns.sympatico.ca (Jeff Warnica)
To: <ljdeveau@chebucto.ns.ca>, <ccn-ip@chebucto.ns.ca>, <editors@chebucto.ns.ca>
Cc: <ccn-ipe@chebucto.ns.ca>, <ccn-board@chebucto.ns.ca>, <ccn-tech@chebucto.ns.ca>
Date: Tue, 2 May 2000 23:59:30 -0300
Importance: Normal
Precedence: bulk
Return-Path: <ccn-ip-mml-owner@chebucto.ns.ca>

next message in archive
no next message in thread
previous message in archive
previous message in thread
Index of Subjects

Index of Subjects

Along the lines of automating the main CCN 'index' site, Ive quickly
prototyped a system that is created on the fly with everything stored in (a
single table) SQL database.

It is currently compleatlt devoid of sane formating, dosent handle mutiple
catagories in one (generated) document, has no online editing capabilities
(nor security for hand editing the SQL table), but with the philosophy of
'release early, release often' here it is:
http://phoenix.chebucto.ns.ca/index.php3 Only the top links have anything in
them.

Things to think about (if this looks interesting and we persue this) later
are:

security: editing privilages flow downwards (the owner/editor of '[root]'
can change anything, the owner/editor of 'Community Support and Development'
can change that and catagories under it (but not [root] or other [root]
linked catagories), the owner/editor of 'Supporting the Local Community' can
edit that (and catagories under it) but not 'Supporting Family')

ccn/friend promotion: put CCN sites at the top, followed by firends, with
other at the end (and alphanumericly inside)

cross referencing: change entries.iscatagory datatype to handle yahoo/dmoz
'@' style cross referencing

and lots of other stuff....

For those that are interested the SQL schema is:

mysql> describe entries;
+------------+--------------------------------+------+-----+---------+------
----------+
| Field      | Type                           | Null | Key | Default | Extra
|
+------------+--------------------------------+------+-----+---------+------
----------+
| entryid    | int(10) unsigned               |      | PRI | 0       |
auto_increment |
| name       | text                           | YES  |     | NULL    |
|
| uri        | text                           | YES  |     | NULL    |
|
| owner      | text                           | YES  |     | NULL    |
|
| updated    | timestamp(14)                  | YES  |     | NULL    |
|
| created    | timestamp(14)                  | YES  |     | NULL    |
|
| uplinkid   | int(10) unsigned               |      |     | 0       |
|
| priority   | enum('local','friend','other') |      |     | local   |
|
| iscatagory | enum('y','n')                  |      |     | n       |
|
+------------+--------------------------------+------+-----+---------+------
----------+
9 rows in set (0.00 sec)

and the important php stuff is:

while ($arr = mysql_fetch_array($sqlresult)) {
        print "<DT>";
        if ($arr['iscatagory']!='n') {
                print '<A
HREF="http://phoenix.chebucto.ns.ca/index.php3?thislevel=';
                print $arr['entryid'];
                print '">';
                print $arr['name'];
                echo "\n";
        }
        else {
                print '<A HREF="';
                print $arr['uri'];
                print '">';
                print $arr['name'];
                echo "\n";
        }
}

next message in archive
no next message in thread
previous message in archive
previous message in thread
Index of Subjects