]> git.mjollnir.org Git - moodle.git/commitdiff
repository/flickr_public MDL-15488 Make the search form a lot simpler and friendlier
authorMartin Dougiamas <martin@moodle.com>
Wed, 2 Dec 2009 13:01:58 +0000 (13:01 +0000)
committerMartin Dougiamas <martin@moodle.com>
Wed, 2 Dec 2009 13:01:58 +0000 (13:01 +0000)
lang/en_utf8/repository_flickr_public.php
repository/flickr_public/repository.class.php

index 845fe28126cd8ae71a8d6eb50addc8dca5ff332f..e1bed4ed080e421e9f19a72527a3403b62931c7c 100644 (file)
@@ -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'] = '<div>Get <a href=\"http://www.flickr.com/services/api/keys/\">Flickr API Key</a> for your Moodle site. </div>';
+$string['information'] = '<div>Get <a href=\"http://www.flickr.com/services/api/keys/\">Flickr API Key</a> for your Moodle site. </div>';
 $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)';
 
index 3e77e718dd82b74d1ef18e81e2f9bc17042ee518..cca2125c5034f1699b1a74c0c689773ad3523dfe 100644 (file)
@@ -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 '<tr><td><label>'.get_string('commercialuse', 'repository_flickr_public').'</label></td>';
             echo '<td>';
-            echo '<input type="radio" name="flickr_commercial" value="yes" /> '.get_string('yes');
-            echo '<br />';
-            echo '<input type="radio" name="flickr_commercial" value="no" /> '.get_string('no');
-            echo '<br />';
+            echo '<input type="checkbox" name="flickr_commercial" value="yes" />';
             echo '</td></tr>';
 
             echo '<tr><td><label>'.get_string('modification', 'repository_flickr_public').'</label></td>';
             echo '<td>';
-            echo '<input type="radio" name="flickr_modification" value="yes" /> '.get_string('yes');
-            echo '<br />';
-            echo '<input type="radio" name="flickr_modification" value="sharealike" /> '.get_string('sharealike', 'repository_flickr_public');
-            echo '<br />';
-            echo '<input type="radio" name="flickr_modification" value="no" /> '.get_string('no');
-            echo '<br />';
+            echo '<input type="checkbox" name="flickr_modification" value="yes" />';
             echo '</td></tr>';
 
             echo '</table>';
@@ -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,