Annonce

#76 2007-07-12 00:04:53

rub
Former Piwigo Team
Lille
2005-08-26
5239

Re: Historique - Affichage des images

P@t a écrit:

PS: moi aussi je veux voir la galerie démo de rub!

C'est simple, tu t'inscris sur le site et je te mets admin/adviser!

Hors ligne

#77 2007-07-12 00:07:13

rub
Former Piwigo Team
Lille
2005-08-26
5239

Re: Historique - Affichage des images

P@t a écrit:

Tu veux un plugin avec le code de vincent, ou un plugin comme le MOD de Iterras (au survol de la souris)?

P@t ou les autres, si vous faites ce plugin et vu que ca va être dans la 1.8, je vous propose de ne pas mettre le plugin dans les extensions mais la partie personnalisation de la 1.7 (en personal plugin)

Hors ligne

#78 2007-07-12 08:24:15

sakkhho
Membre
Paris
2007-04-02
1836

Re: Historique - Affichage des images

P@t a écrit:

Tu veux un plugin avec le code de vincent, ou un plugin comme le MOD de Iterras (au survol de la souris)?

désolé j'etais pas tres clair.
Dans ma 1.6.2, j'ai mis le mod de laurence --> cqfd miniature ds l'historique au survol.
j'aimerai le reproduire sur la 1.7.
Sur 1.8 c'est pas defaut mais bon... trop loin la 1.8 :-))

++


Piwigo 2.3.5

Hors ligne

#79 2007-07-12 08:35:43

rub
Former Piwigo Team
Lille
2005-08-26
5239

Re: Historique - Affichage des images

Pour la 1.7:
admin\history.php

Code:

<?php
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery                           |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | file          : $Id: history.php 1932 2007-03-29 19:04:54Z rub $
// | last update   : $Date: 2007-03-29 21:04:54 +0200 (jeu., 29 mars 2007) $
// | last modifier : $Author: rub $
// | revision      : $Revision: 1932 $
// +-----------------------------------------------------------------------+
// | 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.                                                                  |
// +-----------------------------------------------------------------------+

/**
 * Display filtered history lines
 */

// echo '<pre>$_POST:
// '; print_r($_POST); echo '</pre>';
// echo '<pre>$_GET:
// '; print_r($_GET); echo '</pre>';

// +-----------------------------------------------------------------------+
// |                              functions                                |
// +-----------------------------------------------------------------------+

// +-----------------------------------------------------------------------+
// |                           initialization                              |
// +-----------------------------------------------------------------------+

if (!defined('PHPWG_ROOT_PATH'))
{
  die('Hacking attempt!');
}

include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
include_once(PHPWG_ROOT_PATH.'admin/include/functions_history.inc.php');

if (isset($_GET['start']) and is_numeric($_GET['start']))
{
  $page['start'] = $_GET['start'];
}
else
{
  $page['start'] = 0;
}

$types = array('none', 'picture', 'high', 'other');

// +-----------------------------------------------------------------------+
// | Check Access and exit when user status is not ok                      |
// +-----------------------------------------------------------------------+

check_status(ACCESS_ADMINISTRATOR);

// +-----------------------------------------------------------------------+
// | Build search criteria and redirect to results                         |
// +-----------------------------------------------------------------------+

$page['errors'] = array();
$search = array();

