From eee98526c48b9154cd9e9bc8bc3e07769e6a39ea Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 22 Feb 2009 13:15:37 -0500 Subject: Rewrote Pillowcase NOTE: There is a new database schema now, so the database from the testing server has to be copied over to the production server, otherwise this code will fail. --- .hgignore | 3 +- .htaccess | 7 +-- about.php | 31 ------------ admin/.htaccess | 4 -- admin/add.php | 30 ----------- admin/index.php | 27 ---------- admin/login.php | 30 ----------- admin/logout.php | 7 --- admin/main.php | 8 --- admin/manage.php | 15 ------ admin/remove.php | 10 ---- admin/update.php | 5 -- archive.php | 23 --------- contribute.php | 117 ------------------------------------------- db.php | 8 --- footer.php | 14 ------ header.php | 49 ------------------ images/comics/empty | 0 images/template.png | Bin 0 -> 1196 bytes images/title.png | Bin 0 -> 7599 bytes includes/db.php | 8 +++ includes/footer.php | 14 ++++++ includes/functions.php | 35 +++++++++++++ includes/header.php | 52 ++++++++++++++++++++ index.php | 119 ++++---------------------------------------- pages/about.php | 21 ++++++++ pages/archive.php | 14 ++++++ pages/comic.php | 131 +++++++++++++++++++++++++++++++++++++++++++++++++ pages/contribute.php | 51 +++++++++++++++++++ style.css | 6 ++- template.png | Bin 1196 -> 0 bytes title.png | Bin 7599 -> 0 bytes 32 files changed, 346 insertions(+), 493 deletions(-) delete mode 100644 about.php delete mode 100755 admin/.htaccess delete mode 100644 admin/add.php delete mode 100755 admin/index.php delete mode 100644 admin/login.php delete mode 100644 admin/logout.php delete mode 100644 admin/main.php delete mode 100644 admin/manage.php delete mode 100644 admin/remove.php delete mode 100644 admin/update.php delete mode 100644 archive.php delete mode 100644 contribute.php delete mode 100755 db.php delete mode 100644 footer.php delete mode 100644 header.php create mode 100644 images/comics/empty create mode 100644 images/template.png create mode 100644 images/title.png create mode 100755 includes/db.php create mode 100644 includes/footer.php create mode 100644 includes/functions.php create mode 100644 includes/header.php mode change 100755 => 100644 index.php create mode 100644 pages/about.php create mode 100644 pages/archive.php create mode 100755 pages/comic.php create mode 100644 pages/contribute.php delete mode 100644 template.png delete mode 100644 title.png diff --git a/.hgignore b/.hgignore index 378539b..2db41f3 100644 --- a/.hgignore +++ b/.hgignore @@ -1,2 +1 @@ -images/ -moderation/ +images/.*\.png diff --git a/.htaccess b/.htaccess index b09d5dc..b79eae1 100644 --- a/.htaccess +++ b/.htaccess @@ -1,10 +1,11 @@ RewriteEngine On -RewriteRule comic([0-9]+).htm /index.php?id=$1 [QSA,L] -RewriteRule scripts/ / [R] +RewriteRule comic([0-9]+).htm /index.php?area=comic&id=$1 [QSA,L] +RewriteRule pages/ / [R] +RewriteRule includes/ / [R] RewriteRule config.php / [R] RewriteRule header.php / [R] RewriteRule footer.php / [R] RewriteCond %{REQUEST_FILENAME} !.png RewriteRule images/ / [R] RewriteCond %{REQUEST_FILENAME} .htm -RewriteRule (.+).htm $1.php [QSA] +RewriteRule (.+).htm /index.php?area=$1 [QSA,L] diff --git a/about.php b/about.php deleted file mode 100644 index 83b284a..0000000 --- a/about.php +++ /dev/null @@ -1,31 +0,0 @@ - -

About

- -

