Discussion:
[cc-devel] Embedable search.creativecommons.org widget?
Maarten Zeinstra
2013-03-07 09:04:32 UTC
Permalink
Hi all,

I've got a question from CC-Belgium whether it is possible to get a widget (embedable form?) for search.creativecommons.org. I told him that this is at the moment not possible. However I would like the feature, I been investigating the possibility myself as well, but search.creativecommons.org looked a bit to complex for something hacky. It apparently uses javascript that queries the current page for fields and not a submit-able form.

Maybe this is something that we want to put on the roadmap?

Cheers,

Maarten
--
Kennisland | www.kennisland.nl | t +31205756720 | m +31643053919 | @mzeinstra




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ibiblio.org/pipermail/cc-devel/attachments/20130307/a10860f6/attachment.html
Nathan Kinkade
2013-03-07 15:25:37 UTC
Permalink
Hi Maarten,

CC Search does rely on javascript for the most part. However, it will
still work without javascript, as we have some server-side code that
will process a request should the user have javascript disabled. It
should be really easy to create some sort of widget. For example,
inspect the following URL:

http://search.creativecommons.org/?query=flowers&comm=&deriv=&engine=flickr

That will redirect to Flickr, searching for works with the keyword
"flowers" which can be used commercially and modified (i.e. the two
checkboxes on CC Search were both checked). It should be fairly
trivial to create a tiny form with a text box for the query terms, a
couple of checkboxes, and a select box for the content provider, and
then simply submit the form to search.creativecommons.org.

I can create a quick example if you like. Let me know...

Nathan
Post by Maarten Zeinstra
Hi all,
I've got a question from CC-Belgium whether it is possible to get a widget
(embedable form?) for search.creativecommons.org. I told him that this is at
the moment not possible. However I would like the feature, I been
investigating the possibility myself as well, but search.creativecommons.org
looked a bit to complex for something hacky. It apparently uses javascript
that queries the current page for fields and not a submit-able form.
Maybe this is something that we want to put on the roadmap?
Cheers,
Maarten
--
Kennisland
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
Maarten Zeinstra
2013-03-07 16:17:35 UTC
Permalink
Great news! Did not know that.

Created the following example for anyone to use:

<form name="CC_Search" action="http://search.creativecommons.org" method="get">
Search for: <input type="text" name="query"><br>
<input type="checkbox" name="comm" value="">use for commercial purposes<br>
<input type="checkbox" name="deriv" value="">modify, adapt, or build upon<br>
Which Search Engine:
<select name="engine">
<option value="google">google</option>
<option value="googleimg">googleimg</option>
<option value="flickr">flickr</option>
<option value="jamendo">jamendo</option>
<option value="spin">spin</option>
<option value="openclipart">openclipart</option>
<option value="wikimediacommons">wikimediacommons</option>
<option value="fotopedia">fotopedia</option>
<option value="europeana">europeana</option>
<option value="youtube">youtube</option>
<option value="pixabay">pixabay</option>
<option value="ccmixter">ccmixter</option>
<option value="soundcloud">soundcloud</option>
</select> <br>
<input type="submit" value="Submit">
</form>

works. :)
Post by Nathan Kinkade
Hi Maarten,
CC Search does rely on javascript for the most part. However, it will
still work without javascript, as we have some server-side code that
will process a request should the user have javascript disabled. It
should be really easy to create some sort of widget. For example,
http://search.creativecommons.org/?query=flowers&comm=&deriv=&engine=flickr
That will redirect to Flickr, searching for works with the keyword
"flowers" which can be used commercially and modified (i.e. the two
checkboxes on CC Search were both checked). It should be fairly
trivial to create a tiny form with a text box for the query terms, a
couple of checkboxes, and a select box for the content provider, and
then simply submit the form to search.creativecommons.org.
I can create a quick example if you like. Let me know...
Nathan
Post by Maarten Zeinstra
Hi all,
I've got a question from CC-Belgium whether it is possible to get a widget
(embedable form?) for search.creativecommons.org. I told him that this is at
the moment not possible. However I would like the feature, I been
investigating the possibility myself as well, but search.creativecommons.org
looked a bit to complex for something hacky. It apparently uses javascript
that queries the current page for fields and not a submit-able form.
Maybe this is something that we want to put on the roadmap?
Cheers,
Maarten
--
Kennisland
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
BjornW
2013-03-08 10:20:14 UTC
Permalink
Just to add: you can paste Maarten's html into a default WordPress text
widget and it will work as advertised :) If there's an interest in a
proper WordPress plugin I can build it.

