Clone the repository with git:
git clone https://github.com/osvik/photo-petition.git
This project uses Gulp to generate the css and javascript. You need to install Gulp and the required modules. After that you need to generate the code in the terminal run the following commands:
cd path/to/your/downloaded-site
- Install gulp (read bellow)
gulp
You'll also need to install gulp's dependencies in the site's folder by running the commands:
sudo npm install --save-dev gulp-minify-css
sudo npm install --save-dev gulp-uglify
sudo npm install --save-dev gulp-rename
sudo npm install --save-dev gulp-concat
- Create and publish a working data capture campaign and note the
CLIENT_ID
,CAMPAING_ID
andFORM_ID
values from it's form.
- Rename
api/config-DIST.php
toapi/config.php
and changeclient_id
,campaign_id
andform_id
to match the numbers from the Engaging Networks form:
define('CLIENT_ID', 'xxxx' );
define('CAMPAIGN_ID', 'xxxxx');
define('FORM_ID', 'xxxx');
You need to confirm that the field names match the ones you are using in Engaging Networks. In case they don't you need to modify this script.
- Obtain a client id from IMGUR at https://api.imgur.com/oauth2/addclient
- Rename
config-DIST.js
toconfig.js
and change the authorization parametervar client_id
This program uses a sqlite database to store the image's URLs and other related information. This database can be edited with any online/offline compatible editor.
Ensure that the file with the images database (api/db/images.db
) and the parent folder (api/db/
) can be overwritten by the server. Use the right permissions/ownership for this folder and file.
If the api
folder is located a different server you may need to change the script.
Most, if not all translations can be done editing the files index.html
and config.js