EdTech

Add a Creative Commons search widget to a site

Been meaning to post this code snippet for awhile. Maarten Zeinstra posted this bit of code to the CC-Community listsrv last fall. It allows you to embed a Creative Commons search form on a webpage. This form will launch a CC search on a number of different search engines, including Google, Flickr, the Wikimedia Commons and YouTube. The form also allows you constrain the search based on the different types of reuse restrictions.

The search box works like this:

Enter your search query:
use for commercial purposes;
modify, adapt, or build upon.
Search using:

If I use the above form and search Google Images (for example), the results of the image search from Google Images will already be filtered and will only include items that are cc’d license based.

For example, if I use the search form above & Google Images for the term “database” and click both the “use for commercial purposes” and “modify, adapt or build on”, the results I get look like this:

database

The results from Google Images are already filtered based on the code restrictions.

The code snippet is:

<form target="_blank" name="CC_Search" action="http://search.creativecommons.org" method="get">
Enter your search query: <input type="text" name="query"><br><br>
<input type="checkbox" name="comm" value=""> use for commercial purposes;<br>
<input type="checkbox" name="deriv" value=""> modify, adapt, or build upon.<br><br><br>
Search using:
<select name="engine">
<option value="google">Google</option>
<option value="googleimg">Google Images</option>
<option value="flickr">Flickr</option>
<option value="jamendo">Jamendo</option>
<option value="spin">spinXpress</option>
<option value="openclipart">Openclipart</option>
<option value="wikimediacommons">Wikimedia Commons</option>
<option value="fotopedia">Fotopedia</option>
<option value="europeana">Europeana</option>
<option value="youtube">Youtube</option>
<option value="pixabay">Pixabay</option>
<option value="ccmixter">CC-mixter</option>
<option value="soundcloud">Soundcloud</option>
</select> <br>
<input type="submit" value="Search">
</form>

 

CC BY 4.0 Add a Creative Commons search widget to a site by Clint Lalonde is licensed under a Creative Commons Attribution 4.0 International License.

Profile Picture for Clint Lalonde
Wrangler of learning technologies by day, Dad, cyclist, soccer fan and, lately, home roaster of coffee by night. INFJ. I am the Manager of Educational Technologies at BCcampus, working primarily on open education projects. This blog is a personal blog and do not necessarily reflect the opinions of BCcampus.