<commit_before>= README

== Brief description
A simple phorum in rails, including basic user and permission management, categories and topics. This project is a work in progress that I started to learn Rails. For this reason I didn't follow any particular code style, usually making similar things in different ways.
Also, I kept the CSS at a minimum and I don't plan to make this forum any "prettier". However, feel free to contribute in this or any other way :-)

== Main features
A category contains many topics, a topic contains many posts. The topics and posts are shown in pages when needed. A topic itself contains a message, and it's seen on top of all pages of this topic. Under the topic's message there are the posts, ordered so that the bottom ones were published later.

In Phorum, the guests can only read posts and user info, and there are three permission levels for registered users:
* *Level* *2:* *User.* Can make new posts and topics. Also, has power over his content (can edit or remove) and his profile. If he removes his account, all his messages will be edited so they say "DELETED".
* *Level* *1:* *Moderator.* Has power over all posts and topics.
* *Level* *0:* *Admin.* Has power over all users, can edit their profiles with some extra fields: An admin can change the permission level of another user and he can remove them in a way that all his posts and topics are totally deleted. Also, an admin has power over the categories and can create new ones. If there is no admin account in the Phorum, the next registered user becomes automatically an admin.
  
A topic is considered to be updated when someone posts something new OR a post is edited, so the last updated post doesn't have to be the same as in the "Last post" link.
  
When someone posts a link, it's transformed into an actual clickable link. If the link happens to be an image, the image is placed into the post. I've been extra careful with these features and made many security tests.

== Versions and dependencies
Requirements to make this work:
* ruby 2.0.0
* Rails 4.1.4
* mysql2 (this gem works well with MariaDB: https://mariadb.org/ )
* tzinfo-data (only for Windows)
* devise
* will_paginate 3.0
* rails_autolink
* Some default gems:
  * sass-rails 4.0.3
  * uglifier 1.3.0
  * coffe-rails 4.0.0
  * jquery-rails
  * turbolinks
  * jbuilder 2.0
  * scod 0.4.0

== Installation
Coming soon!
<commit_msg>Completed the readme<commit_after>= README

== Brief description
A simple phorum in rails, including basic user and permission management, categories and topics. This project is a work in progress that I started to learn Rails. For this reason I didn't follow any particular code style, usually making similar things in different ways.
Also, I kept the CSS at a minimum and I don't plan to make this forum any "prettier". However, feel free to contribute in this or any other way :-)

== Main features
A category contains many topics, a topic contains many posts. The topics and posts are shown in pages when needed. A topic itself contains a message, and it's seen on top of all pages of this topic. Under the topic's message there are the posts, ordered so that the bottom ones were published later.

In Phorum, the guests can only read posts and user info, and there are three permission levels for registered users:
* *Level* *2:* *User.* Can make new posts and topics. Also, has power over his content (can edit or remove) and his profile. If he removes his account, all his messages will be edited so they say "DELETED".
* *Level* *1:* *Moderator.* Has power over all posts and topics.
* *Level* *0:* *Admin.* Has power over all users, can edit their profiles with some extra fields: An admin can change the permission level of another user and he can remove them in a way that all his posts and topics are totally deleted. Also, an admin has power over the categories and can create new ones. If there is no admin account in the Phorum, the next registered user becomes automatically an admin.
  
A topic is considered to be updated when someone posts something new OR a post is edited, so the last updated post doesn't have to be the same as in the "Last post" link.
  
When someone posts a link, it's transformed into an actual clickable link. If the link happens to be an image, the image is placed into the post. I've been extra careful with these features and made many security tests.

== Versions and dependencies
Requirements to make this work:
* ruby 2.0.0
* Rails 4.1.4
* mysql2 (this gem works well with MariaDB: https://mariadb.org )
* tzinfo-data (only for Windows)
* devise
* will_paginate 3.0
* rails_autolink
* Some default gems:
  * sass-rails 4.0.3
  * uglifier 1.3.0
  * coffe-rails 4.0.0
  * jquery-rails
  * turbolinks
  * jbuilder 2.0
  * scod 0.4.0

== Installation
This project was developed on Windows, because any idiot could do it in Linux. There is no honor in going by the easy path. However, these instructions are for GNU/Linux systems, and were tested in Ubuntu:
* First, ensure that you have your ruby on rails environment correctly installed, with the same or above versions as specified above. You should also have the bundler gem installed with rails, check it with <tt>bundle -v</tt>.
* Then comes the database configuration. The phorum should work well with MySQL or MariaDB. <tt>apt-get install mariadb-server mariadb-client libmariadbd-dev libmariadbclient-dev</tt> should do the trick. Then you mess with <tt>config/database.yml</tt> file (the default configuration should work also) and create the database and user accordingly in the usual mysql syntax.
* Run <tt>bundle install</tt>
* Run <tt>rake db:migrate</tt>
* Run <tt>rails s</tt>, go to http://localhost:3000. If everything went well, you should be seeing the Phorum main page, with no categories yet. Sign up and create some!

The project is also Windows-ready, but it's still a real pain just to get it working. Contact me if you need support on this.

{'fraction_non_alphanumeric': 0.060184409052808044, 'fraction_numerical': 0.009388097233864207, 'mean_word_length': 4.034599156118143, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5576811', 'n_tokens_mistral': 1621, 'n_tokens_neox': 1544, 'n_words': 961}