- Pillowcase is a Four Island project, majorly operated by Starla Insigna, though - it is possible that other people may have contributed to it (see contributing). -

- -

- Pillowcase is a webcomic about.... you guessed it, a Pillowcase. While ordinarily this may seem drab and boring, some - people can be insane very imaginative. This comic updates daily with a new short edition of the - Pillowcase's latest act of insanity. -

- -

- Pillowcase was originally a fake news story on another Four Island project, - True Falsities (the story). - It was a short story about how Bluemonkey (a Four Island regular), after going a bit insane, started a webcomic - called "Pillowcase". The story was written by Starla, so she is not stealing anyone's ideas. Anyway, after writing the - story and providing the first 11 Pillowcase comics with it, Starla went a little Pillowcase-insane and turned it - into a real webcomic. -

- diff --git a/admin/.htaccess b/admin/.htaccess deleted file mode 100755 index d590e40..0000000 --- a/admin/.htaccess +++ /dev/null @@ -1,4 +0,0 @@ -RewriteEngine On -RewriteCond %{REQUEST_FILENAME} !index.php -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule (.*).php /admin/index.php?file=$1 [QSA,L] diff --git a/admin/add.php b/admin/add.php deleted file mode 100644 index 96a9219..0000000 --- a/admin/add.php +++ /dev/null @@ -1,30 +0,0 @@ - - -Added comic ! diff --git a/admin/index.php b/admin/index.php deleted file mode 100755 index 3a5f6be..0000000 --- a/admin/index.php +++ /dev/null @@ -1,27 +0,0 @@ - diff --git a/admin/login.php b/admin/login.php deleted file mode 100644 index f938664..0000000 --- a/admin/login.php +++ /dev/null @@ -1,30 +0,0 @@ - -
-Username:
-Password:
-
-

Incorrect login

diff --git a/admin/logout.php b/admin/logout.php deleted file mode 100644 index 639e045..0000000 --- a/admin/logout.php +++ /dev/null @@ -1,7 +0,0 @@ - diff --git a/admin/main.php b/admin/main.php deleted file mode 100644 index aa01262..0000000 --- a/admin/main.php +++ /dev/null @@ -1,8 +0,0 @@ -

Admin Panel

- - diff --git a/admin/manage.php b/admin/manage.php deleted file mode 100644 index 2485520..0000000 --- a/admin/manage.php +++ /dev/null @@ -1,15 +0,0 @@ - - -Back to Admin diff --git a/admin/remove.php b/admin/remove.php deleted file mode 100644 index 824fdee..0000000 --- a/admin/remove.php +++ /dev/null @@ -1,10 +0,0 @@ - - -Removed comic ! diff --git a/admin/update.php b/admin/update.php deleted file mode 100644 index c84c2c4..0000000 --- a/admin/update.php +++ /dev/null @@ -1,5 +0,0 @@ - diff --git a/archive.php b/archive.php deleted file mode 100644 index 02fffbf..0000000 --- a/archive.php +++ /dev/null @@ -1,23 +0,0 @@ -

Archive

- - - diff --git a/contribute.php b/contribute.php deleted file mode 100644 index d580a7a..0000000 --- a/contribute.php +++ /dev/null @@ -1,117 +0,0 @@ - -

Contribute

- -

- Aha, contributing! Starla admits that she isn't the only person on Earth. If you wish to contribute a comic to - Pillowcase, you can. But you have to follow the procedure below. -

- -

- First, of course, you have to actually write the comic. You can download the template here. - There are some rules about how you can layout the comic, though. - -

-

- -

- Second, come up with a title and some alt text (a.k.a. the addendum that appears when you hover over the comic with - your mouse). -

- -

- Finally, fill out the form below. Upload your comic in the appropriate field. If you wish to be credited for your - comic, fill out the Author field as well. Submit the form and your comic will be added to the moderation list where - Starla will review it and (hopefully!) put it on the pending list! -

