aboutsummaryrefslogtreecommitdiffstats
path: root/template/default/htmlfunctions.inc.php
diff options
context:
space:
mode:
authorgweltas <gweltas@piwigo.org>2004-02-02 00:55:18 +0000
committergweltas <gweltas@piwigo.org>2004-02-02 00:55:18 +0000
commitbef4b3e3aa8e3d54cbf8b4962b9b5d4a89b55429 (patch)
tree647b2cf07ee8451a9314e1e8aebd11d9396cb32b /template/default/htmlfunctions.inc.php
parenteea989f019f21fbd7ae4aa8e2f4a1503992c23bf (diff)
Merge of the 1.3.1 release
Creation of an unique include file (common.php) Creation of an unique define file (include/constants.php) Modification of the installation procedure git-svn-id: http://piwigo.org/svn/trunk@345 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'template/default/htmlfunctions.inc.php')
-rw-r--r--template/default/htmlfunctions.inc.php37
1 files changed, 20 insertions, 17 deletions
diff --git a/template/default/htmlfunctions.inc.php b/template/default/htmlfunctions.inc.php
index 2010a2768..ad52bfc13 100644
--- a/template/default/htmlfunctions.inc.php
+++ b/template/default/htmlfunctions.inc.php
@@ -17,10 +17,10 @@
* *
***************************************************************************/
-include( PREFIX_INCLUDE.'./template/'.$user['template'].'/theme/conf.php' );
+//include( PREFIX_INCLUDE.'./template/'.$user['template'].'/theme/conf.php' );
$user['lien_expanded']='./template/'.$user['template'].'/theme/expanded.gif';
$user['lien_collapsed']='./template/'.$user['template'].'/theme/collapsed.gif';
-include_once( PREFIX_INCLUDE.'./template/'.$user['template'].'/style.inc.php');
+//include_once( PREFIX_INCLUDE.'./template/'.$user['template'].'/style.inc.php');
function get_icon( $date_comparaison )
{
@@ -160,15 +160,15 @@ function initialize_template()
{
global $vtp, $handle, $user, $lang;
- $vtp->setGlobalVar( $handle, 'charset', $lang['charset'] );
- $vtp->setGlobalVar( $handle, 'style', $user['style'] );
+ // $vtp->setGlobalVar( $handle, 'charset', $lang['charset'] );
+ //$vtp->setGlobalVar( $handle, 'style', $user['style'] );
$vtp->setGlobalVar( $handle, 'frame_start', get_frame_start() );
$vtp->setGlobalVar( $handle, 'frame_begin', get_frame_begin() );
$vtp->setGlobalVar( $handle, 'frame_end', get_frame_end() );
- $vtp->setVarF( $handle, 'header',
- './template/'.$user['template'].'/header.htm' );
- $vtp->setVarF( $handle, 'footer',
- './template/'.$user['template'].'/footer.htm' );
+ //$vtp->setVarF( $handle, 'header',
+ // './template/'.$user['template'].'/header.htm' );
+ //$vtp->setVarF( $handle, 'footer',
+ // './template/'.$user['template'].'/footer.htm' );
}
function display_category( $category, $indent, $handle )
@@ -177,8 +177,7 @@ function display_category( $category, $indent, $handle )
$vtp->addSession( $handle, 'category' );
$vtp->setVar( $handle, 'category.indent', $indent );
-
- if ( $user['expand'] or count( $category['subcats'] ) == 0 )
+ if ( $user['expand'] or $category['nb_sub_categories'] == 0 )
{
$vtp->addSession( $handle, 'bullet_wo_link' );
$vtp->setVar( $handle, 'bullet_wo_link.bullet_url',
@@ -188,12 +187,16 @@ function display_category( $category, $indent, $handle )
else
{
$vtp->addSession( $handle, 'bullet_w_link' );
- $url = './category.php?cat='.$page['cat'];
+ $url = './category.php';
+ if (isset($page['cat']))
+ {
+ $url .='?cat='.$page['cat'];
$url.= '&amp;expand='.$category['expand_string'];
- if ( $page['cat'] == 'search' )
- {
- $url.= '&amp;search='.$_GET['search'].'&amp;mode='.$_GET['mode'];
- }
+ }
+ else if ($category['expand_string']<>'')
+ {
+ $url.= '?expand='.$category['expand_string'];
+ }
$vtp->setVar( $handle, 'bullet_w_link.bullet_link', add_session_id($url) );
if ( $category['expanded'] )
{
@@ -220,10 +223,10 @@ function display_category( $category, $indent, $handle )
{
$vtp->setVar( $handle, 'category.name_style', 'font-weight:bold;' );
}
- if ( count( $category['subcats'] ) > 0 )
+ if ( $category['nb_sub_categories'] > 0 )
{
$vtp->addSession( $handle, 'subcat' );
- $vtp->setVar( $handle, 'subcat.nb_subcats', count($category['subcats']) );
+ $vtp->setVar( $handle,'subcat.nb_subcats',$category['nb_sub_categories'] );
$vtp->closeSession( $handle, 'subcat' );
}
$vtp->setVar( $handle, 'category.total_cat', $category['nb_images'] );