Skip to content

Commit d8965c1

Browse files
authored
Merge pull request #186 from creativecommons/openverse-org
2 parents 0c44038 + becd52f commit d8965c1

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

index.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
switch ( $engine ) {
2929

3030
case "openverse":
31-
$url = 'https://wordpress.org/openverse/search/?q=' . $query . '&license_type='. $rights;
31+
$url = 'https://openverse.org/search/?q=' . $query . '&license_type='. $rights;
3232
break;
3333

3434
case "openclipart":
@@ -74,7 +74,7 @@
7474
case "thingiverse":
7575
// Defer to OpenVerse (with search refined only to Thingiverse items) until Thingiverse licence search filter issue is fixed
7676
// TODO Use Thingiverse search filters when issue is fixed and
77-
$url = 'https://wordpress.org/openverse/search/image?q=' . $query . '&source=thingiverse' . $rights;
77+
$url = 'https://openverse.org/search/image?q=' . $query . '&source=thingiverse' . $rights;
7878
// $url = 'https://www.thingiverse.com/search?q=' . $query . $rights;
7979
break;
8080

@@ -432,7 +432,7 @@ function get_http_security () {
432432
</div>
433433
<div class="row">
434434
<div class="four columns alpha">
435-
<div class="engine">
435+
<div id="openverse" class="engine">
436436
<div class="engineButton">
437437
<button onclick="setEngine(this)" name="engine" value="openverse" id="openverse" aria-label="Openverse" type="button"></button>
438438
</div>

search.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,15 @@ $(function () {
4242
var engines = ["google", "googleimg", "flickr", "jamendo", "openclipart", "wikimediacommons", "fotopedia", "europeana", "youtube", "ccmixter", "soundcloud", "thingiverse", "openverse", "sketchfab", "nappy", "vimeo"];
4343

4444
//defaults:
45-
var engine = "";
45+
var default_query = "flowers";
46+
var default_engine = "openverse";
47+
48+
var engine = default_engine;
4649
var comm = 1;
4750
var deriv = 1;
4851
var rights = "";
4952
var url = "";
5053

51-
var default_query = "flowers";
52-
var default_engine = "_random";
5354

5455
// mmm, cookies...
5556
function setCookie(name, value, expires, path, domain, secure) {
@@ -484,7 +485,7 @@ function doSearch() {
484485
// NOTE: if you make changes here, you should make a similar change in search.php
485486
switch (engine) {
486487
case "openverse":
487-
url = 'https://wordpress.org/openverse/search/?q=' + query.val() + "&license_type=" + rights;
488+
url = 'https://openverse.org/search/?q=' + query.val() + "&license_type=" + rights;
488489
break;
489490

490491
case "openclipart":
@@ -542,7 +543,7 @@ function doSearch() {
542543
case "thingiverse":
543544
// Defer to OpenVerse (with search refined only to Thingiverse items) until Thingiverse licence search filter issue is fixed
544545
// TODO Use Thingiverse search filters when issue is fixed and
545-
url = 'https://wordpress.org/openverse/search/image?q=' + query.val() + '&source=thingiverse' + rights;
546+
url = 'https://openverse.org/search/image?q=' + query.val() + '&source=thingiverse' + rights;
546547
// url = 'https://www.thingiverse.com/search?q=' + query.val() + rights;
547548
break;
548549

style.css

+5-1
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@ fieldset {
207207
width: 100%;
208208
}
209209

210+
#engines #openverse.engine {
211+
border-width: 3px;
212+
}
213+
210214
#engines .engine {
211215
text-align: left;
212216
}
@@ -327,4 +331,4 @@ fieldset {
327331
}
328332
.bucket small{
329333
font-size: 14px;
330-
}
334+
}

0 commit comments

Comments
 (0)