Changeset 1718 for trunk/plugins/admin_advices/main.inc.php
- Timestamp:
- Jan 12, 2007, 11:36:56 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/admin_advices/main.inc.php
r1709 r1718 5 5 Description: Give you an advice on the administration page. 6 6 */ 7 // +-----------------------------------------------------------------------+ 8 // | PhpWebGallery - a PHP based picture gallery | 9 // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | 10 // +-----------------------------------------------------------------------+ 11 // | branch : BSF (Best So Far) 12 // | file : $URL$ 13 // | last update : $Date$ 14 // | last modifier : $Author$ 15 // | revision : $Rev$ 16 // +-----------------------------------------------------------------------+ 17 // | This program is free software; you can redistribute it and/or modify | 18 // | it under the terms of the GNU General Public License as published by | 19 // | the Free Software Foundation | 20 // | | 21 // | This program is distributed in the hope that it will be useful, but | 22 // | WITHOUT ANY WARRANTY; without even the implied warranty of | 23 // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 24 // | General Public License for more details. | 25 // | | 26 // | You should have received a copy of the GNU General Public License | 27 // | along with this program; if not, write to the Free Software | 28 // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | 29 // | USA. | 30 // +-----------------------------------------------------------------------+ 7 31 8 32 add_event_handler('loc_begin_page_tail', 'set_admin_advice' ); 33 add_event_handler('loc_end_page_header', 'set_admin_advice_add_css' ); 9 34 35 // Add a XHTML tag in HEAD section 36 function set_admin_advice_add_css() 37 { 38 global $template; 39 $template->assign_block_vars( 40 'head_element', 41 array( 42 'CONTENT' => '<link rel="stylesheet" type="text/css" ' 43 . 'href="plugins/admin_advices/default-layout.css" />', 44 ) 45 ); 46 } 10 47 48 // Build an advice on the Admin Intro page 11 49 function set_admin_advice() 12 50 { 13 51 global $page, $user, $template, $conf; 52 14 53 15 54 // This Plugin works only on the Admin page … … 31 70 if ( $cond ) 32 71 { 33 // $template->set_filenames( array( 'advice' => 'admin_advices.tpl' ));34 72 $template->set_filenames(array( 35 73 'admin_advice' => … … 52 90 $url_check = get_themeconf('icon_dir').'/'; 53 91 $url_uncheck = $url_check . 'uncheck'; 54 $url_check .= 'check'; 92 $url_check .= 'check'; 93 $picture_id = $row['id']; 94 $query = ' 95 SELECT * FROM '.IMAGE_TAG_TABLE.' 96 WHERE image_id = ' . $picture_id .' 97 ;'; 98 $tag_count = mysql_num_rows(mysql_query($query)); 55 99 $template->assign_block_vars( 56 100 'thumbnail', … … 69 113 'CREATE_DATE' => (empty($row['date_creation'])) ? 70 114 $url_uncheck : $url_check, 115 'TAGS' => ($tag_count == 0) ? 116 $url_uncheck : $url_check, 117 'NUM_TAGS' => (string) $tag_count, 71 118 'U_MODIFY' => $url_modify, 72 119 )
Note: See TracChangeset
for help on using the changeset viewer.