- -

Attention!

- -

- Starla's suddenly lost all hope in her programming (for the time being), so instead of filling out a form, please - contact her with the comic image and - the required details. Thanks! -

- -

Contribute

- -

- You have successfully uploaded a comic! Woo-hoo! Now, Starla will review it and (hopefully) add it to the pending - queue! Good luck! -

- -

Contribute

- -

- Uh oh, due to some unknown reason (are you sure you uploaded an image?), the comic upload failed! That's not good. - Please go back to the form and ensure you filled it in correctly. -

- -

Contribute

- -

- Uh oh, you neglected to add an "alt text" description to your comic upload! That's a required field, so you have to - go back and try filling in the form again. -

- -

Contribute

- -

- Uh oh, you neglected to add an title to your comic upload! That's a required field, so you have to go back and try - filling in the form again. -

- diff --git a/db.php b/db.php deleted file mode 100755 index a763283..0000000 --- a/db.php +++ /dev/null @@ -1,8 +0,0 @@ - diff --git a/footer.php b/footer.php deleted file mode 100644 index da2d072..0000000 --- a/footer.php +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - diff --git a/header.php b/header.php deleted file mode 100644 index dbbb5bf..0000000 --- a/header.php +++ /dev/null @@ -1,49 +0,0 @@ - - - <?php echo($rtitle); ?> - - - - -
- - - diff --git a/images/comics/empty b/images/comics/empty new file mode 100644 index 0000000..e69de29 diff --git a/images/template.png b/images/template.png new file mode 100644 index 0000000..77a3ef5 Binary files /dev/null and b/images/template.png differ diff --git a/images/title.png b/images/title.png new file mode 100644 index 0000000..951cc5b Binary files /dev/null and b/images/title.png differ diff --git a/includes/db.php b/includes/db.php new file mode 100755 index 0000000..a763283 --- /dev/null +++ b/includes/db.php @@ -0,0 +1,8 @@ + diff --git a/includes/footer.php b/includes/footer.php new file mode 100644 index 0000000..da2d072 --- /dev/null +++ b/includes/footer.php @@ -0,0 +1,14 @@ + + +
+ + + + diff --git a/includes/functions.php b/includes/functions.php new file mode 100644 index 0000000..edb666b --- /dev/null +++ b/includes/functions.php @@ -0,0 +1,35 @@ + diff --git a/includes/header.php b/includes/header.php new file mode 100644 index 0000000..0f5b075 --- /dev/null +++ b/includes/header.php @@ -0,0 +1,52 @@ + + + <?php echo($rtitle); ?> + + + + +
+ + + diff --git a/index.php b/index.php old mode 100755 new mode 100644 index d1178a0..3738020 --- a/index.php +++ b/index.php @@ -1,123 +1,24 @@ -
-
-
-
- - -
- -
-

- -
Guest comic by
- -
-
- -
- <?php echo(htmlentities($getimage3['text'])); ?> -
- -
- - - -
+include($filename); -

- pillowcase - the result of an obsession with cute, plush objects that talk nonsense -

+$doc = ob_get_contents(); -

- because we luv xkcd, make sure you look for the alt text -

- -

- - there is 1 comic in the pending queue, which means that if Starla wants to be lazy and can't be bothered to update, she can relax for 1 more day before she starts getting angry emails - - oh dear, there aren't any comics in the pending queue, which means that if Starla doesn't hurry up, there may not be a comic tomorrow - 100): ?> - OMG! There are comics in the pending queue! Starla, you relax as long as you want! - - there are comics in the pending queue, which means that if Starla wants to be lazy and can't be bothered to update, she can relax for days before she starts getting angry emails - -

- diff --git a/pages/about.php b/pages/about.php new file mode 100644 index 0000000..c85544f --- /dev/null +++ b/pages/about.php @@ -0,0 +1,21 @@ +

About

+ +