grtz
BjornW
Post by Maarten Zeinstra
Great news! Did not know that.
<form name="CC_Search" action="http://search.creativecommons.org" method="get">
Search for: <input type="text" name="query"><br>
<input type="checkbox" name="comm" value="">use for commercial purposes<br>
<input type="checkbox" name="deriv" value="">modify, adapt, or build upon<br>
<select name="engine">
<option value="google">google</option>
<option value="googleimg">googleimg</option>
<option value="flickr">flickr</option>
<option value="jamendo">jamendo</option>
<option value="spin">spin</option>
<option value="openclipart">openclipart</option>
<option value="wikimediacommons">wikimediacommons</option>
<option value="fotopedia">fotopedia</option>
<option value="europeana">europeana</option>
<option value="youtube">youtube</option>
<option value="pixabay">pixabay</option>
<option value="ccmixter">ccmixter</option>
<option value="soundcloud">soundcloud</option>
</select> <br>
<input type="submit" value="Submit">
</form>
works. :)
Post by Nathan Kinkade
Hi Maarten,
CC Search does rely on javascript for the most part. However, it will
still work without javascript, as we have some server-side code that
will process a request should the user have javascript disabled. It
should be really easy to create some sort of widget. For example,
http://search.creativecommons.org/?query=flowers&comm=&deriv=&engine=flickr
That will redirect to Flickr, searching for works with the keyword
"flowers" which can be used commercially and modified (i.e. the two
checkboxes on CC Search were both checked). It should be fairly
trivial to create a tiny form with a text box for the query terms, a
couple of checkboxes, and a select box for the content provider, and
then simply submit the form to search.creativecommons.org.
I can create a quick example if you like. Let me know...
Nathan
Post by Maarten Zeinstra
Hi all,
I've got a question from CC-Belgium whether it is possible to get a widget
(embedable form?) for search.creativecommons.org. I told him that this is at
the moment not possible. However I would like the feature, I been
investigating the possibility myself as well, but search.creativecommons.org
looked a bit to complex for something hacky. It apparently uses javascript
that queries the current page for fields and not a submit-able form.
Maybe this is something that we want to put on the roadmap?
Cheers,
Maarten
--
Kennisland
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
--
met vriendelijke groet,
Bjorn Wijers

* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship

Werkdagen:
Van maandag t/m donderdag vanaf 10:00
Vrijdag is voor experimenteren en eigen projecten.

Postbus 14145
3508 SE Utrecht
The Netherlands

tel: +31 6 49 74 78 70
http://www.burobjorn.nl
Maarten Zeinstra
2013-03-08 10:49:28 UTC
Permalink
Right .. Did not make the connection..

Implemented it on creativecommons.nl as a test, pending review by the cc-nl team.

Thanks for the suggestion,

