diff options
author | rvelices <rv-github@modusoptimus.com> | 2008-03-02 00:29:27 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2008-03-02 00:29:27 +0000 |
commit | 6e932e8752faae824cdcb1073014771163a600a7 (patch) | |
tree | 384e84cbf6ca9b0f205764b948895ec8682d6a3a /plugins/admin_advices | |
parent | 1f271ceca3e74c7b077f8462086db020121e81c3 (diff) |
header.tpl goes smart
git-svn-id: http://piwigo.org/svn/trunk@2240 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | plugins/admin_advices/main.inc.php | 22 |
1 files changed, 10 insertions, 12 deletions
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' => '<link rel="stylesheet" type="text/css" ' - . 'href="'.PHPWG_PLUGINS_PATH.'admin_advices/default-layout.css">', - ) + $template->append( + 'head_elements', + '<link rel="stylesheet" type="text/css" ' + . 'href="'.PHPWG_PLUGINS_PATH.'admin_advices/default-layout.css">' ); 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, ) ); } |