diff --git a/COPYRIGHT b/COPYRIGHT new file mode 100644 index 0000000..21ffee0 --- /dev/null +++ b/COPYRIGHT @@ -0,0 +1,17 @@ +Copyright (C) 2013 Jack-Benny Persson + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + diff --git a/README.md b/README.md index 5f88000..1f5b579 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ simplog ======= -simplog is a (very) simply PHP blog engine. It's supposed to be implemented into an existing webpage since this in only the engine part and does not contain a ccomplete webpage/blog of any kind. +simplog is a (very) simply PHP blog engine. It's supposed to be implemented into an existing webpage since this in only the engine part and does not contain a ccomplete webpage/blog of any kind. It's also intended to only have a single user. What's missing? --------------- -Pretty much everything, depending on how you plan to use it. simplog as of right now does not include anything to acually write/post blog posts. To create a blog post you have to manually create it in a MySQL database. -As of right now the only thing it can do is to display posts already created. +Pretty much everything, depending on how you plan to use it. Included is a template to create the MySQL table, a small HTML and PHP file to create new posts, an index.php that displays your posts and a config file to connect to a database and set number of posts per page. What's currently missing is a way to edit posts. Also you need to protect the user directory yourself (with for example a .htaccess file), or else everyone can post to your blog. How do I create the MySQL table? -------------------------------- diff --git a/config.php b/config.php new file mode 100644 index 0000000..d0aee44 --- /dev/null +++ b/config.php @@ -0,0 +1,12 @@ + diff --git a/index.php b/index.php index f1c55ce..fde24a0 100644 --- a/index.php +++ b/index.php @@ -1,31 +1,7 @@ -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; either version 2 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - - -// MySQL config options -$host = "localhost"; -$database = "test_db"; -$user = "test_db"; -$password = "test_pw"; - -// How many posts do we want on each page -$posts_per_page = 5; - +// Include config file +require "config.php"; // Connect to MySQL database $link = mysql_connect($host, $user, $password) diff --git a/user/createpost.php b/user/createpost.php new file mode 100644 index 0000000..3f685fa --- /dev/null +++ b/user/createpost.php @@ -0,0 +1,28 @@ + diff --git a/user/newpost.html b/user/newpost.html new file mode 100644 index 0000000..27297ad --- /dev/null +++ b/user/newpost.html @@ -0,0 +1,16 @@ +Create a new post + + +
+Date: (YYYY-MM-DD) +
+Title: +
+Text:
+ +
+ +
+ + +