aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/admin_advices/main.inc.php
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2007-01-08 20:52:58 +0000
committervdigital <vdigital@piwigo.org>2007-01-08 20:52:58 +0000
commitf68903ec234fe7d76cddbbaa99fb0096d329582c (patch)
tree0dfd4580273c4feef9b210af69331352aeab67fe /plugins/admin_advices/main.inc.php
parent75246a064cca42aaae0a4bf446bcbdaf6e051a6a (diff)
Minor corrections in admin advices (French is still on going).
git-svn-id: http://piwigo.org/svn/trunk@1702 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/admin_advices/main.inc.php')
-rw-r--r--plugins/admin_advices/main.inc.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/plugins/admin_advices/main.inc.php b/plugins/admin_advices/main.inc.php
index 5af0b8f9a..a17f5a658 100644
--- a/plugins/admin_advices/main.inc.php
+++ b/plugins/admin_advices/main.inc.php
@@ -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(