if (isset($_POST['submit']))
{
  // dates
  if (!empty($_POST['start_year']))
  {
    $search['fields']['date-after'] = sprintf(
      '%d-%02d-%02d',
      $_POST['start_year'],
      $_POST['start_month'],
      $_POST['start_day']
      );
  }

  if (!empty($_POST['end_year']))
  {
    $search['fields']['date-before'] = sprintf(
      '%d-%02d-%02d',
      $_POST['end_year'],
      $_POST['end_month'],
      $_POST['end_day']
      );
  }

  $search['fields']['types'] = $_POST['types'];

  $search['fields']['user'] = $_POST['user'];

  if (!empty($_POST['image_id']))
  {
    $search['fields']['image_id'] = intval($_POST['image_id']);
  }
  
  if (!empty($_POST['filename']))
  {
    $search['fields']['filename'] = str_replace(
      '*',
      '%',
      mysql_escape_string($_POST['filename'])
      );
  }

  // TODO manage inconsistency of having $_POST['image_id'] and
  // $_POST['filename'] simultaneously
  
  // echo '<pre>'; print_r($search); echo '</pre>';
  
  if (!empty($search))
  {
    // register search rules in database, then they will be available on
    // thumbnails page and picture page.
    $query ='
INSERT INTO '.SEARCH_TABLE.'
  (rules)
  VALUES
  (\''.serialize($search).'\')
;';
    pwg_query($query);

    $search_id = mysql_insert_id();
    
    redirect(
      PHPWG_ROOT_PATH.'admin.php?page=history&search_id='.$search_id
      );
  }
  else
  {
    array_push($page['errors'], $lang['search_one_clause_at_least']);
  }
}

// +-----------------------------------------------------------------------+
// |                             template init                             |
// +-----------------------------------------------------------------------+

$template->set_filename('history', 'admin/history.tpl');

// TabSheet initialization
history_tabsheet();

$base_url = PHPWG_ROOT_PATH.'admin.php?page=history';

$template->assign_vars(
  array(
    'U_HELP' => PHPWG_ROOT_PATH.'popuphelp.php?page=history',

    'F_ACTION' => PHPWG_ROOT_PATH.'admin.php?page=history'
    )
  );

$template->assign_vars(
  array(
    'TODAY_DAY'   => date('d', time()),
    'TODAY_MONTH' => date('m', time()),
    'TODAY_YEAR'  => date('Y', time()),
    )
  );

// +-----------------------------------------------------------------------+
// |                             history lines                             |
// +-----------------------------------------------------------------------+

if (isset($_GET['search_id'])
    and $page['search_id'] = (int)$_GET['search_id'])
{
  // what are the lines to display in reality ?
  $query = '
SELECT rules
  FROM '.SEARCH_TABLE.'
  WHERE id = '.$page['search_id'].'
;';
  list($serialized_rules) = mysql_fetch_row(pwg_query($query));

  $page['search'] = unserialize($serialized_rules);

  if (isset($_GET['user_id']))
  {
    if (!is_numeric($_GET['user_id']))
    {
      die('user_id GET parameter must be an integer value');
    }

    $page['search']['fields']['user'] = $_GET['user_id'];
    
    $query ='
INSERT INTO '.SEARCH_TABLE.'
  (rules)
  VALUES
  (\''.serialize($page['search']).'\')
;';
    pwg_query($query);

    $search_id = mysql_insert_id();
    
    redirect(
      PHPWG_ROOT_PATH.'admin.php?page=history&search_id='.$search_id
      );
  }

  
  if (isset($page['search']['fields']['filename']))
  {
    $query = '
SELECT
    id
  FROM '.IMAGES_TABLE.'
  WHERE file LIKE \''.$page['search']['fields']['filename'].'\'
;';
    $page['search']['image_ids'] = array_from_query($query, 'id');
  }
  
  // echo '<pre>'; print_r($page['search']); echo '</pre>';
  
  $clauses = array();

  if (isset($page['search']['fields']['date-after']))
  {
    array_push(
      $clauses,
      "date >= '".$page['search']['fields']['date-after']."'"
      );
  }

  if (isset($page['search']['fields']['date-before']))
  {
    array_push(
      $clauses,
      "date <= '".$page['search']['fields']['date-before']."'"
      );
  }

  if (isset($page['search']['fields']['types']))
  {
    $local_clauses = array();
    
    foreach ($types as $type) {
      if (in_array($type, $page['search']['fields']['types'])) {
        $clause = 'image_type ';
        if ($type == 'none')
        {
          $clause.= 'IS NULL';
        }
        else
        {
          $clause.= "= '".$type."'";
        }
        
        array_push($local_clauses, $clause);
      }
    }
    
    if (count($local_clauses) > 0)
    {
      array_push(
        $clauses,
        implode(' OR ', $local_clauses)
        );
    }
  }

  if (isset($page['search']['fields']['user'])
      and $page['search']['fields']['user'] != -1)
  {
    array_push(
      $clauses,
      'user_id = '.$page['search']['fields']['user']
      );
  }

  if (isset($page['search']['fields']['image_id']))
  {
    array_push(
      $clauses,
      'image_id = '.$page['search']['fields']['image_id']
      );
  }
  
  if (isset($page['search']['fields']['filename']))
  {
    if (count($page['search']['image_ids']) == 0)
    {
      // a clause that is always false
      array_push($clauses, '1 = 2 ');
    }
    else
    {
      array_push(
        $clauses,
        'image_id IN ('.implode(', ', $page['search']['image_ids']).')'
        );
    }
  }
  
  $clauses = prepend_append_array_items($clauses, '(', ')');

  $where_separator =
    implode(
      "\n    AND ",
      $clauses
      );
  
  $query = '
SELECT
    date,
    time,
    user_id,
    IP,
    section,
    category_id,
    tag_ids,
    image_id,
    image_type
  FROM '.HISTORY_TABLE.'
  WHERE '.$where_separator.'
;';

  // LIMIT '.$page['start'].', '.$conf['nb_logs_page'].'

  $result = pwg_query($query);

  $page['nb_lines'] = mysql_num_rows($result);
  
  $history_lines = array();
  $user_ids = array();
  $username_of = array();
  $category_ids = array();
  $image_ids = array();
  $tag_ids = array();
  
  while ($row = mysql_fetch_assoc($result))
  {
    $user_ids[$row['user_id']] = 1;

    if (isset($row['category_id']))
    {
      $category_ids[$row['category_id']] = 1;
    }

    if (isset($row['image_id']))
    {
      $image_ids[$row['image_id']] = 1;
    }

    if (isset($row['tag_ids']))
    {
      foreach (explode(',', $row['tag_ids']) as $tag_id)
      {
        array_push($tag_ids, $tag_id);
      }
    }

    array_push(
      $history_lines,
      $row
      );
  }

  // prepare reference data (users, tags, categories...)
  if (count($user_ids) > 0)
  {
    $query = '
SELECT '.$conf['user_fields']['id'].' AS id
     , '.$conf['user_fields']['username'].' AS username
  FROM '.USERS_TABLE.'
  WHERE id IN ('.implode(',', array_keys($user_ids)).')
;';
    $result = pwg_query($query);

    $username_of = array();
    while ($row = mysql_fetch_array($result))
    {
      $username_of[$row['id']] = $row['username'];
    }
  }

  if (count($category_ids) > 0)
  {
    $query = '
SELECT id, uppercats
  FROM '.CATEGORIES_TABLE.'
  WHERE id IN ('.implode(',', array_keys($category_ids)).')
;';
    $uppercats_of = simple_hash_from_query($query, 'id', 'uppercats');

    $name_of_category = array();
    
    foreach ($uppercats_of as $category_id => $uppercats)
    {
      $name_of_category[$category_id] = get_cat_display_name_cache(
        $uppercats
        );
    }
  }

  if (count($image_ids) > 0)
  {
    $query = '
SELECT
    id,
    IF(name IS NULL, file, name) AS label,
    filesize,
    high_filesize,
    file,
    path,
    tn_ext
  FROM '.IMAGES_TABLE.'
  WHERE id IN ('.implode(',', array_keys($image_ids)).')
;';
    // $label_of_image = simple_hash_from_query($query, 'id', 'label');
    $label_of_image = array();
    $filesize_of_image = array();
    $high_filesize_of_image = array();
    $file_of_image = array();
    $path_of_image = array();
    $tn_ext_of_image = array();

    $result = pwg_query($query);
    while ($row = mysql_fetch_array($result))
    {
      $label_of_image[ $row['id'] ] = $row['label'];

      if (isset($row['filesize']))
      {
        $filesize_of_image[ $row['id'] ] = $row['filesize'];
      }

      if (isset($row['high_filesize']))
      {
        $high_filesize_of_image[ $row['id'] ] = $row['high_filesize'];
      }

      $file_of_image[ $row['id'] ] = $row['file'];
      $path_of_image[ $row['id'] ] = $row['path'];
      $tn_ext_of_image[ $row['id'] ] = $row['tn_ext'];
    }

    // echo '<pre>'; print_r($high_filesize_of_image); echo '</pre>';
  }

  if (count($tag_ids) > 0)
  {
    $tag_ids = array_unique($tag_ids);

    $query = '
SELECT
    id,
    name
  FROM '.TAGS_TABLE.'
  WHERE id IN ('.implode(', ', $tag_ids).')
;';
    $name_of_tag = array();

    $result = pwg_query($query);
    while ($row = mysql_fetch_array($result))
    {
      $name_of_tag[ $row['id'] ] = $row['name'];
    }
  }
  
  $i = 0;
  $first_line = $page['start'] + 1;
  $last_line = $page['start'] + $conf['nb_logs_page'];

  $summary['total_filesize'] = 0;
  $summary['guests_IP'] = array();

  foreach ($history_lines as $line)
  {
    // FIXME when we watch the representative of a non image element, it is
    // the not the representative filesize that is counted (as it is
    // unknown) but the non image element filesize. Proposed solution: add
    // #images.representative_filesize and add 'representative' in the
    // choices of #history.image_type.
    
    if (isset($line['image_type']))
    {
      if ($line['image_type'] == 'high')
      {
        if (isset($high_filesize_of_image[$line['image_id']]))
        {
          $summary['total_filesize']+=
            $high_filesize_of_image[$line['image_id']];
        }
      }
      else
      {
        if (isset($filesize_of_image[$line['image_id']]))
        {
          $summary['total_filesize']+=
            $filesize_of_image[$line['image_id']];
        }
      }
    }

    if ($line['user_id'] == $conf['guest_id'])
    {
      if (!isset($summary['guests_IP'][ $line['IP'] ]))
      {
        $summary['guests_IP'][ $line['IP'] ] = 0;
      }
      
      $summary['guests_IP'][ $line['IP'] ]++;
    }
    
    $i++;
    
    if ($i < $first_line or $i > $last_line)
    {
      continue;
    }

    $user_string = '';
    if (isset($username_of[$line['user_id']]))
    {
      $user_string.= $username_of[$line['user_id']];
    }
    else
    {
      $user_string.= $line['user_id'];
    }
    $user_string.= '&nbsp;<a href="';
    $user_string.= PHPWG_ROOT_PATH.'admin.php?page=history';
    $user_string.= '&amp;search_id='.$page['search_id'];
    $user_string.= '&amp;user_id='.$line['user_id'];
    $user_string.= '">+</a>';

    $tags_string = '';
    if (isset($line['tag_ids']))
    {
      $tags_string = preg_replace(
        '/(\d+)/e',
        '$name_of_tag["$1"]',
        str_replace(
          ',',
          ', ',
          $line['tag_ids']
          )
        );
    }

    $image_string = '';
    if (isset($line['image_id']))
    {
      $picture_url = make_picture_url(
        array(
          'image_id' => $line['image_id'],
          )
        );
      
      // <a class="thumbnail" href="#thumb">(1258)<span><img src="./galleries/category/thumbnail/th-dsc1258.png"></span></a>
      $element = array(
           'id' => $line['image_id'],
           'file' => $file_of_image[$line['image_id']],
           'path' => $path_of_image[$line['image_id']],
           'tn_ext' => $tn_ext_of_image[$line['image_id']],
           );
      $image_string = '';    
/*      if (!isset($conf['history_no_thumb']) or $conf['history_no_thumb']) {
        $thumb_mode = "over";
        if (isset($conf['history_no_hover']) and $conf['history_no_hover']) {
          $thumb_mode = "thumbnail";
        }*/
        $thumb_mode = "thumbnail";
        $image_string = '<a class="'.$thumb_mode.'" href="#thumb">'    
                      .'('.$line['image_id'].') <span><img src="'
                      . get_thumbnail_url( $element ) 
                      .'"></span></a><a href="'.$picture_url.'">';
/*      }
      else {
        $image_string= '<a href="'.$picture_url.'">';
        $image_string.= '('.$line['image_id'].')';
      }*/
      
      if (isset($label_of_image[$line['image_id']]))
      {
        $image_string.= ' '.$label_of_image[$line['image_id']];
      }
      else
      {
        $image_string.= ' unknown filename';
      }
    }
    
    $template->assign_block_vars(
      'detail',
      array(
        'DATE'      => $line['date'],
        'TIME'      => $line['time'],
        'USER'      => $user_string,
        'IP'        => $line['IP'],
        'IMAGE'     => $image_string,
        'TYPE'      => $line['image_type'],
        'SECTION'   => $line['section'],
        'CATEGORY'  => isset($line['category_id'])
          ? ( isset($name_of_category[$line['category_id']])
                ? $name_of_category[$line['category_id']]
                : 'deleted '.$line['category_id'] )
          : '',
        'TAGS'       => $tags_string,
        'T_CLASS'   => ($i % 2) ? 'row1' : 'row2',
        )
      );
  }

  $summary['nb_guests'] = 0;
  if (count(array_keys($summary['guests_IP'])) > 0)
  {
    $summary['nb_guests'] = count(array_keys($summary['guests_IP']));

    // we delete the "guest" from the $username_of hash so that it is
    // avoided in next steps
    unset($username_of[ $conf['guest_id'] ]);
  }
  
  $summary['nb_members'] = count($username_of);

  $member_strings = array();
  foreach ($username_of as $user_id => $user_name)
  {
    $member_string = $user_name.'&nbsp;<a href="';
    $member_string.= PHPWG_ROOT_PATH.'admin.php?page=history';
    $member_string.= '&amp;search_id='.$page['search_id'];
    $member_string.= '&amp;user_id='.$user_id;
    $member_string.= '">+</a>';

    $member_strings[] = $member_string;
  }
  
  $template->assign_block_vars(
    'summary',
    array(
      'NB_LINES' => l10n_dec(
        '%d line filtered', '%d lines filtered',
        $page['nb_lines']
        ),
      'FILESIZE' => $summary['total_filesize'].' KB',
      'USERS' => l10n_dec(
        '%d user', '%d users',
        $summary['nb_members'] + $summary['nb_guests']
        ),
      'MEMBERS' => sprintf(
        l10n_dec('%d member', '%d members', $summary['nb_members']).': %s',
        implode(
          ', ',
          $member_strings
          )
        ),
      'GUESTS' => l10n_dec(
        '%d guest', '%d guests',
        $summary['nb_guests']
        ),
      )
    );
}

// +-----------------------------------------------------------------------+
// |                            navigation bar                             |
// +-----------------------------------------------------------------------+

if (isset($page['search_id']))
{
  $navbar = create_navigation_bar(
    PHPWG_ROOT_PATH.'admin.php'.get_query_string_diff(array('start')),
    $page['nb_lines'],
    $page['start'],
    $conf['nb_logs_page']
    );

  $template->assign_block_vars(
    'navigation',
    array(
      'NAVBAR' => $navbar
      )
    );
}

// +-----------------------------------------------------------------------+
// |                             filter form                               |
// +-----------------------------------------------------------------------+

$form = array();

if (isset($page['search']))
{
  if (isset($page['search']['fields']['date-after']))
  {
    $tokens = explode('-', $page['search']['fields']['date-after']);
    
    $form['start_year']  = (int)$tokens[0];
    $form['start_month'] = (int)$tokens[1];
    $form['start_day']   = (int)$tokens[2];
  }

  if (isset($page['search']['fields']['date-before']))
  {
    $tokens = explode('-', $page['search']['fields']['date-before']);

    $form['end_year']  = (int)$tokens[0];
    $form['end_month'] = (int)$tokens[1];
    $form['end_day']   = (int)$tokens[2];
  }

  $form['types'] = $page['search']['fields']['types'];

  if (isset($page['search']['fields']['user']))
  {
    $form['user'] = $page['search']['fields']['user'];
  }
  else
  {
    $form['user'] = null;
  }

  $form['image_id'] = @$page['search']['fields']['image_id'];
  $form['filename'] = @$page['search']['fields']['filename'];
}
else
{
  // by default, at page load, we want the selected date to be the current
  // date
  $form['start_year']  = $form['end_year']  = date('Y');
  $form['start_month'] = $form['end_month'] = date('n');
  $form['start_day']   = $form['end_day']   = date('j');
  $form['types'] = $types;
}

// start date
get_day_list('start_day', @$form['start_day']);
get_month_list('start_month', @$form['start_month']);
// end date
get_day_list('end_day', @$form['end_day']);
get_month_list('end_month', @$form['end_month']);

$template->assign_vars(
  array(
    'START_YEAR' => @$form['start_year'],
    'END_YEAR'   => @$form['end_year'],
    'IMAGE_ID' => @$form['image_id'],
    'FILENAME' => @$form['filename'],
    )
  );

foreach ($types as $option)
{
  $selected = '';
  
  if (in_array($option, $form['types']))
  {
    $selected = 'selected="selected"';
  }
  
  $template->assign_block_vars(
    'types_option',
    array(
      'VALUE' => $option,
      'CONTENT' => l10n($option),
      'SELECTED' => $selected,
      )
    );
}

$template->assign_block_vars(
  'user_option',
  array(
    'VALUE'=> -1,
    'CONTENT' => '------------',
    'SELECTED' => ''
    )
  );

$query = '
SELECT
    '.$conf['user_fields']['id'].' AS id,
    '.$conf['user_fields']['username'].' AS username
  FROM '.USERS_TABLE.'
  ORDER BY username ASC
;';
$result = pwg_query($query);

while ($row = mysql_fetch_array($result))
{
  $selected = '';

  if (isset($form['user'])
      and $row['id'] == $form['user'])
  {
    $selected = 'selected="selected"';
  }
  
  $template->assign_block_vars(
    'user_option',
    array(
      'VALUE' => $row['id'],
      'CONTENT' => $row['username'],
      'SELECTED' => $selected,
      )
    );
}
  
// +-----------------------------------------------------------------------+
// |                           html code display                           |
// +-----------------------------------------------------------------------+

$template->assign_var_from_handle('ADMIN_CONTENT', 'history');
?>

template\yoga\admin\default-layout.css

Code:

/* $Id: */
BODY#theAdminPage #theHeader P {
  display: none;
}

/* History tables */
TABLE.table2 {
  border: 1px solid black;
  margin: 1em auto;
  padding: 0;
}

TABLE.table2 TD, TABLE.table2 TH {
  padding: 0 1em;
}

TABLE.table2 TR {
  text-align: left;
}

TABLE.table2 TR.throw {
  text-align: center;
}

.hour {
  white-space: pre;
}

.number {
  text-align: right;
}

TABLE#dailyStats {
  width: 60%;
}

