Changeset 29168 for trunk/plugins
- Timestamp:
- Aug 4, 2014, 11:07:41 PM (10 years ago)
- Location:
- trunk/plugins/AdminTools
- Files:
-
- 3 added
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/AdminTools/include/MultiView.class.php
r29069 r29168 102 102 return $url; 103 103 } 104 105 /** 106 * Returns the current url minus MultiView params 107 * 108 * @param bool $with_amp - adds ? or & at the end of the url 109 * @return string 110 */ 111 public function get_clean_admin_url($with_amp=false) 112 { 113 $url = PHPWG_ROOT_PATH.'admin.php'; 114 115 $get = $_GET; 116 unset($get['page'], $get['section'], $get['tag']); 117 if (count($get) == 0 and !empty($_SERVER['QUERY_STRING'])) 118 { 119 $url.= '?' . str_replace('&', '&', $_SERVER['QUERY_STRING']); 120 } 121 122 if ($with_amp) 123 { 124 $url.= strpos($url, '?')!==false ? '&' : '?'; 125 } 126 127 return $url; 128 } 104 129 105 130 /** … … 278 303 SELECT 279 304 '.$conf['user_fields']['id'].' AS id, 280 '.$conf['user_fields']['username'].' AS username 281 FROM '.USERS_TABLE.' 305 '.$conf['user_fields']['username'].' AS username, 306 status 307 FROM '.USERS_TABLE.' AS u 308 INNER JOIN '.USER_INFOS_TABLE.' AS i 309 ON '.$conf['user_fields']['id'].' = user_id 282 310 ORDER BY CONVERT('.$conf['user_fields']['username'].', CHAR) 283 311 ;'; -
trunk/plugins/AdminTools/include/events.inc.php
r27487 r29168 176 176 177 177 /** 178 * Add main toolbar to current page 179 * @trigger loc_after_page_header 180 */ 181 function admintools_add_admin_controller() 182 { 183 global $MultiView, $conf, $template, $page, $user; 184 185 $url_root = get_root_url(); 186 $tpl_vars = array(); 187 188 $tpl_vars['MULTIVIEW'] = $MultiView->get_data(); 189 $tpl_vars['DELETE_CACHE'] = isset($conf['multiview_invalidate_cache']); 190 $tpl_vars['U_SELF'] = $MultiView->get_clean_admin_url(true); 191 192 if (($admin_lang = $MultiView->get_user_language()) !== false) 193 { 194 include_once(PHPWG_ROOT_PATH . 'include/functions_mail.inc.php'); 195 switch_lang_to($admin_lang); 196 } 197 198 $template->assign(array( 199 'ADMINTOOLS_PATH' => './plugins/' . ADMINTOOLS_ID .'/', 200 'ato' => $tpl_vars, 201 )); 202 203 $template->set_filename('ato_admin_controller', realpath(ADMINTOOLS_PATH . 'template/admin_controller.tpl')); 204 $template->parse('ato_admin_controller'); 205 206 if ($MultiView->is_admin() && @$admin_lang !== false) 207 { 208 switch_lang_back(); 209 } 210 211 $template->set_prefilter('header', 'admintools_admin_prefilter'); 212 } 213 214 function admintools_admin_prefilter($content) 215 { 216 $search = '<a class="icon-brush tiptip" href="{$U_CHANGE_THEME}" title="{\'Switch to clear or dark colors for administration\'|translate}">{\'Change Admin Colors\'|translate}</a>'; 217 $replace = '<span id="ato_container"><a class="icon-cog-alt" href="#">{\'Tools\'|translate}</a></span>'; 218 return str_replace($search, $replace, $content); 219 } 220 221 /** 178 222 * Disable privacy level switchbox 179 223 */ -
trunk/plugins/AdminTools/main.inc.php
r28697 r29168 39 39 else 40 40 { 41 add_event_handler('loc_begin_page_header', 'admintools_add_admin_controller'); 41 42 add_event_handler('get_admin_plugin_menu_links', 'admintools_admin_link'); 42 43 } -
trunk/plugins/AdminTools/template/public_controller.tpl
r26967 r29168 1 1 {strip} 2 {combine_css path=$ADMINTOOLS_PATH|cat:'template/ style.css'}2 {combine_css path=$ADMINTOOLS_PATH|cat:'template/public_style.css'} 3 3 {combine_css path='admin/themes/default/fontello/css/fontello.css'} 4 4 {combine_css path=$ADMINTOOLS_PATH|cat:'template/fontello/css/fontello-ato.css'}
Note: See TracChangeset
for help on using the changeset viewer.