-
Notifications
You must be signed in to change notification settings - Fork 59
1. Installation
- Yii 2.0.8 or newer
The preferred way to install Podium is through Composer.
Run command composer require bizley/podium
or add "bizley/podium": "*"
to the require
section of your composer.json and run composer update
.
If you prefer not to use Composer follow instructions at the end of this page.
Update or add the following lines to your configuration file:
'bootstrap' => ['log', 'podium'],
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=host_address;dbname=database_name',
'username' => 'username',
'password' => 'password',
'charset' => 'utf8',
],
],
'modules' => [
'podium' => [
'class' => 'bizley\podium\Podium',
],
],
With this configuration Podium takes care of user identity which means that users can register and sign in independently from the main application (and because of that user signed in to the application will not be signed in to the Podium and vice versa).
If you would like Podium to inherit user application's identity (so users signed in to the application will be signed in to the Podium as well) follow instructions at Advanced Installation section.
Update or add the following lines to your console configuration file:
'bootstrap' => ['log', 'podium'],
'modules' => [
'podium' => 'bizley\podium\Podium',
],
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=host_address;dbname=database_name',
'username' => 'username',
'password' => 'password',
'charset' => 'utf8',
],
'mailer' => [
'class' => 'yii\swiftmailer\Mailer',
'useFileTransport' => false,
'transport' => [
'class' => 'Swift_SmtpTransport',
'host' => 'SMTP host',
'username' => 'SMTP username',
'password' => 'SMTP password',
'port' => 'SMTP port', // optional
'encryption' => 'SMTP encryption', // optional
],
],
],
Configure mailer components so Podium can send emails.
Go to the podium/install
(or podium/install/run
in case of not using UrlManager's pretty URLs) URL of your application.
Click Start Podium Installation button.
Podium will create all database tables and prepare administrator account.
Sign in to Podium using administrator account.
Go to the Administration section and then click the Settings tab.
Modify all necessary fields (make sure you set proper Podium "From" email address - otherwise there might be a problem with sending emails).
Add and customize the following cron job:
*/2 * * * * php /path/to/your/application/yii podium/queue/run &>/dev/null
This will try to send up to 100 emails every other minute.
If you are not a Composer fan you can download Podium preinstalled with Yii 2.
With every release you can find zip file attached named like yii2.*-with-podium*.zip.
Inside you get Podium with Yii 2 (Basic Application Template).
Some details:
- Yii 2 composer.json
require-dev
section has been removed along with its packages. - Podium is preconfigured with default minimal settings.
- All packages are up-to-date (at the time of preparing zip file).
More details about installing Yii 2 from an archive file can be found in the Guide.
cookieValidationKey
in theyii2-basic/config/web.php
file has already been set - change it if you want.
Follow the instructions at Configuring Web Servers.
If you want to change the default Podium configuration follow the instructions at Composer installation - steps #2 and #3.
This step is just like in the Composer installation from step #4 to #6.
yii2-podium | Yii 2 Forum module | Basic Installation | Advanced Installation