Maarten
Post by BjornW
Just to add: you can paste Maarten's html into a default WordPress text
widget and it will work as advertised :) If there's an interest in a
proper WordPress plugin I can build it.
grtz
BjornW
Post by Maarten Zeinstra
Great news! Did not know that.
<form name="CC_Search" action="http://search.creativecommons.org" method="get">
Search for: <input type="text" name="query"><br>
<input type="checkbox" name="comm" value="">use for commercial purposes<br>
<input type="checkbox" name="deriv" value="">modify, adapt, or build upon<br>
<select name="engine">
<option value="google">google</option>
<option value="googleimg">googleimg</option>
<option value="flickr">flickr</option>
<option value="jamendo">jamendo</option>
<option value="spin">spin</option>
<option value="openclipart">openclipart</option>
<option value="wikimediacommons">wikimediacommons</option>
<option value="fotopedia">fotopedia</option>
<option value="europeana">europeana</option>
<option value="youtube">youtube</option>
<option value="pixabay">pixabay</option>
<option value="ccmixter">ccmixter</option>
<option value="soundcloud">soundcloud</option>
</select> <br>
<input type="submit" value="Submit">
</form>
works. :)
Post by Nathan Kinkade
Hi Maarten,
CC Search does rely on javascript for the most part. However, it will
still work without javascript, as we have some server-side code that
will process a request should the user have javascript disabled. It
should be really easy to create some sort of widget. For example,
http://search.creativecommons.org/?query=flowers&comm=&deriv=&engine=flickr
That will redirect to Flickr, searching for works with the keyword
"flowers" which can be used commercially and modified (i.e. the two
checkboxes on CC Search were both checked). It should be fairly
trivial to create a tiny form with a text box for the query terms, a
couple of checkboxes, and a select box for the content provider, and
then simply submit the form to search.creativecommons.org.
I can create a quick example if you like. Let me know...
Nathan
Post by Maarten Zeinstra
Hi all,
I've got a question from CC-Belgium whether it is possible to get a widget
(embedable form?) for search.creativecommons.org. I told him that this is at
the moment not possible. However I would like the feature, I been
investigating the possibility myself as well, but search.creativecommons.org
looked a bit to complex for something hacky. It apparently uses javascript
that queries the current page for fields and not a submit-able form.
Maybe this is something that we want to put on the roadmap?
Cheers,
Maarten
--
Kennisland
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
--
met vriendelijke groet,
Bjorn Wijers
* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship
Van maandag t/m donderdag vanaf 10:00
Vrijdag is voor experimenteren en eigen projecten.
Postbus 14145
3508 SE Utrecht
The Netherlands
tel: +31 6 49 74 78 70
http://www.burobjorn.nl
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
Nathan Kinkade
2013-03-08 14:08:56 UTC
Permalink
That looks great, Maarten. It had never occurred to me before that CC
Search could be widgetized until I read your message and thought about
it for a second. It turns out the server-side fallback code for users
with javascript disabled is useful for more than just that purpose. I
think this is actually useful enough to almost warrant publishing this
to the cc-affiliates@ list, or maybe cc-community at . Various other
affiliates and/or community members might find it useful to add that
form to their websites. Would you like to pass that information on?

Nathan
Post by Maarten Zeinstra
Right .. Did not make the connection..
Implemented it on creativecommons.nl as a test, pending review by the cc-nl team.
Thanks for the suggestion,
Maarten
Post by BjornW
Just to add: you can paste Maarten's html into a default WordPress text
widget and it will work as advertised :) If there's an interest in a
proper WordPress plugin I can build it.
grtz
BjornW
Post by Maarten Zeinstra
Great news! Did not know that.
<form name="CC_Search" action="http://search.creativecommons.org" method="get">
Search for: <input type="text" name="query"><br>
<input type="checkbox" name="comm" value="">use for commercial purposes<br>
<input type="checkbox" name="deriv" value="">modify, adapt, or build upon<br>
<select name="engine">
<option value="google">google</option>
<option value="googleimg">googleimg</option>
<option value="flickr">flickr</option>
<option value="jamendo">jamendo</option>
<option value="spin">spin</option>
<option value="openclipart">openclipart</option>
<option value="wikimediacommons">wikimediacommons</option>
<option value="fotopedia">fotopedia</option>
<option value="europeana">europeana</option>
<option value="youtube">youtube</option>
<option value="pixabay">pixabay</option>
<option value="ccmixter">ccmixter</option>
<option value="soundcloud">soundcloud</option>
</select> <br>
<input type="submit" value="Submit">
</form>
works. :)
Post by Nathan Kinkade
Hi Maarten,
CC Search does rely on javascript for the most part. However, it will
still work without javascript, as we have some server-side code that
will process a request should the user have javascript disabled. It
should be really easy to create some sort of widget. For example,
http://search.creativecommons.org/?query=flowers&comm=&deriv=&engine=flickr
That will redirect to Flickr, searching for works with the keyword
"flowers" which can be used commercially and modified (i.e. the two
checkboxes on CC Search were both checked). It should be fairly
trivial to create a tiny form with a text box for the query terms, a
couple of checkboxes, and a select box for the content provider, and
then simply submit the form to search.creativecommons.org.
I can create a quick example if you like. Let me know...
Nathan
Post by Maarten Zeinstra
Hi all,
I've got a question from CC-Belgium whether it is possible to get a widget
(embedable form?) for search.creativecommons.org. I told him that this is at
the moment not possible. However I would like the feature, I been
investigating the possibility myself as well, but search.creativecommons.org
looked a bit to complex for something hacky. It apparently uses javascript
that queries the current page for fields and not a submit-able form.
Maybe this is something that we want to put on the roadmap?
Cheers,
Maarten
--
Kennisland
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
--
met vriendelijke groet,
Bjorn Wijers
* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship
Van maandag t/m donderdag vanaf 10:00
Vrijdag is voor experimenteren en eigen projecten.
Postbus 14145
3508 SE Utrecht
The Netherlands
tel: +31 6 49 74 78 70
http://www.burobjorn.nl
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
Maarten Zeinstra
2013-03-08 14:51:53 UTC
Permalink
Consider it done.