TABLE#detailedStats {
  width: 99%;
}

/* categoryOrdering */
SELECT.categoryList {
  width: 100%;
}

FORM#categoryOrdering {
  padding-left: 1em; /* same as FIELDSET margin (there is no fieldset in this form) */
  padding-right: 1em; /* same as FIELDSET margin (there is no fieldset in this form) */
}
FORM#categoryOrdering p {
  text-align: left;
  margin-top: 1em;
  margin-bottom: 1em;
}
UL.categoryUl {
  list-style: none;
  padding: 0;
  margin: 0;
}

LI.categoryLi {
  border: 1px solid gray;
  padding: 0px 5px;
  margin-bottom: 5px;
}

FORM#categoryOrdering UL.categoryActions {
  float: right;
  margin-top: 5px;
}
/* */

FORM#catModify TABLE { width: auto; }

FIELDSET.elementEdit A {
  display: block;
  float: right;
}

TABLE.doubleSelect {
  text-align: center;
  margin: 0 auto;
  width: 100%;
}

TABLE.doubleSelect TD {
  padding: 0 5px;
  width: 50%;
}

TABLE.doubleSelect SELECT.categoryList {
  width: 100%;
}

FORM#categoryPermissions LI {
  display:inline;
  white-space: nowrap;
}

FIELDSET#mainConfCheck SPAN.property,
FIELDSET#historyConf SPAN.property,
FIELDSET#commentsConf SPAN.property {
  float: right;
  text-align: left;
}
FIELDSET#mainConfCheck INPUT,
FIELDSET#historyConf INPUT,
FIELDSET#commentsConf INPUT {
  float: none;
}

