From 3c2b8d230e0ca85bf7fc22124769c131cc47ac80 Mon Sep 17 00:00:00 2001 From: plegall Date: Sat, 25 Jun 2005 17:09:01 +0000 Subject: - 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 --- category.php | 15 +++++++++++++++ doc/ChangeLog | 5 +++++ include/config_default.inc.php | 13 +++++++++++++ language/en_UK.iso-8859-1/common.lang.php | 1 + language/fr_FR.iso-8859-1/common.lang.php | 1 + template/default/category.tpl | 10 ++++++++++ 6 files changed, 45 insertions(+) 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')).'&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 @@
+ +
{lang:Links}
+ + -- cgit v1.2.3