Download on Github

Download

Download, Fork and Contribute on GitHub

Read Documentation

Documentation

Read Documentation on how to use ContribSurvey Class

Check out our Demo

See Demo

Check out the demo we made!

Screenshot of Contrib Survey

— An easier way to Create or integrate Surveys within your Codeigniter application.

— Create your own Survey forms, Modify your own Questionnaires, View Statistical results.

Download and Integrate the ContribSurvey Library for CodeIgniter.

Why CodeIgniter

CodeIgniter is one of the best and most powerful PHP framework with a very small footprint, built for PHP coders who need a simple and elegant toolkit to create full-featured web applications.

Contrib Survey - Installation

  1. Download the CodeIgniter Module, which provides a complete Survey Demo Page integrated with our ContribSurvey Library
  2. Integrate the library found in 'applications/libraries/contribsurvey.php'
  3. The controller that uses the library is in 'applications/controllers/csurvey.php'
  4. Make sure to replace the API key — $param = array("key"=>"YOUR_KEY");
  5. Get API key from http://www.developers.contrib.com
  6. The complete API methods can be found on the API Documentation tab

Download Demo

getsurveys

Fetch all surveys available.
Parameters

api_keyRequired. API key.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=getsurveys&api_key=XXXX
Sample JSON Response
[{
   "sid":"08F54B",
   "title":"Weight Management Survey",
   "template":"GrassRoots.php"
},
{
   "sid":"596A45",
   "title":"Music Stuff",
   "template":"CorporateBoxes.php"
}]

gettemplates

Fetch all survey templates available.
Parameters

api_keyRequired. API key.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=gettemplates&api_key=XXXX
Sample JSON Response
[{
   "AskPeopleDefault.php",
   "CorporateBoxes.php",
   "GreenGiant.php",
   "NewTemplate.php",
   "SimpleBlue.php",
}]

getquestions

Fetch all questionnaires available
Parameters

api_keyRequired. API key.
sidRequired. Survey ID.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=getquestions&api_key=XXXX&sid=XXXX
Sample JSON Response
[{
   "questionid":"1",
   "type":"multi",
   "validation":"optional",
   "questiontext":"Which TV station do you often tune in?",
   "options":{
      "CW":"CW",
      "CBS":"CBS",
      "Fox":"Fox",
      "NBC":"NBC",
      "CNN":"CNN"
   },
   "scale":null
},
{
   "questionid":"4",
   "type":"single",
   "validation":"required",
   "questiontext":"What timeslot do you usually tune in?",
   "options":{
      "before10am":"before 10 am",
      "10am3pm":"10am - 3pm",
      "3pm7pm":"3pm - 7pm",
      "6pmto12mn":"6pm to 12mn"
    },
   "scale":null
}]
Possible Errors
— invalid sid

createsurvey

Creates a new survey
Parameters

api_keyRequired. API key.
titleRequired. Main title of the survey.
templateRequired. Selected template for the survey.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=createsurvey&api_key=XXXX&title=XXXX&template=XXXX
Sample JSON Response
[{
   "success":true,
   "sid":"D54AC1"
}]
Possible Errors

— title parameter required
— template parameter required


addquestion

Adds a question under a specific survey
Parameters

api_keyRequired. API key.
sidRequired. Survey ID.
qtypeRequired. Question field type.
qvalidRequired. If question is optional or required.
questionRequired. Question title.
optionsOptional. Optional answers for the question.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=addquestion&api_key=XXXX&sid=XXXX&qtype=XXXX&qvalid=XXXX
&question=XXXX&options=XXXX
Sample JSON Response
[{
   "success":true
}]
Possible Errors
— invalid sid
— sid parameter required
— qtype parameter required
— qvalid parameter required
— question parameter required

editsurvey

Updates modified survey
Parameters

api_keyRequired. API key.
sidRequired. Survey ID.
titleRequired. Main title of the survey.
templateRequired. Selected template for the survey.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=editsurvey&api_key=XXXX&sid=XXXX&title=XXXX&template=XXXX
Sample JSON Response
[{
   "success":true
}]
Possible Errors
— invalid sid
— sid parameter required
— title parameter required

editquestion

Updates questionnaire details
Parameters

api_keyRequired. API key.
sidRequired. Survey ID.
qidRequired. Questionnaire ID.
qtypeRequired. Question field type.
qvalidRequired. If question is optional or required.
questionRequired. Question title.
optionsOptional. Optional answers for the question.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=editquestion&api_key=XXXX&sid=XXXX&qid=XXXX&qtype=XXXX
&qvalid=XXXX&question=XXXX&options=XXXX
Sample JSON Response
[{
   "success":true
}]