FIELDSET#mainConf SPAN.property {
  width: 25%;
}
FIELDSET#mainConf TEXTAREA.description {
  width: 70%;
}

FIELDSET#mainConfCheck SPAN.property,
FIELDSET#historyConf SPAN.property {
  width: 90%;
}
FIELDSET#mainConfCheck INPUT,
FIELDSET#historyConf INPUT {
  margin-left: 5%;
}

FIELDSET#commentsConf SPAN.property {
  width: 85%;
}
FIELDSET#commentsConf INPUT {
  margin-left: 5%;
}

/* PWG Links Menu is fixed Graphic charts */
.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 1px auto;
  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 */


.statBar {
  height: 10px;
  background-color: #66f;
  border: 1px solid black;
}

/* Tabsheet */
ul.tabsheet {
  display: table;
  list-style-type: none;
  list-style-image: none; /* for firefox */
  white-space: nowrap; 
  margin-left: auto; margin-right: auto;
  text-decoration : none;
  background: transparent;
  border-bottom: 1px solid #fff;
}

ul.tabsheet li {
  float: left;
  text-align: center;
  margin: 0 6px;
  color: white;
  font-size: 110%;
  font-weight: bold;
  padding: 4px 8px;
  border: 1px solid #fff;
  border-radius: 6px 6px 0px 0px; /* round corners with CSS3 compliant browsers */
  padding: 5px 2em 2px 2em;
}

