Minor corrections in admin advices (French is still on going).

git-svn-id: http://piwigo.org/svn/trunk@1702 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
vdigital
2007-01-08 20:52:58 +00:00
parent 75246a064c
commit f68903ec23
4 changed files with 115 additions and 48 deletions
+22
View File
@@ -1,5 +1,6 @@
<?php /*
Plugin Name: Admin Advices !
Version: 1.0.0
Author: PhpWebGallery team
Description: Give you an advice on the administration page.
*/
@@ -35,6 +36,27 @@ function set_admin_advice()
'admin_advice' =>
PHPWG_ROOT_PATH.'/plugins/admin_advices/admin_advices.tpl')
);
// Random Thumbnail
$query = '
SELECT *
FROM '.IMAGES_TABLE.'
ORDER BY RAND(NOW())
LIMIT 0, 1
;';
$result = pwg_query($query);
$row = mysql_fetch_assoc($result);
if ( is_array($row) )
{
$template->assign_block_vars(
'thumbnail',
array(
'IMAGE' => get_thumbnail_url($row),
'IMAGE_ALT' => $row['file'],
'IMAGE_TITLE' => $row['name'],
)
);
}
$advice_text = array_shift($adv);
$template->assign_vars(
array(