diff --git a/plugins/admin_advices/admin_advices.tpl b/plugins/admin_advices/admin_advices.tpl index f6e9d98c9..5b24c5c9a 100644 --- a/plugins/admin_advices/admin_advices.tpl +++ b/plugins/admin_advices/admin_advices.tpl @@ -1,34 +1,41 @@ - + -
-

{lang:About}: {ADVICE_ABOUT}

-

{ADVICE_TEXT}

+
+

{lang:An_advice_about} {ADVICE_ABOUT}

+

{ADVICE_TEXT}

-
+
{More.ADVICE}
-
+
+ +
{thumbnail.IMAGE_ALT} - + {thumbnail.IMAGE_ALT}{lang:Name}
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Name}
{thumbnail.IMAGE_ALT}{lang:Description}
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Description}
{thumbnail.IMAGE_ALT}{lang:Author}
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Author}
{thumbnail.IMAGE_ALT}{lang:Creation date}
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Creation date}
{thumbnail.IMAGE_ALT}{lang:Metadata}
- + alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Tags} ({thumbnail.NUM_TAGS})
+
diff --git a/plugins/admin_advices/default-layout.css b/plugins/admin_advices/default-layout.css new file mode 100644 index 000000000..dfc4e7fb8 --- /dev/null +++ b/plugins/admin_advices/default-layout.css @@ -0,0 +1,58 @@ +/* $Id$ */ +.content { + list-style-type:none; + margin: 0 1em 0 14.5em; + border: 1px solid; + padding: 0; +} +.content h2 { + font-weight: bold; + padding-left: 2em; +} +.content h3 { + text-align: left; + padding-left: 3em; + font-size: 120%; +} +.content table tr td { + text-align: left; + padding-left: 2em; +} +.pwgmenu { + display: table; + list-style-type: none; + list-style-image: none; /* for firefox */ + white-space: nowrap; + position: relative; + text-decoration : none; + font-family: verdana, arial, helvetica, sans-serif; + font-size: 70%; + line-height: 1.1em; + width: 66em; + margin: 1px 8px; + padding: 3px; + background: transparent; +} +.pwgmenu li { + float: left; + width: 10em !important; + text-align: center; + margin: 0 6px; + padding: 0; + +} +.pwgmenu a { + width: 9em !important; + display: block; + padding: 4px 8px; + background: #69c; /* PWG Graphic charts */ + color: white; + text-align: center; + text-decoration: none; + font-weight: bold; + border: 1px solid #fff; /* Why bordered? in case of #69c background */ +} +.pwgmenu a:hover { + background: #f92; + color: white; +} /* PWG Graphic charts */ diff --git a/plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php b/plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php index 4c8adf87e..a56febb66 100644 --- a/plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php +++ b/plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php @@ -5,7 +5,7 @@ // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | branch : BSF (Best So Far) -// | file : $RCSfile$ +// | file : $URL$ // | last update : $Date: 2006-12-21 22:38:20 +0100 (jeu., 4 jan. 2007) $ // | last modifier : $Author: Vincent $ // | revision : $Revision: 1677 $ @@ -30,7 +30,9 @@ //$lang_info['direction'] = 'ltr'; //$lang_info['code'] = 'en'; global $lang; +$lang['An_advice_about'] = 'A new advice about'; $lang['Metadata'] = 'Metadata'; + foreach ($conf as $key => $value) { if ( is_string($value) ) diff --git a/plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php b/plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php index 4b824f91f..49b2b2979 100644 --- a/plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php +++ b/plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php @@ -5,7 +5,7 @@ // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ // | branch : BSF (Best So Far) -// | file : $RCSfile$ +// | file : $URL$ // | last update : $Date: 2006-12-21 22:38:20 +0100 (jeu., 4 jan. 2007) $ // | last modifier : $Author: Vincent $ // | revision : $Revision: 1677 $ @@ -30,7 +30,9 @@ //$lang_info['direction'] = 'ltr'; //$lang_info['code'] = 'fr'; global $lang; +$lang['An_advice_about'] = 'Un nouveau conseil à propos de '; $lang['Metadata'] = 'Méta-données'; + foreach ($conf as $key => $value) { if ( is_string($value) ) diff --git a/plugins/admin_advices/main.inc.php b/plugins/admin_advices/main.inc.php index 4e574424b..008b0b445 100644 --- a/plugins/admin_advices/main.inc.php +++ b/plugins/admin_advices/main.inc.php @@ -4,14 +4,53 @@ Version: 1.0.0 Author: PhpWebGallery team Description: Give you an advice on the administration page. */ +// +-----------------------------------------------------------------------+ +// | PhpWebGallery - a PHP based picture gallery | +// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | +// +-----------------------------------------------------------------------+ +// | branch : BSF (Best So Far) +// | file : $URL$ +// | last update : $Date$ +// | last modifier : $Author$ +// | revision : $Rev$ +// +-----------------------------------------------------------------------+ +// | This program is free software; you can redistribute it and/or modify | +// | it under the terms of the GNU General Public License as published by | +// | the Free Software Foundation | +// | | +// | This program is distributed in the hope that it will be useful, but | +// | WITHOUT ANY WARRANTY; without even the implied warranty of | +// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | +// | General Public License for more details. | +// | | +// | You should have received a copy of the GNU General Public License | +// | along with this program; if not, write to the Free Software | +// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | +// | USA. | +// +-----------------------------------------------------------------------+ add_event_handler('loc_begin_page_tail', 'set_admin_advice' ); +add_event_handler('loc_end_page_header', 'set_admin_advice_add_css' ); +// Add a XHTML tag in HEAD section +function set_admin_advice_add_css() +{ + global $template; + $template->assign_block_vars( + 'head_element', + array( + 'CONTENT' => '', + ) + ); +} +// Build an advice on the Admin Intro page function set_admin_advice() { global $page, $user, $template, $conf; + // This Plugin works only on the Admin page if ( isset($page['body_id']) and $page['body_id']=='theAdminPage' and $page['page'] == 'intro' @@ -30,7 +69,6 @@ function set_admin_advice() // If there is an advice if ( $cond ) { -// $template->set_filenames( array( 'advice' => 'admin_advices.tpl' )); $template->set_filenames(array( 'admin_advice' => PHPWG_ROOT_PATH.'/plugins/admin_advices/admin_advices.tpl') @@ -51,7 +89,13 @@ SELECT * .'&image_id='.$row['id']; $url_check = get_themeconf('icon_dir').'/'; $url_uncheck = $url_check . 'uncheck'; - $url_check .= 'check'; + $url_check .= 'check'; + $picture_id = $row['id']; + $query = ' +SELECT * FROM '.IMAGE_TAG_TABLE.' +WHERE image_id = ' . $picture_id .' +;'; + $tag_count = mysql_num_rows(mysql_query($query)); $template->assign_block_vars( 'thumbnail', array( @@ -68,6 +112,9 @@ SELECT * $url_uncheck : $url_check, 'CREATE_DATE' => (empty($row['date_creation'])) ? $url_uncheck : $url_check, + 'TAGS' => ($tag_count == 0) ? + $url_uncheck : $url_check, + 'NUM_TAGS' => (string) $tag_count, 'U_MODIFY' => $url_modify, ) );