mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-12 03:33:01 +02:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user