forum
forum based on yii2,this is an experimental product, not use for production, unless you know what you are doing, (*1)
forum feature.
community, wiki, edit Used markdown, tags, rbac, third-party login (weibo, qq), announcements, (*2)
DIRECTORY STRUCTURE
assets/ contains assets definition
commands/ contains console commands (controllers)
config/ contains application configurations
controllers/ contains Web controller classes
mail/ contains view files for e-mails
models/ contains model classes
runtime/ contains files generated during runtime
tests/ contains various tests for the basic application
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
web/ contains the entry script and Web resources
REQUIREMENTS
The minimum requirement by this application template that your Web server supports PHP 5.4.0.
The Memory limit must not lower than 6MB, recommended 128MB. You can open up requirements.php
file from root folder in browser to
explore more requirements details., (*3)
INSTALLATION
Install via github
clone https://github.com/yiier/forum.git
Then download Composer
take the composer.phar in the web root directory,using the following command:, (*4)
php composer.phar update --prefer-dist
You can then access the application through the following URL:, (*5)
http://localhost/forum/web/
Install via Composer
If you do not have Composer, you may install it by following the instructions
at getcomposer.org., (*6)
You can then install this application template using the following command:, (*7)
php composer.phar create-project --prefer-dist --stability=dev yiier/forum forum
Now you should be able to access the application through the following URL, assuming forum
is the directory
directly under the Web root., (*8)
http://localhost/forum/web/
SETUP
Database
Create the file config/db-local.php
with the connection infomation for your local environment, for example:, (*9)
return [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=127.0.0.1;dbname=forum', // Don't use localhost, Because IPv4/IPv6 recognition very slow to connect to mysql
'username' => 'root',
'password' => '1234',
'charset' => 'utf8',
];
NOTE: forum.sql
in the root folder, import it into the database, this has to be done manually before you can access it., (*10)
Also check and edit the other files in the config/
directory to customize your application., (*11)