Merged branch 'no-javascript' with notes
authorDylan Lloyd <dylan@psu.edu>
Thu, 17 Feb 2011 04:38:42 +0000 (23:38 -0500)
committerDylan Lloyd <dylan@psu.edu>
Thu, 17 Feb 2011 04:38:42 +0000 (23:38 -0500)
commit0d5b65dd317eda7cd09d208c634067c4a9acb6fd
tree99fae7dd432f43d667df78831b32e478471a0175
parenta74a20d64f0c3c757c9a97f9f9a858adca266221
Merged branch 'no-javascript' with notes

Now gracefully falls back to friendly URL's when javascript is disabled. Links are adjusted to anchors with javascript on page load.

notes/ are paginated with index.php and rewritten to from /notes/page/# and notes are permalinked at /notes/note_title. index.php loads exhibits from MySQL to allow for this.

notes/ are published via publish.py, and exhibits are published via publish_projects.py. THESE SCRIPTS ARE NOT SAFE - they trust user input implicitly and are chmodded 700.

mysql> show tables;
+----------------------------+
| Tables_in_dylanstestserver |
+----------------------------+
| notes                      |
| projects                   |
+----------------------------+
2 rows in set (0.00 sec)

mysql> desc notes;
+-------------+--------------+------+-----+---------+----------------+
| Field       | Type         | Null | Key | Default | Extra          |
+-------------+--------------+------+-----+---------+----------------+
| id          | int(11)      | NO   | PRI | NULL    | auto_increment |
| date_posted | date         | NO   |     | NULL    |                |
| title       | varchar(255) | NO   |     | NULL    |                |
| text        | longblob     | NO   |     | NULL    |                |
| url         | varchar(255) | NO   |     | NULL    |                |
+-------------+--------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)

mysql> desc projects;
+-------+--------------+------+-----+---------+----------------+
| Field | Type         | Null | Key | Default | Extra          |
+-------+--------------+------+-----+---------+----------------+
| id    | int(11)      | NO   | PRI | NULL    | auto_increment |
| title | varchar(255) | NO   |     | NULL    |                |
| text  | longblob     | NO   |     | NULL    |                |
+-------+--------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)
17 files changed:
.gitignore [deleted file]
.htaccess
includes/all.js
includes/style.css
includes/tabs.js
index.php
notes/index.php
notes/notes.php
projects/drawcss.html [new file with mode: 0644]
projects/i_like_pandora.html [new file with mode: 0644]
projects/peepshow.html [new file with mode: 0644]
projects/readoo.html [new file with mode: 0644]
projects/repthis.html [new file with mode: 0644]
projects/youtube_backup.html [new file with mode: 0644]
publish.py
publish_projects.py [new file with mode: 0755]
sample.ini [new file with mode: 0644]