Changeset 1991


Ignore:
Timestamp:
Apr 29, 2007, 9:04:57 PM (17 years ago)
Author:
vdigital
Message:

Bug 0000684: History [Search] - Add a thumbnail display.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/history.php

    r1932 r1991  
    414414    IF(name IS NULL, file, name) AS label,
    415415    filesize,
    416     high_filesize
     416    high_filesize,
     417    file,
     418    path,
     419    tn_ext
    417420  FROM '.IMAGES_TABLE.'
    418421  WHERE id IN ('.implode(',', array_keys($image_ids)).')
     
    422425    $filesize_of_image = array();
    423426    $high_filesize_of_image = array();
    424    
     427    $file_of_image = array();
     428    $path_of_image = array();
     429    $tn_ext_of_image = array();
     430
    425431    $result = pwg_query($query);
    426432    while ($row = mysql_fetch_array($result))
     
    437443        $high_filesize_of_image[ $row['id'] ] = $row['high_filesize'];
    438444      }
     445
     446      $file_of_image[ $row['id'] ] = $row['file'];
     447      $path_of_image[ $row['id'] ] = $row['path'];
     448      $tn_ext_of_image[ $row['id'] ] = $row['tn_ext'];
    439449    }
    440450
     
    552562        );
    553563     
    554       $image_string = '<a href="'.$picture_url.'">';
    555       $image_string.= '('.$line['image_id'].')';
    556 
     564      // <a class="thumbnail" href="#thumb">(1258)<span><img src="./galleries/category/thumbnail/th-dsc1258.png"></span></a>
     565      $element = array(
     566           'id' => $line['image_id'],
     567           'file' => $file_of_image[$line['image_id']],
     568           'path' => $path_of_image[$line['image_id']],
     569           'tn_ext' => $tn_ext_of_image[$line['image_id']],
     570           );
     571      $image_string = '';   
     572      if (!isset($conf['history_no_thumb']) or $conf['history_no_thumb']) {
     573        $thumb_mode = "over";
     574        if (isset($conf['history_no_hover']) and $conf['history_no_hover']) {
     575          $thumb_mode = "thumbnail";
     576        }
     577        $image_string = '<a class="'.$thumb_mode.'" href="#thumb">'   
     578                      .'('.$line['image_id'].') <span><img src="'
     579                      . get_thumbnail_url( $element )
     580                      .'"></span></a><a href="'.$picture_url.'">';
     581      }
     582      else {
     583        $image_string= '<a href="'.$picture_url.'">';
     584        $image_string.= '('.$line['image_id'].')';
     585      }
     586     
    557587      if (isset($label_of_image[$line['image_id']]))
    558588      {
  • trunk/template/yoga/admin/default-layout.css

    r1920 r1991  
    204204  padding: 5px 2em 2px 2em;
    205205}
     206
     207.over{
     208position: relative;
     209z-index: 0;
     210}
     211
     212.over:hover{
     213background-color: transparent;
     214z-index: 50;
     215}
     216
     217.over span{ /*CSS for enlarged image*/
     218position: absolute;
     219background-color: #eee;
     220padding: 5px;
     221left: -1000px;
     222border: 1px solid #69c;
     223visibility: hidden;
     224color: black;
     225text-decoration: none;
     226}
     227
     228.over span img{ /*CSS for enlarged image*/
     229border-width: 0;
     230padding: 2px;
     231}
     232
     233.over:hover span{ /*CSS for enlarged image on hover*/
     234visibility: visible;
     235top: 0;
     236left: 60px; /*position where enlarged image should offset horizontally */
     237}
Note: See TracChangeset for help on using the changeset viewer.