Git Product home page Git Product logo

photo-petition's Introduction

How to install and configure this script

Downlad and install

Download

Clone the repository with git:

git clone https://github.com/osvik/photo-petition.git

How to build he project:

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

How to install 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

Configure

A - The connection with Engaging Networks

  1. Create and publish a working data capture campaign and note the CLIENT_ID, CAMPAING_ID and FORM_ID values from it's form.
  • Rename api/config-DIST.php to api/config.php and change client_id, campaign_id and form_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.

B - The connection to Imgur

  1. Obtain a client id from IMGUR at https://api.imgur.com/oauth2/addclient
  • Rename config-DIST.js to config.js and change the authorization parameter var client_id

C - The connection to the mages database

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.

D - The location of the api folder

If the api folder is located a different server you may need to change the script.

Translate

Most, if not all translations can be done editing the files index.html and config.js

photo-petition's People

Contributors

osvik avatar

Watchers

 avatar James Cloos avatar

photo-petition's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.