.over{
position: relative;
z-index: 0;
}

.over:hover{
background-color: transparent;
z-index: 50;
}

.over span{ /*CSS for enlarged image*/
position: absolute;
background-color: #eee;
padding: 5px;
left: -1000px;
border: 1px solid #69c;
visibility: hidden;
color: black;
text-decoration: none;
}

.over span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}

.over:hover span{ /*CSS for enlarged image on hover*/
visibility: visible;
top: 0;
left: 60px; /*position where enlarged image should offset horizontally */
}

Hors ligne

#80 2007-07-12 08:45:12

sakkhho
Membre
Paris
2007-04-02
1836

Re: Historique - Affichage des images

merci rub, je verrai la modif ce soir !
cool !


Piwigo 2.3.5

Hors ligne

#81 2007-07-12 10:02:58

Nicco
Membre
Paris - Val de Marne
2006-05-12
1794

Re: Historique - Affichage des images

Merci Rub c est vraiment sympa ....

et dans la 1.8 ca sera en survol ou une option a activer ?


Nicco Starrrr ..... voici ma galerie http://gallery-nicco.no-ip.org & ma passion http://bd-nicco.no-ip.org
version PWG 1.7.1 + de nombreux plugins actifs (trop pour les énumérer)

Hors ligne

#82 2007-07-12 10:12:50

