As I said in my other topic, I would release all files I used as soon as they were finished. Well now they are. But they aren't perfect in any way. I don't think there are any security vulnerabilities, but I'm positive that they can be improved a lot.
http://www.pie-designs.net/pieweb.rar
What this script features:
- Reply system (Abuse protected)
- Content management system (Accessible through admin panel)
- Reply managing (Accessible through admin panel)
- Ip banning (Accessible though admin panel)
- login system (Only used for getting in admin panel)
-BBcode
Known bugs:
- Numbering of replies in the admin panel occasionally gets messed up, impact: minor
- Sorting content by date occasionally goes wrong. impact: minor
Requirements:
- A webserver which has php 4.0 or higher and a mysql database.
Important to know:
Mysql error reporting is on in every file. You will need to remove them manually. Though, you can just search for "mysql_error()" and replace it.
What this script will feature in later versions:
- Much more flexible
- A login system
and much more
How to install:
Note: This script is still in alpha phase and should therefor not be used in a live enviroment, unless you know what you're doing.
Download the file http://www.pie-designs.net/pieweb.rar
Extract the files somewhere on your webserver.
Run the sql file, delete it afterwards
Go to the following files and enter your mysql information: header.php, captcha.php, admin/header.php
Go to admin/insert.php and add your login information, and run it. Delete it afterwards.
Go to reply2.php and go to line 13, replace 'admin name' with your desired screenname.
Go to reply.php and go to line 42, replace 'admin' with your desired screenname.
Now for the even easier part.
Go to http://yourwebsite/admin/ then manage pages>Add new page
Now if for example your site has the pages index.php, news.php, about.php. Enter them in the field (One at a time)
Now go to manage pages>List all pages. You now should have something like this:
Page name: Page number:
index.php 1
news.php 2
about.php 3
Now open each of the files listed there and add at the top of the page
PHP Code:
<?php include("header.php); $page = pagenumber; ?>
So for index.php it would be:
PHP Code:
<?php include("header.php"); $page = 1;?>
Make sure that that line is the very first line in your page, so there can't be ANY html, or whatever above that line.
Then go to the very last line and add <?php include("footer.php"); ?> This will get the ip of anyone who connects, and look in the database to see if it's banned. You can ban ip's at http://yourwebsite/admin/banned.php
Now go to the line in your files where you want to display the stuff you're going to write and add
PHP Code:
<?php include("dcontent.php"); ?>
Note: You may want to change the size of the table in dcontent.php to make it fit into your layout. It's on line 24.
That were all the required steps, now for the optional one, adding the reply system.
Go to the file you want to add the reply system to. And add
PHP Code:
<?php
include("reply2.php");
include("reply.php");
?>
And that was it!