aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorvdigital <vdigital@piwigo.org>2007-01-12 22:36:56 +0000
committervdigital <vdigital@piwigo.org>2007-01-12 22:36:56 +0000
commited6d397aa1a82d6a8f0794b46a381fe746a0ae70 (patch)
treef4785d68f727ecdc2f0e801a47f7823cf7c3210c /plugins
parentc75d7186d7a9b1d6f2e44d5deea3447c0fba11b4 (diff)
Admin Advices includes :
- Tags relation check. - PhpWebGallery link buttons. - Its own default-layout.css (as a sample for other plugins as well). No more functions would be included in 1.7 Please process to correct all wording errors in any advice. git-svn-id: http://piwigo.org/svn/trunk@1718 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--plugins/admin_advices/admin_advices.tpl37
-rw-r--r--plugins/admin_advices/default-layout.css58
-rw-r--r--plugins/admin_advices/en_UK.iso-8859-1/lang.adv.php4
-rw-r--r--plugins/admin_advices/fr_FR.iso-8859-1/lang.adv.php4
-rw-r--r--plugins/admin_advices/main.inc.php51
5 files changed, 135 insertions, 19 deletions
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 @@
-<!-- $Id: admin_advices.tpl 939 2005-11-17 20:13:36Z VDigital $ -->
+<!-- $Id$ -->
-<div class="content" style="list-style-type:none; margin: 0 1em 0 14.5em; border: 1px solid;">
- <h2 style="font-weight: bold; padding-left: 2em;">{lang:About}: {ADVICE_ABOUT}</h2>
- <h3 style="text-align: left; padding-left: 3em;">{ADVICE_TEXT}</h3>
+<div class="content">
+ <h2>{lang:An_advice_about} {ADVICE_ABOUT}</h2>
+ <h3>{ADVICE_TEXT}</h3>
<table>
- <tr><td style="text-align: left; padding-left: 2em; width:50%;">
+ <tr><td style="text-align: left; width: 45em;">
<!-- BEGIN More -->
{More.ADVICE} <br />
<!-- END More -->
- </td><td style="text-align: left; width:15%;">
+ <br />
+ <ul class="pwgmenu">
+ <li><a href="http://demo.phpwebgallery.net">DEMO</a></li>
+ <li><a href="http://phpwebgallery.net/doc">WIKI / DOC</a></li>
+ <li><a href="http://forum.phpwebgallery.net">FORUM</a></li>
+ <li><a href="http://bugs.phpwebgallery.net">BUGS</a></li>
+ <li><a href="http://phpwebgallery.net/ext">EXTENSIONS</a></li>
+</ul>
+ </td><td style="text-align: right; width: 155px;">
<!-- BEGIN thumbnail -->
<a href="{thumbnail.U_MODIFY}" alt="{lang:link_info_image}">
<img class="thumbnail" src="{thumbnail.IMAGE}"
alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"></a>
- </td><td style="text-align: left; width:15%;">
+ </td><td style="text-align: left;">
<img src="{thumbnail.NAME}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}">{lang:Name}<br />
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Name}<br />
<img src="{thumbnail.COMMENT}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}">{lang:Description}<br />
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Description}<br />
<img src="{thumbnail.AUTHOR}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}">{lang:Author}<br />
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Author}<br />
<img src="{thumbnail.CREATE_DATE}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}">{lang:Creation date}<br />
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Creation date}<br />
<img src="{thumbnail.METADATA}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}">{lang:Metadata}<br />
-<!-- DEGING miss_Tags
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Metadata}<br />
<img src="{thumbnail.TAGS}.png"
- alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}">{lang:Tags}
- END miss_Tags -->
+ alt="{thumbnail.IMAGE_ALT}" title="{thumbnail.IMAGE_TITLE}"> {lang:Tags} ({thumbnail.NUM_TAGS})
<!-- END thumbnail -->
</td></tr>
</table>
+
</div>
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' => '<link rel="stylesheet" type="text/css" '
+ . 'href="plugins/admin_advices/default-layout.css" />',
+ )
+ );
+}
+// 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 *
.'&amp;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,
)
);