This is a clone of Hackernews written in PHP.
- Submit stories or ask questions.
- Recursive comments
- Vote on questions and comments
- Stories are ranked based on user votes using an algorithm similar to hacker news ranking.
This has been tested on
- PHP >= 5.2.X
- MySQL >= 5.6
##Installation
Installation requires access to a command line.
- Clone/download the repository
- Install dependencies
composer install
- Rename config.ini.template to config.ini
- Update config.ini with your database information
- Make sure the database already exists (this installation does not create the database)
- Make sure the db user has permission to create tables.
- execute php install.php
- edit your crontab and add cron.php to execute every 30minutes.
- Open crontab for editing
crontab -e
Add this line, with ABSOLUTE_PATH_TO_INSTALL_FOLDER set correctly.
*/30 * * * * php /ABSOLUTE_PATH_TO_INSTALL_FOLDER/cron.php
- goto http://{{YOUR_WEBSITE}}/signup.php and create a new user:
- Done. Start creating stories.
- Rank comments using the same time weighted algorithm as stories
- Change comment table structure to make it more efficient.
Hackernews is released under the MIT License. See LICENSE file for details.