From: Martin Dougiamas Date: Wed, 2 Dec 2009 13:01:58 +0000 (+0000) Subject: repository/flickr_public MDL-15488 Make the search form a lot simpler and friendlier X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=640bb8c1b6e03e30df215229f2dd17010832f5a4;p=moodle.git repository/flickr_public MDL-15488 Make the search form a lot simpler and friendlier --- diff --git a/lang/en_utf8/repository_flickr_public.php b/lang/en_utf8/repository_flickr_public.php index 845fe28126..e1bed4ed08 100644 --- a/lang/en_utf8/repository_flickr_public.php +++ b/lang/en_utf8/repository_flickr_public.php @@ -10,15 +10,15 @@ $string['by-nc-nd'] = 'Attribution-NonCommercial-NoDerivs License'; $string['by'] = 'Attribution License'; $string['by-sa'] = 'Attribution-ShareAlike License'; $string['by-nd'] = 'Attribution-NoDerivs License'; -$string['commercialuse'] = 'Allow commercial uses of your work?'; +$string['commercialuse'] = 'I want to be able to use the images commercially'; $string['creativecommonscommercial'] = 'Only creative commons commercial'; $string['emailaddress'] = 'Email address'; $string['fulltext'] = 'Full text'; $string['flickr_public:view'] = 'View flickr_public repository'; -$string['information'] = '
Get Flickr API Key for your Moodle site.
'; +$string['information'] = '
Get a Flickr API Key for your Moodle site.
'; $string['invalidemail'] = 'Invalid email account for flickr'; $string['license'] = 'License'; -$string['modification'] = 'Allow modifications of your work?'; +$string['modification'] = 'I want to be able to modify the images'; $string['notitle'] = 'notitle'; $string['nullphotolist'] = 'There are no photos in this account'; $string['tag'] = 'Tag'; @@ -28,5 +28,5 @@ $string['repositorydesc'] = 'Repository on flickr.com'; $string['secret'] = 'Secret'; $string['sharealike'] = 'Yes, as long as others share alike'; $string['username'] = 'Flickr account email'; -$string['watermark'] = 'Add watermark (Author ID and original URL) to downloaed photos?'; +$string['watermark'] = 'Add watermark to photos (Author and URL)'; diff --git a/repository/flickr_public/repository.class.php b/repository/flickr_public/repository.class.php index 3e77e718dd..cca2125c50 100644 --- a/repository/flickr_public/repository.class.php +++ b/repository/flickr_public/repository.class.php @@ -131,25 +131,16 @@ class repository_flickr_public extends repository { $commercial = new stdclass; $commercial->label = get_string('commercialuse', 'repository_flickr_public').': '; $commercial->id = 'flickr_commercial_id'; - $commercial->type = 'radio'; + $commercial->type = 'checkbox'; $commercial->name = 'flickr_commercial'; - $commercial->value = implode('|', array('yes', 'no')); - $commercial->value_label = implode('|', array( - get_string('yes'), - get_string('no') - )); + $commercial->value = 'yes'; $modification = new stdclass; $modification->label = get_string('modification', 'repository_flickr_public').': '; $modification->id = 'flickr_modification_id'; - $modification->type = 'radio'; + $modification->type = 'checkbox'; $modification->name = 'flickr_modification'; - $modification->value = implode('|', array('yes', 'sharealike', 'no')); - $modification->value_label = implode('|', array( - get_string('yes'), - get_string('sharealike', 'repository_flickr_public'), - get_string('no') - )); + $modification->value = 'yes'; $ret['login'] = array($fulltext, $tag, $email_field, $commercial, $modification); $ret['login_btn_label'] = get_string('search'); @@ -166,20 +157,12 @@ class repository_flickr_public extends repository { echo ''; echo ''; - echo ' '.get_string('yes'); - echo '
'; - echo ' '.get_string('no'); - echo '
'; + echo ''; echo ''; echo ''; echo ''; - echo ' '.get_string('yes'); - echo '
'; - echo ' '.get_string('sharealike', 'repository_flickr_public'); - echo '
'; - echo ' '.get_string('no'); - echo '
'; + echo ''; echo ''; echo ''; @@ -254,18 +237,18 @@ class repository_flickr_public extends repository { // 7: unknown license unset($licenses[3], $licenses[6]); } - if ($modification == 'sharealike') { + //if ($modification == 'sharealike') { // including // 1: Attribution NonCommercial ShareAlike // 5: Attribution ShareAlike - unset($licenses[2], $licenses[3], $licenses[4], $licenses[6], $licenses[7]); - } + //unset($licenses[2], $licenses[3], $licenses[4], $licenses[6], $licenses[7]); + //} $licenses = implode(',', $licenses); if (!empty($SESSION->{$this->sess_tag}) // use tag to search or !empty($SESSION->{$this->sess_text}) // use keyword to search - or !empty($this->nsid)/*use pre-defined accound*/) { + or !empty($this->nsid)/*use pre-defined accound*/) { $photos = $this->flickr->photos_search(array( 'tags'=>$SESSION->{$this->sess_tag}, 'page'=>$page,