Possible Errors
— invalid sid
— invalid qid
— sid parameter required
— title parameter required

deletesurvey

Deletes selected survey
Parameters

api_keyRequired. API key.
sidRequired. Survey ID.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=deletesurvey&api_key=XXXX&sid=XXXX
Sample JSON Response
[{
   "success":true
}]
Possible Errors
— invalid sid
— sid parameter required

deletequestion

Deletes selected questionnaire from survey
Parameters

api_keyRequired. API key.
sidRequired. Survey ID.
qidRequired. Questionnaire ID.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=deletequestion&api_key=XXXX&sid=XXXX&qid=XXXX
Sample JSON Response
[{
   "success":true
}]
Possible Errors
— invalid sid
— invalid qid
— sid parameter required
— qid parameter required

getreport

Fetches statistical results of a survey
Parameters

api_keyRequired. API key.
sidRequired. Survey ID.
qidOptional. Questionnaire IDs, default is 'all'.

Making a Request
When creating a request, use this URL to submit your query:
http://www.surveycontrib.applications.net/survey/api.php/?request=getreport&api_key=XXXX&sid=XXXX&qid=all
Sample JSON Response
[{
   "questionid":"1",
   "questiontext":"Which TV station do you often tune in?",
   "answered":5,
   "total":5,
   "stats":
      [{
         "option":"CW",
         "total":1,
         "percent":"20%"
      },
      {
         "option":"CBS",
         "total":2,
         "percent":"40%"
      },
      {
         "option":"Fox",
         "total":2,
         "percent":"40%"
      },
      {
         "option":"NBC",
         "total":null,
         "percent":null
      },
      {
         "option":"CNN",
         "total":1,
         "percent":"20%"
      }]
}]
Possible Errors
— invalid sid
Join Community

Features

Learn more about Challenge Framework

Download on Github

Download

Download, Fork and Contribute on GitHub

Read Documentation

Documentation

Read Documentation on how Contrib Challenge works

Challenge Framework

  • Challenge Framework

  • Our Challenge frameworks are designed to be built single-handedly autonomous of each other and powers all or most of our challenge vertical assets. It is modular in design and scalable with a set of features that will allow you to create crowd based contests and challenges as you see fit.

User Challenge Features

Join and Apply for Challenges

Users are able to signup and register to apply for challenges or contests in any Challenge driven site.

Sponsor Challenges

Users are able to signup and register as a sponsor for any Challenge driven site. Sponsors can be create value added partnerships with the Challenge brand .

Promote and Share Challenges

Users are able to promote and share challenges via our Challenge badges and widgets available per challenge and via our social widgets.

Admin Challenge Features

Branding

Admin moderator can upload logo, and add custom html and text description on the backend.

SEO Optimized

You can add meta data such as meta title and meta description and dynamically it will be populated within all pages without duplicating the content.Sitemaps are also added and generated dynamically.

Post Contests

Admin or site moderators are able to post challenges, prizes, and details of the challenge on the backend.

Creating the sites

Do you have a challenge domain name? Using Contrib Builder, you can easily create a challenge site using Contrib’s standard challenge framework. Go to Contrib builder -> Select Challenge Framework -> build site. Some of the most popular challenge sites created using contrib challenge frameworks:


Creating Challenge

There are five steps in adding challenge:

Step 1: Selecting Domains - Select sites where the challenge will be posted.

Step 2: Challenge Details - Enter challenge challenge category, title, and short summary.

Step 3: Page Design - Modify challenge details page design

Step 4: Timeline - This is where submission period, judging period, and announcement of winner is defined.

Step 5: Prizes and Criteria- This is where prizes are specified, criteria, as well as application qualification.


User

Anyone with the valid email address can join challenges. Every challenge site has registration. Some, if specified in buildsite, allow social login - signing in using Facebook, Twitter, and other social networking sites (ex. Photochallenge.com login). Every User can join every challenge and is qualified to send their submissions.

Approving Submissions

All submissions in all challenge sites can be managed in VNOC. Administrators select challenge winners. Winners are contacted through their emails.



Contrib Login App

Contrib Login App is a convenient way for people to log into your wesbite using their contrib.com account.


Login Form

Login Using Contrib.com Account

Users enter contrib.com login credentials such as email and password. If they don't have an account yet, they can register by clicking Register button.


Authorize Contrib Credentials

Authorize Access

Users are allowed to authorize website's access to their contrib.com account/profile information.



  1. Download contrib client library here
  2. Include contrib client class in your file and initialize client library:

    Get api key from http://developers.contrib.com.
  3. There are two ways to use contrib app login:

    Javascript

    OR

    Php Login Url
    Parameters: redirect url and cancel url

Download Demo

here