•  » Utilisation
  •  » [1.4.1] Problème de drapeaux...

#1 2005-11-21 12:09:03

Reflex
Membre
2005-10-16
290

[1.4.1] Problème de drapeaux...

J'ai 2 fois les drapeaux, et je n'ai pas besoin de cette bordure claire autour de ces derniers...

caterory.tpl:

Code:

<div style="padding:3px;"><img src="template/default/images/logo.jpg"></div>
<table style="width:100%;">
  <tr>
    <td valign="top" style="padding:0px 10px 0px 10px;width:1%;">
      <div class="table1">
        <div class="qlc">
        <!-- BEGIN qlc -->
        <a href="{qlc.URL}" >
        <img src="{qlc.IMGURL}" alt="{qlc.ALT}" title="{qlc.TITLE}" class="qlcLink"/>
        </a>
        <!-- END qlc -->
        </div>
        <div class="qlc">
        <!-- BEGIN qlc -->
        <a href="{qlc.URL}" >
        <img src="{qlc.IMGURL}" alt="{qlc.ALT}" title="{qlc.TITLE}" class="qlcLink"/>
        </a>
        <!-- END qlc -->
        </div>
        <div class="titreMenu">
          <a href="{U_HOME}">{L_CATEGORIES}</a>
        </div>
        <div class="menu">
            {MENU_CATEGORIES_CONTENT}
        <div class="totalImages">[&nbsp;{NB_PICTURE}&nbsp;{L_TOTAL}&nbsp;]</div>
    </div>
    <div class="titreMenu">{L_IDENTIFY}</div>
     <div class="menu">
     <!-- BEGIN login -->
    <ul class="menu">
      <li><a href="{U_REGISTER}">{L_REGISTER}</a></li>
      <li><a href="{F_IDENTIFY}">{L_LOGIN}</a></li>
    </ul>
    <hr />
    <form method="post" action="{F_IDENTIFY}">
    <input type="hidden" name="redirect" value="{U_REDIRECT}">
    {L_USERNAME}<br />
    <input type="text" name="username" size="15" value="" /><br />
    {L_PASSWORD}<br />
    <input type="password" name="password" size="15"><br />
                <!-- BEGIN remember_me -->
                <input type="checkbox" name="remember_me" value="1" /> {L_REMEMBER_ME}<br />
                <!-- END remember_me -->
    <input type="submit" name="login" value="{L_SUBMIT}" class="bouton" />
    </form>
    <!-- END login -->
    <!-- BEGIN logout -->
    <p>{L_HELLO}&nbsp;{USERNAME}&nbsp;!</p>
    <ul class="menu">
      <li><a href="{U_LOGOUT}">{L_LOGOUT}</a></li>
      <li><a href="{U_PROFILE}" title="{L_PROFILE_HINT}">{L_PROFILE}</a></li>
    <!-- BEGIN admin -->
        <li><a href="{U_ADMIN}" title="{L_ADMIN_HINT}">{L_ADMIN}</a></li>
    <!-- END admin -->
    </ul>
    <!-- END logout -->
    </div>
      </div>
  </td>
  <td style="padding:0px 10px 0px 10px; width:99%;" valign="top">
    <div class="home">
      <div class="titrePage">{TITLE}</div>
      <!-- BEGIN calendar -->
               <div class="navigationBar">{calendar.YEARS_NAV_BAR}</div>
        <div class="navigationBar">{calendar.MONTHS_NAV_BAR}</div>
      <!-- END calendar -->
      <!-- BEGIN thumbnails -->
      <table valign="top" align="center" class="thumbnail">
        <!-- BEGIN line -->
        <tr>
        <!-- BEGIN thumbnail -->
        <td class="thumbnail">
          <a href="{thumbnails.line.thumbnail.U_IMG_LINK}">
          <img src="{thumbnails.line.thumbnail.IMAGE}"
             alt="{thumbnails.line.thumbnail.IMAGE_ALT}"
             title="{thumbnails.line.thumbnail.IMAGE_TITLE}"
             class="thumbLink" />
          <br />
          <span class="{thumbnails.line.thumbnail.IMAGE_STYLE}">{thumbnails.line.thumbnail.IMAGE_NAME}</span></a>
          {thumbnails.line.thumbnail.IMAGE_TS}
          <!-- BEGIN nb_comments -->
          <br />{thumbnails.line.thumbnail.nb_comments.NB_COMMENTS} {L_COMMENT}
          <!-- END nb_comments -->
        </td>
        <!-- END thumbnail -->
        </tr>
        <!-- END line -->
      </table>
      <!-- END thumbnails -->
    <br />
      <!-- BEGIN cat_infos -->
        <!-- BEGIN navigation -->
        <div class="navigationBar">{cat_infos.navigation.NAV_BAR}</div>
        <!-- END navigation -->
        <!-- BEGIN comment -->
        <div class="info">{cat_infos.comment.COMMENTS}</div>
        <!-- END comment -->
      <!-- END cat_infos -->
      </div>
  </td>
  </tr>