sakkhho
Membre
Paris
2007-04-02
1836

Re: Historique - Affichage des images

d'apres la galerie de rub (qui doit etre une 1.8)
tu as le choix entre :
1/ rien ne s'affiche (comme une 1.7 maintenant)
2/ au survol
3/ la minaiture s'affiche automatiquement en petit. perso j'adore !


Piwigo 2.3.5

Hors ligne

#83 2007-07-12 10:17:07

rub
Former Piwigo Team
Lille
2005-08-26
5239

Re: Historique - Affichage des images

sakkhho a écrit:

merci rub, je verrai la modif ce soir !
cool !

Nicco a écrit:

Merci Rub c est vraiment sympa ....

Pour info, c'est les sources de ce que j'ai mis sur mon site.
Ca affiche les images dans l'historique à chaqua fois.

Nicco a écrit:

et dans la 1.8 ca sera en survol ou une option a activer ?

En 1.8, 3 choix (tout le temps, en survol ou pas d'affichage).
C'est une option sauvegardé en cookie.

Hors ligne

#84 2007-07-12 10:17:10

VDigital
Former Piwigo Team
Montpellier (FR)
2005-05-04
15127

Re: Historique - Affichage des images

La galerie de Démo de Rub: C'est la galerie version développement sans (au pire) les deux ou trois dernières modifs.
8-)


