-
Notifications
You must be signed in to change notification settings - Fork 3
5. Customizations for your own Instance
After downloading the code from our GitHub Repository, you have to change some files to set it up for your own instance. This step includes:
- Change the database Settings to access your database.
- Change the Twitter Settings to use your Twitter Account.
- Change the hull.io Settings to use your hull.io Account.
Open and edit the db_connect.php
-file (stored in the php folder) and change the content to access your own database instance. You do not need to adapt the user php files, which access your database, because they use the settings, which you provide in the db_connect.php
file.
The database connection usually looks like "host=<host> port=<5432> dbname=<dbname> user=user password=<password>"
<?php
function getConnection(){
$db_connection = pg_connect("put_your_information here")
or die('Something went wrong: ' . pg_last_error());
return $db_connection;
}
?>
You have to create a new application for your own Twitter Account. More information can be found in our Social Media Integration Wiki.
After creating the Twitter Application, you need the change the twitter.php
-file, which can be found in the php-directory of this application. Please change the $setting-array
and paste keys of your application.
$settings = array(
'oauth_access_token' => "<your oauth_access_token>",
'oauth_access_token_secret' => "<your oauth_access_token_secret>",
'consumer_key' => "<your consumer_key>",
'consumer_secret' => "<your consumer_secret>"
);
You need to edit the um.js
-file, which can be found in the js-directory. Your hull.io organization and application ID need to be stated in this file. Open the file and edit the first lines to the following:
Hull.init({
"appId": "yourAppId",
"orgUrl": "yourOrganizationId"
},
function(hull, me, app, org) {
showMessages();
},
function(error) {
console.log(error);
}
);