+ Pillowcase is a Four Island project, majorly operated by Starla Insigna, though + it is possible that other people may have contributed to it (see contributing). +

+ +

+ Pillowcase is a webcomic about.... you guessed it, a Pillowcase. While ordinarily this may seem drab and boring, some + people can be insane very imaginative. This comic updates daily with a new short edition of the + Pillowcase's latest act of insanity. +

+ +

+ Pillowcase was originally a fake news story on another Four Island project, + True Falsities (the story). + It was a short story about how Bluemonkey (a Four Island regular), after going a bit insane, started a webcomic + called "Pillowcase". The story was written by Starla, so she is not stealing anyone's ideas. Anyway, after writing the + story and providing the first 11 Pillowcase comics with it, Starla went a little Pillowcase-insane and turned it + into a real webcomic. +

diff --git a/pages/archive.php b/pages/archive.php new file mode 100644 index 0000000..c1cd8ab --- /dev/null +++ b/pages/archive.php @@ -0,0 +1,14 @@ +

Archive

+ + diff --git a/pages/comic.php b/pages/comic.php new file mode 100755 index 0000000..0edd91c --- /dev/null +++ b/pages/comic.php @@ -0,0 +1,131 @@ + +
+
+
+
+ + +
+ +
+

+ +
Guest comic by
+ +
+
+ +
+ + + + <?php echo(htmlentities($getcomic3['text'])); ?> + + + +
+ +
+ + + +
+ +

+ pillowcase - the result of an obsession with cute, plush objects that talk nonsense +

+ +

+ because we luv xkcd, make sure you look for the alt text +

+ +

+ + there is 1 comic in the pending queue, which means that if Starla wants to be lazy and can't be bothered to update, she can relax for 1 more day before she starts getting angry emails + + oh dear, there aren't any comics in the pending queue, which means that if Starla doesn't hurry up, there may not be a comic tomorrow + 100): ?> + OMG! There are comics in the pending queue! Starla, you relax as long as you want! + + there are comics in the pending queue, which means that if Starla wants to be lazy and can't be bothered to update, she can relax for days before she starts getting angry emails + +

+ diff --git a/pages/contribute.php b/pages/contribute.php new file mode 100644 index 0000000..eb99e08 --- /dev/null +++ b/pages/contribute.php @@ -0,0 +1,51 @@ + +

Contribute

+ +

+ Aha, contributing! Starla admits that she isn't the only person on Earth. If you wish to contribute a comic to + Pillowcase, you can. But you have to follow the procedure below. +

+ +

+ First, of course, you have to actually write the comic. You can download the template + here. There are some rules about how you can layout the comic, though. + +

+

+ +

+ Second, come up with a title and some alt text (a.k.a. the addendum that appears when you hover over the comic with + your mouse). +

+ +

+ Finally, fill out the form below. Upload your comic in the appropriate field. If you wish to be credited for your + comic, fill out the Author field as well. Submit the form and your comic will be added to the moderation list where + Starla will review it and (hopefully!) put it on the pending list! +

+ +

Attention!

+ +

+ Starla's suddenly lost all hope in her programming (for the time being), so instead of filling out a form, please + contact her with the comic image and + the required details. Thanks! +

diff --git a/style.css b/style.css index 6894969..0699038 100755 --- a/style.css +++ b/style.css @@ -76,7 +76,7 @@ div.image { div#header h1 { text-indent: -9999px; - background-image: url(/title.png); + background-image: url(/images/title.png); height: 115px; width: 500px; } @@ -93,3 +93,7 @@ ul#archive { text-align: center; padding-left: 0; } + +a img { + border: 0; +} diff --git a/template.png b/template.png deleted file mode 100644 index 77a3ef5..0000000 Binary files a/template.png and /dev/null differ diff --git a/title.png b/title.png deleted file mode 100644 index 951cc5b..0000000 Binary files a/title.png and /dev/null differ -- cgit 1.4.1