aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2005-06-25 17:09:01 +0000
committerplegall <plg@piwigo.org>2005-06-25 17:09:01 +0000
commit3c2b8d230e0ca85bf7fc22124769c131cc47ac80 (patch)
tree6908e4e56b8e4f2d9a69f313887af2aa016f40b6
parent49fb2b6fd30bf4830c344ca93c64e2ecd92d2dff (diff)
- new feature : ability to add links on the main page (see
include/config_default.inc.php) git-svn-id: http://piwigo.org/svn/trunk@797 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--category.php15
-rw-r--r--doc/ChangeLog5
-rw-r--r--include/config_default.inc.php13
-rw-r--r--language/en_UK.iso-8859-1/common.lang.php1
-rw-r--r--language/fr_FR.iso-8859-1/common.lang.php1
-rw-r--r--template/default/category.tpl10
6 files changed, 45 insertions, 0 deletions
diff --git a/category.php b/category.php
index 592ca526b..442f9dcb7 100644
--- a/category.php
+++ b/category.php
@@ -175,6 +175,21 @@ $template->assign_vars(array(
'U_CADDIE'=>add_session_id(PHPWG_ROOT_PATH.'category.php'.get_query_string_diff(array('caddie')).'&amp;caddie=1')
)
);
+//-------------------------------------------------------------- external links
+if (count($conf['links']) > 0)
+{
+ $template->assign_block_vars('links', array());
+
+ foreach ($conf['links'] as $url => $label)
+ {
+ $template->assign_block_vars(
+ 'links.link',
+ array(
+ 'URL' => $url,
+ 'LABEL' => $label
+ ));
+ }
+}
//---------------------------------------------------------- special categories
// favorites categories
if ( !$user['is_the_guest'] )
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 87826a9bc..aa3eb2ee4 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-25 Pierrick LE GALL
+
+ * new feature : ability to add links on the main page (see
+ include/config_default.inc.php)
+
2005-06-21 Pierrick LE GALL
* comments page rewritten : comments are displayed one by one,
diff --git a/include/config_default.inc.php b/include/config_default.inc.php
index 0fea39a78..799e6d934 100644
--- a/include/config_default.inc.php
+++ b/include/config_default.inc.php
@@ -199,4 +199,17 @@ $conf['tn_height'] = 96;
// show_version : shall the version of PhpWebGallery be displayed at the
// bottom of each page ?
$conf['show_version'] = true;
+
+// links : list of external links to add in the menu. An example is the best
+// than a long explanation :
+//
+// $conf['links'] = array(
+// 'http://phpwebgallery.net' => 'PWG website',
+// 'http://forum.phpwebgallery.net' => 'PWG forum',
+// 'http://phpwebgallery.net/doc' => 'PWG wiki'
+// );
+//
+// If the array is empty, the "Links" box won't be displayed on the main
+// page.
+$conf['links'] = array();
?>
diff --git a/language/en_UK.iso-8859-1/common.lang.php b/language/en_UK.iso-8859-1/common.lang.php
index 4ff05ed5a..c53518b8c 100644
--- a/language/en_UK.iso-8859-1/common.lang.php
+++ b/language/en_UK.iso-8859-1/common.lang.php
@@ -326,4 +326,5 @@ $lang['Sort order'] = 'Sort order';
$lang['Number of items'] = 'Number of items';
$lang['return to homepage'] = 'return to homepage';
$lang['Filter and display'] = 'Filter and display';
+$lang['Links'] = 'Links';
?> \ No newline at end of file
diff --git a/language/fr_FR.iso-8859-1/common.lang.php b/language/fr_FR.iso-8859-1/common.lang.php
index 00016f7f0..0cc1fc669 100644
--- a/language/fr_FR.iso-8859-1/common.lang.php
+++ b/language/fr_FR.iso-8859-1/common.lang.php
@@ -329,4 +329,5 @@ $lang['Sort order'] = 'Ordre';
$lang['Number of items'] = 'Nombre d\'éléments';
$lang['return to homepage'] = 'retourner à la page d\'accueil';
$lang['Filter and display'] = 'Filtrer et afficher';
+$lang['Links'] = 'Liens';
?> \ No newline at end of file
diff --git a/template/default/category.tpl b/template/default/category.tpl
index bd5a562b7..fd4c88262 100644
--- a/template/default/category.tpl
+++ b/template/default/category.tpl
@@ -3,6 +3,16 @@
<tr>
<td valign="top" style="padding:0px 10px 0px 10px;width:1%;">
<div class="table1">
+ <!-- BEGIN links -->
+ <div class="titreMenu">{lang:Links}</div>
+ <div class="menu">
+ <ul class="menu">
+ <!-- BEGIN link -->
+ <li><a href="{links.link.URL}">{links.link.LABEL}</a></li>
+ <!-- END link -->
+ </ul>
+ </div>
+ <!-- END links -->
<div class="titreMenu">
<a href="{U_HOME}">{L_CATEGORIES}</a>
</div>