Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Open Data Certificates

Automation for Open Data Certificates (


This module provides a simple connection to CKAN with the ODI Certificates using the .csv files produced from your campaigns pages(e.g.


  1. Place the getcert.php file to your server

  2. Place the csv file(s) of your campaigns in the same folder as the getcert.php

  3. Place the following code to the file license.html (ckan/templates/snippets/license.html). You may choose a different place.

 <a href="" title="{{ _('ODI Certificates') }}">          
                       <script src=""></script> 
                       <div id="certs"> Loading... </div>                        
                       function glast(){ a = window.location.href; c=0; for(i=1;i<a.length;i++) { if(a.substring(a.length-i-1,a.length-i)=='/')  { c = a.substring(a.length-i,a.length); break; } } return c; } 
                       var ur="<link to the getcert.php file here>?ur=" + glast() + "&url1=<link to your certificates csv file here>&url2=<link to your certificates csv file here>";
                       $.get(ur, null,function(data) { $("#certs").html(data); });                    


<link to the getcert.php file here>: is the link to getcert.php file on your server. If necessary change its header by adding this line: header("Access-Control-Allow-Origin:"); where instead of use your own server header.

<link to your certificates csv file here>: is the link to the certificates csv file. If you have only one, just use only the url1 attribute. If you have two or more csv’s add them as &url2=….. &url3=……. etc.

4. The connection should be working now. If it’s not working you may consider to be advised from my files which can be found in the example folder.

5. Options in getcert.php file:

//options start
$debug='off';     // on/off, if it works, change this value to 'off', so that you don't recieve debug messages
$method=-1;     // -1/0/1/2/3,  choose a method to read the js file containing the certificate info, 
               //            VALUES:  -1:test all methods,0:cURL,1:fopen,2:file_get_contents,3:http_get()
//options end

You should turn the debug off inside the getcert.php file so you won't see anymore the debug info on your page. You may change the method to the one that works, so it could be more responsive. I've implemented different methods because of the different server/php configurations.


Automation for Open Data Certificates (




No releases published


You can’t perform that action at this time.