Changeset 12857


Ignore:
Timestamp:
Jan 6, 2012, 4:39:54 PM (9 years ago)
Author:
patdenice
Message:

Bug corrected with special images (like 3d pictures).
Work with question mark in urls = false.

Location:
extensions/GThumb
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/GThumb/js/gthumb.js

    r12710 r12857  
    11var GThumb = {
    22
     3  root: './',
    34  max_height: 200,
    45  margin: 10,
     
    4445    GThumb.queue.add({
    4546      type: 'GET',
    46       url: 'ws.php',
     47      url: GThumb.root+'ws.php',
    4748      data: {
    4849        method: 'pwg.images.getGThumbPlusThumbnail',
     
    5354      success: function(data) {
    5455        if (data.stat == 'ok') {
    55           jQuery('#gt'+data.result.id).prop('src', data.result.src).show();
     56          jQuery('#gt'+data.result.id).prop('src', GThumb.root+data.result.src).show();
    5657        } else if (loop < 4) {
    5758          GThumb.addToQueue(id, ++loop);
  • extensions/GThumb/main.inc.php

    r12758 r12857  
    9494        include_once(GTHUMB_PATH.'functions.inc.php');
    9595        $result = make_gthumb_image($pictures[0], $data);
    96         $big_thumb['src'] = $result['destination'];
     96        $big_thumb['src'] = embellish_url(get_root_url().$result['destination']);
    9797      }
    9898      else
    9999      {
    100         $big_thumb['src'] = 'ws.php?method=pwg.images.getGThumbPlusThumbnail&image_id='.$ft['ID'].'&size=big&return=true';
     100        $big_thumb['src'] = get_root_url().'ws.php?method=pwg.images.getGThumbPlusThumbnail&image_id='.$ft['ID'].'&size=big&return=true';
    101101      }
    102102    }
     
    137137  global $conf;
    138138
    139   if (!in_array(get_extension($picture['path']), $conf['picture_ext']))
    140   {
    141     $file = get_thumbnail_url($picture);
    142     list($width, $height) = getimagesize($file);
     139  $picture_ext = array('jpg', 'jpeg', 'png', 'gif');
     140
     141  if (!in_array(strtolower(get_extension($picture['path'])), $picture_ext))
     142  {
     143    list($width, $height) = getimagesize(get_thumbnail_path($picture));
    143144
    144145    return array(
    145       'src' => $file,
     146      'src' => get_thumbnail_url($picture),
    146147      'width' => $width,
    147148      'height' => $height,
     
    157158
    158159    return array(
    159       'src' => $file,
     160      'src' => embellish_url(get_root_url().$file),
    160161      'width' => $width,
    161162      'height' => $height,
  • extensions/GThumb/template/admin.tpl

    r12759 r12857  
    6060  {'Generating cache, please wait...'|@translate}<br>
    6161  <div id="progressbar"></div>
    62   <p><button onclick="GThumb.abort();">{'Cacncel'|@translate}</button></p>
     62  <p><button onclick="GThumb.abort();">{'Cancel'|@translate}</button></p>
    6363</div>
    6464</fieldset>
  • extensions/GThumb/template/gthumb.tpl

    r12712 r12857  
    1515
    1616{footer_script require="gthumb"}
     17GThumb.root = '{$ROOT_URL}';
    1718GThumb.max_height = {$GThumb.height};
    1819GThumb.margin = {$GThumb.margin};
Note: See TracChangeset for help on using the changeset viewer.