Changeset 3144 for branches/2.0/admin
- Timestamp:
- Feb 13, 2009, 10:03:02 PM (15 years ago)
- Location:
- branches/2.0/admin
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.0/admin/include/plugins.class.php
r3071 r3144 305 305 $url .= '&version=' . implode(',', $versions_to_check); 306 306 $url .= '&lang=' . substr($user['language'], 0, 2); 307 $url .= '&get_nb_downloads=true'; 307 308 308 309 if (!empty($plugins_to_check)) … … 345 346 case 'author': 346 347 uasort($this->server_plugins, array($this, 'extension_author_compare')); 348 break; 349 case 'downloads': 350 usort($this->server_plugins, array($this, 'extension_downloads_compare')); 347 351 break; 348 352 } … … 509 513 } 510 514 515 function extension_downloads_compare($a, $b) 516 { 517 if ($a['extension_nb_downloads'] < $b['extension_nb_downloads']) return 1; 518 else return -1; 519 } 520 511 521 function sort_plugins_by_state() 512 522 { -
branches/2.0/admin/plugins_new.php
r3082 r3144 84 84 $link.'revision' => l10n('plugins_revisions'), 85 85 $link.'name' => l10n('Name'), 86 $link.'author' => l10n('Author'))); 86 $link.'author' => l10n('Author'), 87 $link.'downloads' => l10n('Number of downloads'))); 87 88 $template->assign('order_selected', $link.$order); 88 89 … … 98 99 list($date, ) = explode(' ', $plugin['revision_date']); 99 100 100 $ver_desc = sprintf(l10n('plugins_description'), 101 $plugin['revision_name'], 102 $date, 103 $plugin['revision_description']); 101 $ext_desc = '<i>'.l10n('Downloads').':</i> '.$plugin['extension_nb_downloads']."\r\n" 102 ."\r\n" 103 .$plugin['extension_description']; 104 105 $rev_desc = '<i>'.l10n('Version').':</i> '.$plugin['revision_name']."\r\n" 106 .'<i>'.l10n('Released on').':</i> '.$date."\r\n" 107 .'<i>'.l10n('Downloads').':</i> '.$plugin['revision_nb_downloads']."\r\n" 108 ."\r\n" 109 .$plugin['revision_description']; 104 110 105 111 $url_auto_install = htmlentities($base_url) … … 110 116 'EXT_NAME' => $plugin['extension_name'], 111 117 'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$plugin['extension_id'], 112 'EXT_DESC' => $ plugin['extension_description'],118 'EXT_DESC' => $ext_desc, 113 119 'VERSION' => $plugin['revision_name'], 114 'VERSION_URL' => PEM_URL.'/revision_view.php?rid='.$plugin['revision_id'],115 120 'DATE' => $date, 116 'VER_DESC' => $ ver_desc,121 'VER_DESC' => $rev_desc, 117 122 'AUTHOR' => $plugin['author_name'], 118 123 'URL_INSTALL' => $url_auto_install, -
branches/2.0/admin/plugins_update.php
r3082 r3144 87 87 default: 88 88 array_push($page['errors'], 89 sprintf(l10n('plugins_extract_error'), $_GET[' installstatus']),89 sprintf(l10n('plugins_extract_error'), $_GET['upgradestatus']), 90 90 l10n('plugins_check_chmod')); 91 91 } … … 109 109 list($date, ) = explode(' ', $plugin_info['revision_date']); 110 110 111 $ver_desc = sprintf(l10n('plugins_description'), 112 $plugin_info['revision_name'], 113 $date, 114 $plugin_info['revision_description']); 111 $ext_desc = '<i>'.l10n('Downloads').':</i> '.$plugin_info['extension_nb_downloads']."\r\n" 112 ."\r\n" 113 .$plugin_info['extension_description']; 114 115 $rev_desc = '<i>'.l10n('Version').':</i> '.$plugin_info['revision_name']."\r\n" 116 .'<i>'.l10n('Released on').':</i> '.$date."\r\n" 117 .'<i>'.l10n('Downloads').':</i> '.$plugin_info['revision_nb_downloads']."\r\n" 118 ."\r\n" 119 .$plugin_info['revision_description']; 115 120 116 121 if ($plugins->plugin_version_compare($fs_plugin['version'], $plugin_info['revision_name'])) … … 118 123 // Plugin is up to date 119 124 $template->append('plugins_uptodate', array( 120 'URL' => $fs_plugin['uri'],125 'URL' => PEM_URL.'/extension_view.php?eid='.$plugin_info['extension_id'], 121 126 'NAME' => $fs_plugin['name'], 122 'EXT_DESC' => $plugin_info['extension_description'], 123 'VERSION' => $fs_plugin['version'])); 127 'EXT_DESC' => $ext_desc, 128 'VERSION' => $fs_plugin['version'], 129 'VER_DESC' => $rev_desc)); 124 130 } 125 131 else … … 132 138 $template->append('plugins_not_uptodate', array( 133 139 'EXT_NAME' => $fs_plugin['name'], 134 'EXT_URL' => $fs_plugin['uri'],135 'EXT_DESC' => $ plugin_info['extension_description'],140 'EXT_URL' => PEM_URL.'/extension_view.php?eid='.$plugin_info['extension_id'], 141 'EXT_DESC' => $ext_desc, 136 142 'VERSION' => $fs_plugin['version'], 137 'VERSION_URL' => PEM_URL.'/revision_view.php?rid='.$plugin_info['revision_id'],138 143 'NEW_VERSION' => $plugin_info['revision_name'], 139 'NEW_VER_DESC' => $ ver_desc,144 'NEW_VER_DESC' => $rev_desc, 140 145 'URL_UPDATE' => $url_auto_update, 141 146 'URL_DOWNLOAD' => $plugin_info['download_url'] . '&origin=piwigo_download')); -
branches/2.0/admin/template/goto/default-layout.css
r2972 r3144 39 39 40 40 /* Plugins tables */ 41 TABLE.plugins { min-width: 400px; } 41 42 TABLE.plugins A { border: 0; } 42 43 TABLE.plugins TR TD { padding: 4px 10px; } -
branches/2.0/admin/template/goto/plugins_new.tpl
r2647 r3144 16 16 <span class="sort"> 17 17 {'Sort order'|@translate} : 18 <select onchange="document.location = this.options[this.selectedIndex].value;" style="width:150px">18 <select onchange="document.location = this.options[this.selectedIndex].value;"> 19 19 {html_options options=$order_options selected=$order_selected} 20 20 </select> … … 38 38 <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}"> 39 39 <td><a href="{$plugin.EXT_URL}" onclick="window.open(this.href); return false;" class="cluetip" title="{$plugin.EXT_NAME}|{$plugin.EXT_DESC|htmlspecialchars|nl2br}">{$plugin.EXT_NAME}</a></td> 40 <td style="text-align:center;"><a href="{$plugin. VERSION_URL}" onclick="window.open(this.href); return false;" class="cluetip" title="{$plugin.EXT_NAME}|{$plugin.VER_DESC|htmlspecialchars|nl2br}">{$plugin.VERSION}</a></td>40 <td style="text-align:center;"><a href="{$plugin.EXT_URL}" onclick="window.open(this.href); return false;" class="cluetip" title="{$plugin.EXT_NAME}|{$plugin.VER_DESC|htmlspecialchars|nl2br}">{$plugin.VERSION}</a></td> 41 41 <td>{$plugin.DATE}</td> 42 42 <td>{$plugin.AUTHOR}</td> -
branches/2.0/admin/template/goto/plugins_update.tpl
r2647 r3144 33 33 <td><a href="{$plugin.EXT_URL}" onclick="window.open(this.href); return false;" class="cluetip" title="{$plugin.EXT_NAME}|{$plugin.EXT_DESC|htmlspecialchars|nl2br}">{$plugin.EXT_NAME}</a></td> 34 34 <td style="text-align:center;">{$plugin.VERSION}</td> 35 <td style="text-align:center;"><a href="{$plugin. VERSION_URL}" onclick="window.open(this.href); return false;" class="cluetip" title="{$plugin.EXT_NAME}|{$plugin.NEW_VER_DESC|htmlspecialchars|nl2br}">{$plugin.NEW_VERSION}</a></td>35 <td style="text-align:center;"><a href="{$plugin.EXT_URL}" onclick="window.open(this.href); return false;" class="cluetip" title="{$plugin.EXT_NAME}|{$plugin.NEW_VER_DESC|htmlspecialchars|nl2br}">{$plugin.NEW_VERSION}</a></td> 36 36 <td style="text-align:center;"><a href="{$plugin.URL_UPDATE}" onclick="return confirm('{'plugins_confirm_upgrade'|@translate|@escape:javascript}');">{'plugins_auto_update'|@translate}</a> 37 37 / <a href="{$plugin.URL_DOWNLOAD}">{'plugins_download'|@translate}</a></td> … … 55 55 <tr class="{if $smarty.foreach.plugins_loop.index is odd}row1{else}row2{/if}"> 56 56 <td><a href="{$plugin.URL}" onclick="window.open(this.href); return false;" class="cluetip" title="{$plugin.NAME}|{$plugin.EXT_DESC|htmlspecialchars|nl2br}">{$plugin.NAME}</a></td> 57 <td style="text-align:center;"> {$plugin.VERSION}</td>57 <td style="text-align:center;"><a href="{$plugin.URL}" onclick="window.open(this.href); return false;" class="cluetip" title="{$plugin.NAME}|{$plugin.VER_DESC|htmlspecialchars|nl2br}">{$plugin.VERSION}</a></td> 58 58 </tr> 59 59 {/foreach}
Note: See TracChangeset
for help on using the changeset viewer.