Changeset 10973 for extensions/Copyrights
- Timestamp:
- May 21, 2011, 2:02:37 PM (13 years ago)
- Location:
- extensions/Copyrights
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Copyrights/TODO
r10936 r10973 1 - Implement single mode Batch Manage 1 - Implement single mode Batch Manager 2 2 Probably use prefilters combined with loc_begin_element_set_unit 3 - Add Icon and Description fieldsto copyrights3 - Add Icon field to copyrights 4 4 - Show the copyright when image is displayed -
extensions/Copyrights/admin.php
r10931 r10973 38 38 $CRname = ''; 39 39 $CRurl = ''; 40 $CRdesc = ''; 40 41 $CRvisible = 0; 41 42 … … 45 46 $name = pwg_db_real_escape_string($_REQUEST['name']); 46 47 $url = pwg_db_real_escape_string($_REQUEST['url']); 48 $desc = pwg_db_real_escape_string($_REQUEST['desc']); 47 49 $visible = (isset($_REQUEST['visible']) ? 1 : 0); 48 50 $query = sprintf( 49 51 'INSERT INTO %s 50 (`name`,`url`,` visible`) VALUES51 ("%s","%s", %d)52 (`name`,`url`,`des`,`visible`) VALUES 53 ("%s","%s","%s",%d) 52 54 ;', 53 COPYRIGHTS_ADMIN, $name, $url, $ visible);55 COPYRIGHTS_ADMIN, $name, $url, $desc, $visible); 54 56 pwg_query($query); 55 57 } … … 68 70 $CRname = $row['name']; 69 71 $CRurl = $row['url']; 72 $CRdesc = $row['desc']; 70 73 $CRvisible = $row['visible']; 71 74 } … … 75 78 $name = pwg_db_real_escape_string($_REQUEST['name']); 76 79 $url = pwg_db_real_escape_string($_REQUEST['url']); 80 $desc= pwg_db_real_escape_string($_REQUEST['desc']); 77 81 $visible = (isset($_REQUEST['visible']) ? 1 : 0); 78 82 $query = sprintf( 79 83 'UPDATE %s 80 SET `name`="%s", `url`="%s", ` visible`=%d84 SET `name`="%s", `url`="%s", `desc`="%s", `visible`=%d 81 85 WHERE `cr_id`=%d 82 86 ;', 83 COPYRIGHTS_ADMIN, $name, $url, $ visible, $id);87 COPYRIGHTS_ADMIN, $name, $url, $desc, $visible, $id); 84 88 pwg_query($query); 85 89 } … … 119 123 'name' => $row['name'], 120 124 'url' => $row['url'], 125 'desc' => $row['desc'], 121 126 'visible' => $row['visible'] 122 127 ) … … 133 138 $template->assign('CRname', $CRname); 134 139 $template->assign('CRurl', $CRurl); 140 $template->assign('CRdesc', $CRdesc); 135 141 $template->assign('CRvisible', $CRvisible); 136 142 -
extensions/Copyrights/admin.tpl
r10874 r10973 17 17 <td>{'URL'|@translate}</td> 18 18 <td><input type='text' name='url' id='url' value='{$CRurl}' /></td> 19 </tr> 20 <tr> 21 <td>{'Description'|@translate}</td> 22 <td><textarea name='desc' id='desc'>{$CRdesc}</textarea></td> 19 23 </tr> 20 24 <tr> … … 41 45 <th>{'Name'|@translate}</th> 42 46 <th>{'URL'|@translate}</th> 47 <th>{'Description'|@translate}</th> 43 48 <th>{'Visible'|@translate}</th> 44 49 <th>{'Actions'|@translate}</th> … … 50 55 <td>{$CR.name}</td> 51 56 <td><a href="{$CR.url}">{$CR.url}</a></td> 57 <td>{$CR.desc}</td> 52 58 <td>{if $CR.visible != 0}{'Yes'|@translate} 53 59 {else}{'No'|@translate}{/if} -
extensions/Copyrights/maintain.inc.php
r10931 r10973 29 29 name varchar(255) UNIQUE NOT NULL, 30 30 url varchar(255) NOT NULL, 31 desc text DEFAULT NULL, 31 32 visible bool DEFAULT 0, 32 33 PRIMARY KEY (cr_id) … … 79 80 'name' => 'Creative Commons (BY)', 80 81 'url' => 'http://creativecommons.org/licenses/by/3.0/', 82 'desc' => 'This license lets others distribute, remix, tweak, and build 83 upon your work, even commercially, as long as they credit you 84 for the original creation. This is the most accommodating of 85 licenses offered. Recommended for maximum dissemination and 86 use of licensed materials.', 81 87 'visible' => 1 82 88 ), … … 84 90 'name' => 'Creative Commons (BY-SA)', 85 91 'url' => 'http://creativecommons.org/licenses/by-sa/3.0/', 92 'desc' => 'This license lets others remix, tweak, and build upon your 93 work even for commercial purposes, as long as they credit you 94 and license their new creations under the identical terms. This 95 license is often compared to “copyleft” free and open source 96 software licenses. All new works based on yours will carry the 97 same license, so any derivatives will also allow commercial 98 use. This is the license used by Wikipedia, and is recommended 99 for materials that would benefit from incorporating content 100 from Wikipedia and similarly licensed projects.', 86 101 'visible' => 1 87 102 ), … … 89 104 'name' => 'Creative Commons (BY-ND)', 90 105 'url' => 'http://creativecommons.org/licenses/by-nd/3.0/', 106 'desc' => 'This license allows for redistribution, commercial and 107 non-commercial, as long as it is passed along unchanged and in 108 whole, with credit to you.', 91 109 'visible' => 1 92 110 ), … … 94 112 'name' => 'Creative Commons (BY-NC)', 95 113 'url' => 'http://creativecommons.org/licenses/by-nc/3.0/', 114 'desc' => 'This license lets others remix, tweak, and build upon your 115 work non-commercially, and although their new works must also 116 acknowledge you and be non-commercial, they don’t have to 117 license their derivative works on the same terms.', 96 118 'visible' => 1 97 119 ), … … 99 121 'name' => 'Creative Commons (BY-NC-SA)', 100 122 'url' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/', 123 'desc' => 'This license lets others remix, tweak, and build upon your 124 work non-commercially, as long as they credit you and license 125 their new creations under the identical terms.', 101 126 'visible' => 1 102 127 ), … … 104 129 'name' => 'Creative Commons (BY-NC-ND)', 105 130 'url' => 'http://creativecommons.org/licenses/by-nc-nd/3.0/', 131 'desc' => 'This license is the most restrictive of our six main licenses, 132 only allowing others to download your works and share them with 133 others as long as they credit you, but they can’t change them 134 in any way or use them commercially.', 106 135 'visible' => 1 107 136 ) … … 110 139 mass_inserts( 111 140 $prefixeTable.'copyrights_admin', 112 array( 113 'name', 114 'url', 115 'visible' 116 ), 141 array_keys($inserts[0]), 117 142 $inserts 118 143 );
Note: See TracChangeset
for help on using the changeset viewer.