</table>

defaut.css

Code:

/* BACKGROUND */

body { background-color:#000000;} /*General background color*/
.main, .throw, .admin {  background-color:#3F3F3F;} /*Main background color*/
.row1,input,select,textarea, .table1, .home { background-color:#5F5F5F;} /* Tables & forms */
.table2, .commentTitle { background-color: #797979;} /* Alternate table & comments  */
.errors { background-color:red;} /* Errors display */
.titreMenu,.titrePage,.imgMenu a:hover { background-image: url(theme/tableh1_bg.gif);} /* Titles background image  */
.bouton, .imgMenu a, #imgBarMenu { background-image: url(theme/button_bg.gif);} /* Buttons background image */

/* FONT COLORS */

body { color:#E0E0E0;} /* General font color */
input,select,textarea { color:#FFFFCC;} /* Forms font color */
.titreMenu, .titreMenu a, .info, .admin{ color:#FFF48E;} /* Menu & sections titles */
.titrePage, .titreMenu a:hover { color:#E0E0E0;} /* Page title */
.comment{ color:#C6B78E;} /* Comments */
.commentDate { color:#999999;} /* Comments date */
.throw { color:#FFFFCC;} /* First line of tables */
.bouton, .errors { color:#FFFFFF;} /* Buttons & errors */

/* Update results (admin side only) */
.update_summary_new, .best_gen_time
{ color:#9cb4ce;}

/* Update results (admin side only) */
.update_summary_del,.worst_gen_time
{ color:#ffe1e1;}

/* ANCHORS */

a { text-decoration:none; color:#FFFFFF;}
a:hover { text-decoration:none; color:#FFF48E;}
a.none:hover { text-decoration:none;}
a.image:hover { text-decoration:none;}
a.thumbLink:hover { text-decoration:none;}

/* FONT STYLES */

body /* Main font style */
{
  font-family: Verdana, Geneva, Arial, sans-serif;
  font-size:12px;
  margin:5px;
}

h1 /* H1 tag style (admin side only) */
{
  font-family: 'Trebuchet MS', Verdana, sans-serif;
  text-decoration:none; 
  line-height:  120%;
  font-size:18px;
  font-weight: bold;
}

h2 /* H2 tag style (admin side only) */
{
  font-family: Arial, Helvetica, sans-serif;
  text-decoration:none; 
  line-height:  120%; 
  font-size:12px;
  font-weight: bold;
}

.titreMenu /* Menu titles */
{
  font-size:12px;
  font-weight:600;
}

.titrePage /* Page titles */
{
  font-family: 'Trebuchet MS', Verdana, sans-serif;
  font-weight:600;
  font-size:16px;
}

.commentTitle /* Comments title */
{
  font-family: Arial, Helvetica, sans-serif;
  font-size:12px;
  font-weight:bold;
}

.menu, .thumbnail, .totalImages { font-size:11px;}
.small{ font-size:10px;}
.menuCategorySelected, .throw, .admin, .errors { font-weight:bold;}
.menuCategoryNotSelected, .dateSelected, .pageNumberSelected, .thumb_picture, .thumb_category  { font-weight:normal;}
.commentDate, .bouton  { font-weight:lighter;}
.commentImage { font-style:italic; font-size:16px;}
.nameImage { font-size:20px;}
.info { font-size:16px;}
.copyright { font-size:10px; text-align:center; letter-spacing:-1px;}
div.information {  font-size:14px; font-weight:bold;}

/*----------------------------------------------*/
/* Under this point, do not modify the values   */
/* unless you are aware of what you are doing!  */
/*----------------------------------------------*/

/* POSITION */

#gauche,#droite
{
  float:left;
  width:30%;
  text-align:left;
  white-space:nowrap;
}

#centre
{
  float:left;
  width:39%;
  text-align:center;
}

#droite{text-align:right;}
#left {float:left; }
#right{float:right; }

/* GENERAL LAYOUT STYLES */

.main 
{
  border: 1px solid #E0E0E0; 
  width:100%;
  padding-bottom:30px;
  text-align:center;
  display:block;
}

.home
{
  border: 1px solid #000000;
  display:block;
  text-align:center;
  width:100%;
}

.navigationBar 
{
  text-align:center;
  margin-top:10px;
  margin-bottom:10px;
}

.info 
{
  margin:5px 0px 5px 0px;
  /* white-space:nowrap; */
  text-align:center;
}

.errors 
{
  text-align:left;
  margin-top:5px;
  margin-bottom:5px;
  border:1px solid black;
}

div.information {
  text-align:left;
  margin:10px;
  padding:5px;
}

span.dateSelected, span.pageNumberSelected {
  text-decoration:underline;
}
/* MENU LAYOUT STYLES */

.titreMenu,.titrePage
{
  padding-right: 10px;
  padding-left: 10px;
  border-bottom: 1px solid #000000;
  border-right: 1px solid #000000;
  height: 25px;
  line-height: 25px;
  text-align:center;
}
.titrePage {text-align:left;}

.menu 
{
  margin:10px 5px 10px 5px;
  white-space:nowrap;
  text-align:left;
}

ul.menu 
{
  text-align:left;
  list-style-type: square ;
  padding-left:15px;
  margin:5px;
}

.totalImages {
  text-align:center;
  margin-top:5px;
}

 /* IMAGE LAYOUT STYLES */
 
.image 
{
  border : 3px solid #FFFFFF;
  margin : 10px 4px 10px 4px;
}

#imgBarMenu
{
  width:100%;
  display:block;
  height:25px;
  border-bottom: 1px solid #000000;
}
  
.imgMenu
{
  width:48px;
  border:none;
  float:left;
}

.imgMenu img
{
 border:none;
 text-align:center;
 margin-top:4px;
}
  
.imgMenu a
{
  display:block;
  height: 25px;
  border-bottom: 1px solid #000000;
  border-left: 1px solid #838383;
  border-right: 1px solid #000000;
}

.imgMenu a:hover
{
  border-bottom: 1px solid #3F3F3F;
  border-left: 1px solid #3F3F3F;
  border-right: 1px solid #3F3F3F;
}

.commentImage {
  text-align:justify;
  margin-top: 10px;
  margin-bottom: 10px;
}

/* TABLE LAYOUT STYLES */

.table1
{
  border: 1px solid #000000;
  display:block;
}
  
.table2 {
  border: 1px solid #000000; 
  margin:  0px 10px 0px 0px;
  padding:0px;
}

.tablecompact{
  width:100%;
  border-collapse:collapse;
}

.row1,.row2 {
  text-align:left;
  padding:5px 0px 5px 0px;
  height:20px;
} 

.throw {
  text-align:center;
  border-top: 1px solid #000000; 
  border-bottom: 1px solid #000000; 
  height:20px;
}

td.throw{
  text-align:left;
  width:auto;
}

/* THUMBNAILS LAYOUT STYLES */

.thumbnail {
  text-align:center;
  vertical-align: baseline;
  white-space: nowrap;
}

table.thumbnail {
  border-collapse:separate;
  display:inline-table;
}

.thumbLink {
  border-style: solid;
  border-width:1px;
  border-color: #A0A0A0;
  margin: 2px;
}

/* COMMENTS LAYOUT STYLES */

.commentTitle {  padding: 15px 5px 10px 5px; }
.commentDate {
  text-align:right;
  border-top: 1px solid #000000; 
  border-bottom: 1px solid #000000;
}

/* FORM LAYOUT STYLES */

form
{
  text-align:left;
  padding:10px;
}

.bouton
{
  border: 1px solid #404750;
  padding-left: 3px;
  padding-right: 3px;
  background-position : bottom;
  margin-top:10px;
}

input,select,textarea 
{
 text-indent:2px;
 border: 1px solid #797979;
 padding: 0;
}

.radio{  border:0;}

/* ADMIN LAYOUT STYLES */

.adminMenu 
{
  text-align:center;
  font-size:12px;
}

div.adminMenu{ margin:10px 50px 10px 50px; }

.admin 
{
margin:0px 0px 12px 0px;
text-align: center;
padding:0px;
}

div.remoteOutput, div.remoteLocal {
  border:1px solid black;
  margin:10px;
  text-align:left;
  padding:5px;
}

div.remoteLocal {
  text-align:center;
}

/* for debugging purpose */
pre { text-align:left; }
/* BEGIN QLC MOD */
.qlc
{
  text-align:center;
  margin : 4px;
}

.qlcLink
{
  border: 1px solid #000000;
}
/* END QLC MOD */

UL.menu A.provenance {
  font-weight: bold;
}

UL.menu A.genre {
  font-style: italic;
}

UL.menu A.especeGuillemet {
  font-style: normal;
  font-weight: normal;
}
 
UL.menu A.espece {
  font-style: italic;
}

user.inc.php:

Code:

<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery                           |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch        : BSF (Best So Far)
// | file          : $RCSfile: user.inc.php,v $
// | last update   : $Date: 2005/01/08 11:23:52 $
// | last modifier : $Author: plg $
// | revision      : $Revision: 1.29 $
// +-----------------------------------------------------------------------+
// | 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.                                                                  |
// +-----------------------------------------------------------------------+

// retrieving connected user informations

if (isset($_COOKIE['id']))
{
  $session_id = $_COOKIE['id'];
  $user['has_cookie'] = true;
}
else if (isset($_GET['id']))
{
  $session_id = $_GET['id'];
  $user['has_cookie'] = false;
}
else
{
  $user['has_cookie'] = false;
}

if (isset($session_id)
    and ereg("^[0-9a-zA-Z]{".$conf['session_id_size']."}$", $session_id))
{
  $page['session_id'] = $session_id;
  $query = '
SELECT user_id,expiration,NOW() AS now
  FROM '.SESSIONS_TABLE.'
  WHERE id = \''.$page['session_id'].'\'
;';
  $result = pwg_query($query);
  if (mysql_num_rows($result) > 0)
  {
    $row = mysql_fetch_array($result);
    if (strnatcmp($row['expiration'], $row['now']) < 0)
    {
      // deletion of the session from the database, because it is
      // out-of-date
      $delete_query = '
DELETE FROM '.SESSIONS_TABLE.'
  WHERE id = \''.$page['session_id'].'\'
;';
      pwg_query($delete_query);
    }
    else
    {
      $user['id'] = $row['user_id'];
      $user['is_the_guest'] = false;
    }
  }
}
if (!isset($user['id']))
{
  $user['id'] = 2;
  $user['is_the_guest'] = true;
}

$query = '
SELECT u.*, uf.*
  FROM '.USERS_TABLE.' AS u LEFT JOIN '.USER_FORBIDDEN_TABLE.' AS uf
    ON id = user_id
  WHERE u.id = '.$user['id'].'
;';
$row = mysql_fetch_array(pwg_query($query));

// affectation of each value retrieved in the users table into a variable of
// the array $user.
foreach ($row as $key => $value)
{
  if (!is_numeric($key))
  {
    // If the field is true or false, the variable is transformed into a
    // boolean value.
    if ($value == 'true' or $value == 'false')
    {
      $user[$key] = get_boolean($value);
    }
    else
    {
      $user[$key] = $value;
    }
  }
}

// properties of user guest are found in the configuration
if ($user['is_the_guest'])
{
  // BEGIN QLC MOD
  if (isset($_COOKIE['lang']))
  {
    $user['language'] = $_COOKIE['lang'];
  }
  else
  {
    $user['language'] = $conf['default_language'];
  }
  // END QLC MOD
  $user['template'] = $conf['default_template'];
  $user['nb_image_line'] = $conf['nb_image_line'];
  // BEGIN QLC MOD
  $user['nb_line_page'] = $conf['nb_line_page'];
  //$user['language'] = $conf['default_language'];
  $user['maxwidth'] = $conf['default_maxwidth'];
  // END QLC MOD
  $user['maxheight'] = $conf['default_maxheight'];
  $user['recent_period'] = $conf['recent_period'];
  $user['expand'] = $conf['auto_expand'];
  $user['show_nb_comments'] = $conf['show_nb_comments'];
}

// if no information were found about user in user_forbidden table OR the
// forbidden categories must be updated : only if current user is in public
// part
if (!defined('IN_ADMIN') or !IN_ADMIN)
{
  if (!isset($user['need_update'])
      or !is_bool($user['need_update'])
      or $user['need_update'] == true)
  {
    $user['forbidden_categories'] = calculate_permissions($user['id'],
                                                          $user['status']);
  }
}

// forbidden_categories is a must be empty, at least
if (!isset($user['forbidden_categories']))
{
  $user['forbidden_categories'] = '';
}

// special for $user['restrictions'] array
$user['restrictions'] = explode(',', $user['forbidden_categories']);
if ($user['restrictions'][0] == '')
{
  $user['restrictions'] = array();
}

// calculation of the number of picture to display per page
$user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page'];

if (empty($user['language'])
    or !file_exists(PHPWG_ROOT_PATH.'language/'.
                    $user['language'].'/common.lang.php'))
{
  $user['language'] = $conf['default_language'];
}
include_once(PHPWG_ROOT_PATH.'language/'.$user['language'].'/common.lang.php');

// displaying the username in the language of the connected user, instead of
// "guest" as you can find in the database
if ($user['is_the_guest'])
{
  $user['username'] = $lang['guest'];
}

// only if we are in the administration section
if (defined('IN_ADMIN') and IN_ADMIN)
{
  $langdir = PHPWG_ROOT_PATH.'language/'.$user['language'];
  if (!file_exists($langdir.'/admin.lang.php'))
  {
    $langdir = PHPWG_ROOT_PATH.'language/'.$conf['default_language'];
  }
  include_once($langdir.'/admin.lang.php');
  include_once($langdir.'/faq.lang.php');
}

if (empty($user['template']))
{
  $user['template'] = $conf['default_template'];
}
$template = setup_style($user['template']);
?>

category.php:

Code:

<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery                           |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch        : BSF (Best So Far)
// | file          : $RCSfile: category.php,v $
// | last update   : $Date: 2005/04/30 15:23:28 $
// | last modifier : $Author: plg $
// | revision      : $Revision: 1.67.2.1 $
// +-----------------------------------------------------------------------+
// | 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.                                                                  |
// +-----------------------------------------------------------------------+

//--------------------------------------------------------------------- include
define('PHPWG_ROOT_PATH','./');
include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
// BEGIN QLC MOD
//---------------------------------------------------------------------- Quick Language Changer
if (isset( $_GET['lang']))
{
  if (!empty($_GET['lang']) 
    and file_exists(PHPWG_ROOT_PATH.'language/'.$_GET['lang'].'/common.lang.php'))
  {
    if ($user['is_the_guest'])
    {
      setcookie( 'lang', $_GET['lang'], time()+60*60*24*30, cookie_path() );
    }
    else
    {
      $query = '
        UPDATE '.USERS_TABLE.'
        SET language = \''.$_GET['lang'].'\'
        WHERE id = '.$user['id'].'
      ;';
  
      pwg_query($query);
      
      $user['language'] = $_GET['lang'];
    }
  }
  
  $url = 'category.php';
  redirect( $url );
}
// END QLC MOD
//---------------------------------------------------------------------- logout
if ( isset( $_GET['act'] )
     and $_GET['act'] == 'logout'
     and isset( $_COOKIE['id'] ) )
{
  // cookie deletion if exists
  setcookie( 'id', '', 0, cookie_path() );
  $url = 'category.php';
  redirect( $url );
}
//-------------------------------------------------- access authorization check
if (isset($_GET['cat']))
{
  check_cat_id($_GET['cat']);
}
check_login_authorization();
if (isset($page['cat']) and is_numeric($page['cat']))
{
  check_restrictions($page['cat']);
}
//-------------------------------------------------------------- initialization
// detection of the start picture to display
if ( !isset( $_GET['start'] )
     or !is_numeric( $_GET['start'] )
     or ( is_numeric( $_GET['start'] ) and $_GET['start'] < 0 ) )
{
  $page['start'] = 0;
}
else
{
  $page['start'] = $_GET['start'];
}

// Sometimes, a "num" is provided in the URL. It is the number
// of the picture to show. This picture must be in the thumbnails page.
// We have to find the right $page['start'] that show the num picture
// in this category
if ( isset( $_GET['num'] )
     and is_numeric( $_GET['num'] )
     and $_GET['num'] >= 0 )
{
  $page['start'] = floor( $_GET['num'] / $user['nb_image_page'] );
  $page['start']*= $user['nb_image_page'];
}

initialize_category();

// creation of the array containing the cat ids to expand in the menu
// $page['tab_expand'] contains an array with the category ids
// $page['expand'] contains the string to display in URL with comma
$page['tab_expand'] = array();
if ( isset( $page['cat'] ) and is_numeric( $page['cat'] ) )
{
  // the category displayed (in the URL cat=23) must be seen in the menu ->
  // parent categories must be expanded
  $uppercats = explode( ',', $page['uppercats'] );
  foreach ( $uppercats as $uppercat ) {
    array_push( $page['tab_expand'], $uppercat );
  }
}
// in case of expanding all authorized cats $page['tab_expand'] is empty
if ( $user['expand'] )
{
  $page['tab_expand'] = array();
}
//----------------------------------------------------- template initialization
//
// Start output of page
//
$title = $page['title'];
include(PHPWG_ROOT_PATH.'include/page_header.php');

$template->set_filenames( array('category'=>'category.tpl') );
//-------------------------------------------------------------- category title
if (isset($page['cat']) and is_numeric($page['cat']))
{
  $template_title = get_cat_display_name($page['cat_name'],
                                         'category.php?cat=',
                                         false);
}
else
{
  $template_title = $page['title'];
}

if ( isset( $page['cat_nb_images'] ) and $page['cat_nb_images'] > 0 )
{
  $template_title.= ' ['.$page['cat_nb_images'].']';
}

$icon_recent = get_icon(date('Y-m-d'));

$template->assign_vars(array(
  'NB_PICTURE' => count_user_total_images(),
  'TITLE' => $template_title,
  'USERNAME' => $user['username'],
  'TOP_NUMBER'=>$conf['top_number'],
  'MENU_CATEGORIES_CONTENT'=>get_categories_menu(),

  'L_CATEGORIES' => $lang['categories'],
  'L_HINT_CATEGORY' => $lang['hint_category'],
  'L_SUBCAT' => $lang['sub-cat'],
  'L_IMG_AVAILABLE' => $lang['images_available'],
  'L_TOTAL' => $lang['total'],
  'L_SPECIAL_CATEGORIES' => $lang['special_categories'],
  'L_SUMMARY' => $lang['title_menu'],
  'L_UPLOAD' => $lang['upload_picture'],
  'L_COMMENT' => $lang['comments'],
  'L_IDENTIFY' => $lang['identification'],
  'L_SUBMIT' => $lang['menu_login'],
  'L_USERNAME' => $lang['login'],
  'L_PASSWORD' => $lang['password'],
  'L_HELLO' => $lang['hello'],
  'L_REGISTER' => $lang['ident_register'],
  'L_LOGIN' => $lang['menu_login'],
  'L_LOGOUT' => $lang['logout'],
  'L_ADMIN' => $lang['admin'],
  'L_ADMIN_HINT' => $lang['hint_admin'],
  'L_PROFILE' => $lang['customize'],
  'L_PROFILE_HINT' => $lang['hint_customize'],
  'L_REMEMBER_ME' => $lang['remember_me'],
  
  'F_IDENTIFY' => add_session_id( PHPWG_ROOT_PATH.'identification.php' ),
  'T_RECENT' => $icon_recent,

  'U_HOME' => add_session_id( PHPWG_ROOT_PATH.'category.php' ),
  'U_REGISTER' => add_session_id( PHPWG_ROOT_PATH.'register.php' ),
  'U_LOGOUT' => PHPWG_ROOT_PATH.'category.php?act=logout',
  'U_ADMIN'=>add_session_id( PHPWG_ROOT_PATH.'admin.php' ),
  'U_PROFILE'=>add_session_id(PHPWG_ROOT_PATH.'profile.php?'.str_replace( '&', '&amp;', $_SERVER['QUERY_STRING'] ))
  )
);
// BEGIN QLC MOD
//---------------------------------------------------------------------- Quick Language Changer
$available_lang = get_languages();

foreach ($available_lang as $code => $displayname)
{
  $template->assign_block_vars(
    'qlc',
    array(
      'URL' => PHPWG_ROOT_PATH.'category.php?lang='.$code,
      'ALT' => ucwords($displayname),
      'TITLE' => ucwords($displayname),
      'IMGURL' => $template->root.'/theme/'.$code.'.gif',
  ));
}
// END QLC MOD
//---------------------------------------------------------- special categories
// favorites categories
if ( !$user['is_the_guest'] )
{
  $template->assign_block_vars('username', array());

  $template->assign_block_vars(
    'special_cat',
    array(
      'URL' => add_session_id(PHPWG_ROOT_PATH.'category.php?cat=fav'),
      'TITLE' => $lang['favorite_cat_hint'],
      'NAME' => $lang['favorite_cat']
      ));
}
// most visited
$template->assign_block_vars(
  'special_cat',
  array(
    'URL' => add_session_id(PHPWG_ROOT_PATH.'category.php?cat=most_visited'),
    'TITLE' => $lang['most_visited_cat_hint'],
    'NAME' => $lang['most_visited_cat']
    ));
// best rated
if ($conf['rate'])
{
  $template->assign_block_vars(
    'special_cat',
    array(
      'URL' => add_session_id(PHPWG_ROOT_PATH.'category.php?cat=best_rated'),
      'TITLE' => $lang['best_rated_cat_hint'],
      'NAME' => $lang['best_rated_cat']
      ));
}
// random
$template->assign_block_vars(
  'special_cat',
  array(
    'URL' => add_session_id(PHPWG_ROOT_PATH.'random.php'),
    'TITLE' => $lang['random_cat_hint'],
    'NAME' => $lang['random_cat']
    ));
// recent pics
$template->assign_block_vars(
  'special_cat',
  array(
    'URL' => add_session_id(PHPWG_ROOT_PATH.'category.php?cat=recent_pics'),
    'TITLE' => $lang['recent_pics_cat_hint'],
    'NAME' => $lang['recent_pics_cat']
    ));
// recent cats
$template->assign_block_vars(
  'special_cat',
  array(
    'URL' => add_session_id(PHPWG_ROOT_PATH.'category.php?cat=recent_cats'),
    'TITLE' => $lang['recent_cats_cat_hint'],
    'NAME' => $lang['recent_cats_cat']
    ));
// calendar
$template->assign_block_vars(
  'special_cat',
  array(
    'URL' => add_session_id(PHPWG_ROOT_PATH.'category.php?cat=calendar'),
    'TITLE' => $lang['calendar_hint'],
    'NAME' => $lang['calendar']
    ));
//--------------------------------------------------------------------- summary

if ( !$user['is_the_guest'] )
{
  $template->assign_block_vars('logout',array());
  // administration link
  if ( $user['status'] == 'admin' )
  {
    $template->assign_block_vars('logout.admin', array());
  }
}
else
{
  $template->assign_block_vars('login',array());
  if ($conf['authorize_remembering'])
  {
    $template->assign_block_vars('login.remember_me',array());
  }
}

// search link
$template->assign_block_vars('summary', array(
'TITLE'=>$lang['hint_search'],
'NAME'=>$lang['search'],
'U_SUMMARY'=>add_session_id( 'search.php' ),
));

// comments link
$template->assign_block_vars('summary', array(
'TITLE'=>$lang['hint_comments'],
'NAME'=>$lang['comments'],
'U_SUMMARY'=>add_session_id( 'comments.php' ),
));

// about link
$template->assign_block_vars('summary', array(
'TITLE'=>$lang['hint_about'],
'NAME'=>$lang['about'],
'U_SUMMARY'=>add_session_id( 'about.php?'.str_replace( '&', '&amp;', $_SERVER['QUERY_STRING'] ) )
));

//------------------------------------------------------ main part : thumbnails
if (isset($page['cat'])
    and ((is_numeric($page['cat']) and $page['cat_nb_images'] != 0)
         or in_array($page['cat'],
                     array('search'
                           ,'most_visited'
                           ,'recent_pics'
                           ,'best_rated'
                           ,'list'
                           ,'fav'
                       ))))
{
  include(PHPWG_ROOT_PATH.'include/category_default.inc.php');
}
elseif (isset($page['cat']) and $page['cat'] == 'calendar')
{
  include(PHPWG_ROOT_PATH.'include/category_calendar.inc.php');
}
elseif (isset($page['cat']) and $page['cat'] == 'recent_cats')
{
  include(PHPWG_ROOT_PATH.'include/category_recent_cats.inc.php');
}
else
{
  include(PHPWG_ROOT_PATH.'include/category_subcats.inc.php');
}
//------------------------------------------------------- category informations
if ( isset ( $page['cat'] ) )
{
  // upload a picture in the category
  if (is_numeric($page['cat'])
      and $page['cat_site_id'] == 1
      and $page['cat_dir'] != ''
      and $page['cat_uploadable'])
  {
    $url = PHPWG_ROOT_PATH.'upload.php?cat='.$page['cat'];
    $template->assign_block_vars(
      'upload',
      array('U_UPLOAD'=>add_session_id( $url ))
      );
  }

  if ( $page['navigation_bar'] != ''
       or ( isset( $page['comment'] ) and $page['comment'] != '' ) )
  {
    $template->assign_block_vars('cat_infos',array());
  }
  
  // navigation bar
  if ( $page['navigation_bar'] != '' )
  { 
    $template->assign_block_vars(
      'cat_infos.navigation',
      array('NAV_BAR' => $page['navigation_bar'])
      );
  }
  // category comment
  if ( isset( $page['comment'] ) and $page['comment'] != '' )
  {
    $template->assign_block_vars(
      'cat_infos.comment',
      array('COMMENTS' => $page['comment'])
      );
  }
}
//------------------------------------------------------------ log informations
pwg_log( 'category', $page['title'] );
mysql_close();

$template->parse('category');
include(PHPWG_ROOT_PATH.'include/page_tail.php');
?>

Qu'est-ce que j'ai râté ? http://www.cichlids-reflex.com/category.php

Hors ligne

#2 2005-11-21 12:52:31

Reflex
Membre
2005-10-16
290

Re: [1.4.1] Problème de drapeaux...

C'est règlé pour le nombre de drapeaux, mais comment faire disparaitre cette bordure autour de ces derniers ?

Hors ligne

#3 2005-11-21 13:31:32

Reflex
Membre
2005-10-16
290

Re: [1.4.1] Problème de drapeaux...

C'est bon, j'ai "trouvé".

Hors ligne

  •  » Utilisation
  •  » [1.4.1] Problème de drapeaux...

Pied de page des forums

Propulsé par FluxBB

github twitter facebook newsletter Faire un don Piwigo.org © 2002-2019 · Contact