From 6e932e8752faae824cdcb1073014771163a600a7 Mon Sep 17 00:00:00 2001 From: rvelices Date: Sun, 2 Mar 2008 00:29:27 +0000 Subject: header.tpl goes smart git-svn-id: http://piwigo.org/svn/trunk@2240 68402e56-0260-453c-a942-63ccdbb3a9ee --- plugins/admin_advices/main.inc.php | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'plugins/admin_advices/main.inc.php') diff --git a/plugins/admin_advices/main.inc.php b/plugins/admin_advices/main.inc.php index 5df961ef0..fcefc1cb4 100644 --- a/plugins/admin_advices/main.inc.php +++ b/plugins/admin_advices/main.inc.php @@ -17,12 +17,10 @@ function set_admin_advice_add_css() and $page['page'] == 'intro' ) {// This Plugin works only on the Admin page - $template->assign_block_vars( - 'head_element', - array( - 'CONTENT' => '', - ) + $template->append( + 'head_elements', + '' ); add_event_handler('loc_begin_page_tail', 'set_admin_advice' ); } @@ -55,7 +53,7 @@ function set_admin_advice() // Random Thumbnail $query = ' SELECT * -FROM '.IMAGES_TABLE.' +FROM '.IMAGES_TABLE.' ORDER BY RAND(NOW()) LIMIT 0, 1 ;'; @@ -67,13 +65,13 @@ LIMIT 0, 1 .'&image_id='.$row['id']; $url_check = get_themeconf('icon_dir').'/'; $url_uncheck = $url_check . 'uncheck'; - $url_check .= 'check'; - $picture_id = $row['id']; + $url_check .= 'check'; + $picture_id = $row['id']; $query = ' -SELECT * FROM '.IMAGE_TAG_TABLE.' +SELECT * FROM '.IMAGE_TAG_TABLE.' WHERE image_id = ' . $picture_id .' ;'; - $tag_count = mysql_num_rows(mysql_query($query)); + $tag_count = mysql_num_rows(mysql_query($query)); $template->assign_block_vars( 'thumbnail', array( @@ -93,7 +91,7 @@ WHERE image_id = ' . $picture_id .' 'TAGS' => ($tag_count == 0) ? $url_uncheck : $url_check, 'NUM_TAGS' => (string) $tag_count, - 'U_MODIFY' => $url_modify, + 'U_MODIFY' => $url_modify, ) ); } -- cgit v1.2.3