Configuration

Introduction

If you are using Socialveo Hosted, you don’t have to create a custom configuration file. Socialveo Team does this for you and asks you for the minimum required information. After the installation was successful, you will find a several configuration files. Continue reading to learn where the configuration files live and which properties can be set.

You are able to add a custom configuration file to override Socialveo’s default behaviour. Socialveo’s configuration is managed by PhalconPHP Config. A custom configuration file must be a valid PHP array and must be located in the socialveo/config folder.

Inside socialveo/config you can find config-core.php which is Socialveo’s core configuration file which you can override by creating another file named config.php.

You can create also another file named config-local.php for your local environment.

Configuration options

Socialveo has a number of configuration options which you can add to change things about how Socialveo works.

Database

'database'   =>  [
    'adapter' => 'Mysql',
    'host' => 'localhost',
    'username' => 'db-user',
    'password' => 'db-password',
    'dbname' => 'db-name',
    'charset' => 'utf8mb4'
],

API

'api' =>  [
    'communityName' => 'MyCommunityName',
    'offline'   => false, 
    'defaultLanguage' => 'en_US',
    'baseUri' => '/',
    'hostname' => "https://my-community-name.com",
    'availableLanguages'   => [
        'en_US' => 'English (United States)',
        'es_ES' => 'Español (España)'
    ],
],

NOTE:

  • offline: if you want to put your community online / offline you can enable here

Mail

'mail' => [
    'enabled' => true,
    'driver' => 'smtp', 
    'from' => [
        'email' => 'noreply@my-community-domain.com',
        'name' => 'MyCommunityName',
    ],
    'driver' => 'smtp', 
    'host' => 'smtp-host',
    'port' => 25,
    'username' => 'noreply@your-community-domain.com',
    'password' => 'smtp-password',
],

NOTE:

  • driver: if you you don’t have an SMTP, you can change to mail this value for use php function mail()

Social Login

'hybridauth' => [
    'base_url' => "https://$host/auth/redirect",
    'providers' => [
        'Facebook' => [
            'enabled' => true,
            'keys'    => ['id' => 'xxx', 'secret' => 'xxx'],
            'scope'   => 'public_profile, email, user_friends',
            'display' => 'popup',
        ],
        'Google' => [
            'enabled' => true,
            'keys'    => ['id' => 'xxx.apps.googleusercontent.com', 'secret' => 'xxx'],
            'scope'   => 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/user.birthday.read',
            'access_type'     => 'offline',
            'approval_prompt' => 'force',
        ],
    ],
],

NOTE:

Assets

'assets' => [
    'baseDir' => '/frontend/assets/',
    'targetDir' => '/concat/',
    'prefix' => '1-0-0', // change this to clear cache on production
    'overwrite' => false, // true on debug
    'minify' => true, // false on debug
    'require' => null,
],

NOTE:

Mentions

Socialveo allow you to customize how mention work. See more about how to configure mention.

    'mentions' => [ // customize mentions
        'friend' => [ // friends only
            '+', // NOTICE: friend type must use unique id (first symbol) what not used by any other types
            'fullname', // fullname or url
        ],
        'profile' => [ // regular user profile
            '@', // id can be the same as for 'network'
            'fullname', // fullname or url
        ],
        'network' => [ // networks
            '@', // id can be the same as for 'profile'
            'fullname', // fullname or url
        ],
    ],

 

This article is currently work in progress.

Was this article helpful?

Related Articles

Leave A Comment?

You must be logged in to post a comment.