Cheers,

Maarten
Post by Nathan Kinkade
That looks great, Maarten. It had never occurred to me before that CC
Search could be widgetized until I read your message and thought about
it for a second. It turns out the server-side fallback code for users
with javascript disabled is useful for more than just that purpose. I
think this is actually useful enough to almost warrant publishing this
affiliates and/or community members might find it useful to add that
form to their websites. Would you like to pass that information on?
Nathan
Post by Maarten Zeinstra
Right .. Did not make the connection..
Implemented it on creativecommons.nl as a test, pending review by the cc-nl team.
Thanks for the suggestion,
Maarten
Post by BjornW
Just to add: you can paste Maarten's html into a default WordPress text
widget and it will work as advertised :) If there's an interest in a
proper WordPress plugin I can build it.
grtz
BjornW
Post by Maarten Zeinstra
Great news! Did not know that.
<form name="CC_Search" action="http://search.creativecommons.org" method="get">
Search for: <input type="text" name="query"><br>
<input type="checkbox" name="comm" value="">use for commercial purposes<br>
<input type="checkbox" name="deriv" value="">modify, adapt, or build upon<br>
<select name="engine">
<option value="google">google</option>
<option value="googleimg">googleimg</option>
<option value="flickr">flickr</option>
<option value="jamendo">jamendo</option>
<option value="spin">spin</option>
<option value="openclipart">openclipart</option>
<option value="wikimediacommons">wikimediacommons</option>
<option value="fotopedia">fotopedia</option>
<option value="europeana">europeana</option>
<option value="youtube">youtube</option>
<option value="pixabay">pixabay</option>
<option value="ccmixter">ccmixter</option>
<option value="soundcloud">soundcloud</option>
</select> <br>
<input type="submit" value="Submit">
</form>
works. :)
Post by Nathan Kinkade
Hi Maarten,
CC Search does rely on javascript for the most part. However, it will
still work without javascript, as we have some server-side code that
will process a request should the user have javascript disabled. It
should be really easy to create some sort of widget. For example,
http://search.creativecommons.org/?query=flowers&comm=&deriv=&engine=flickr
That will redirect to Flickr, searching for works with the keyword
"flowers" which can be used commercially and modified (i.e. the two
checkboxes on CC Search were both checked). It should be fairly
trivial to create a tiny form with a text box for the query terms, a
couple of checkboxes, and a select box for the content provider, and
then simply submit the form to search.creativecommons.org.
I can create a quick example if you like. Let me know...
Nathan
Post by Maarten Zeinstra
Hi all,
I've got a question from CC-Belgium whether it is possible to get a widget
(embedable form?) for search.creativecommons.org. I told him that this is at
the moment not possible. However I would like the feature, I been
investigating the possibility myself as well, but search.creativecommons.org
looked a bit to complex for something hacky. It apparently uses javascript
that queries the current page for fields and not a submit-able form.
Maybe this is something that we want to put on the roadmap?
Cheers,
Maarten
--
Kennisland
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
--
met vriendelijke groet,
Bjorn Wijers
* b u r o b j o r n .nl *
digitaal vakmanschap | digital craftsmanship
Van maandag t/m donderdag vanaf 10:00
Vrijdag is voor experimenteren en eigen projecten.
Postbus 14145
3508 SE Utrecht
The Netherlands
tel: +31 6 49 74 78 70
http://www.burobjorn.nl
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
_______________________________________________
cc-devel mailing list
cc-devel at lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/cc-devel
Loading...