Vincent -« Plus vidéaste averti que photographe amateur... »
La galerie - Le blog   

Piwigo est une application libre de gestion de photos en ligne.

Hors ligne

#85 2007-07-13 18:17:39

sakkhho
Membre
Paris
2007-04-02
1836

Re: Historique - Affichage des images

Rub est ce que c'est possible d'avoir la miniature en plus petit que la taille relle ?
parce que avec mes 200*150 .... enfin tu comprends !
je voudrai vraiment un truc petit style -50%... en + c'est la periode !

Dernière modification par sakkhho (2007-07-13 18:19:15)


Piwigo 2.3.5

Hors ligne

#86 2007-07-13 18:24:03

vimages
Membre
2004-03-27
2429

Re: Historique - Affichage des images

glop glop !

c'est vrai qu'un passage de sourie sur le nom du fichier qui ferait s'afficher une miniature à 50%.... 

encore un petit + agréable.. :o)


amicalement,
éric.

Hors ligne

#87 2007-07-13 18:32:35

sakkhho
Membre
Paris
2007-04-02
1836

Re: Historique - Affichage des images

non non avec le code plus haut, la miniature s'affiche tt le tps pas au survol.
moi perso je prefere mais à 100 % c'est trop gros


Piwigo 2.3.5

Hors ligne

#88 2007-07-13 18:58:26

rub
Former Piwigo Team
Lille
2005-08-26
5239

Re: Historique - Affichage des images

Il vous suffira de faire un local-layout.css ou un petit plugin pour afficher la taille voulu!
Ca vous convient?

Hors ligne

#89 2007-07-14 09:23:55

sakkhho
Membre
Paris
2007-04-02
1836

Re: Historique - Affichage des images

heu oui bien sur..
mais comment qu'on fait ? t'aurais pas un ptit bout de code en solde ? :-)


Piwigo 2.3.5

Hors ligne

#90 2007-07-14 12:00:41

rub
Former Piwigo Team
Lille
2005-08-26
5239

Re: Historique - Affichage des images

Des que j'ai le temps ;-)

Mais tu peux rajouter la taille (width & heigth)  dans ce bout de css (livré dans mon exemple):

Code:

.over span img{ /*CSS for enlarged image*/
border-width: 0;
padding: 2px;
}

Hors ligne

Pied de page des forums

Propulsé par FluxBB

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