[Contribution] oscThumb
#421
Posted 08 July 2011 - 05:33 PM
Is there any way around this? I have caching turned on but it still wants to generate images almost every time.
We use 1&1 shared hosting. You can view the site at scopestop.com
#422
Posted 09 July 2011 - 08:30 PM
#423
Posted 27 July 2011 - 03:17 PM
oscThumb 1.12 with the core phpThumb 1.7.10 update applied, on mysql5/php5 server. 2.2Rc2a
#424
Posted 07 August 2011 - 08:30 PM
i have installed oscthumbs on my oscommerce 2.3.1
i have a problem with popup , there is no watermarks.
Any ideas ?
#425
Posted 20 August 2011 - 02:38 AM
Also, in the July 20, 2011 update to the contribution, it states:
Quote
I just took the last phpThumb 1.7.10
and update accordingly to the doc prodided :
catalog/phpThumb/phpThumb.php: set the error reporting to (E_ERROR | E_PARSE) instead of E_ALL.
catalog/phpThumb/phpThumb.config.php: the following parameters have been modified:
$PHPTHUMB_CONFIG['document_root']: from osCommerce constant
$PHPTHUMB_CONFIG['cache_directory']: from configuration parameter
$PHPTHUMB_CONFIG['high_security_password']: from configuration parameter
You should replace your current version of phpThumb with the one provided in the zip file.
Does the entire contribution need to be updated or just the two files mentioned? Are there changes to other files than the ones listed?
Thanks.
#426
Posted 23 September 2011 - 03:59 PM
We're using the contrib and it's working fine.
Just recently, we've started to do some A/B testing using Google's Website Optimizer and we've found that OSCThumbs stops working properly on the 'variant page'. The contrib is continuing to work fine on the original page.
The variant page is an exact copy of the original page, but with some Google script code just under the <head> tag. You can see this code below, but it's JS, and shouldn't have any effect on OscThumb.
On the variant page, Oscthumb is failing to show the images as animated pop-ups, it just opens the images in new pages.
Does Oscthumb have any settings that depend on the name of the page that the contrib appears on? Would changing this page make the settings not valid?
One last thing - in FF Firebug, we see the following error
$("div#fancy a").fancybox is not a function
Clearly this is the problem, but *why* is fancybox not a function - it works just fine in the original page?
Any help much appreciated....
Google Website Optimzer JS code below....
<!-- Google Website Optimizer Tracking Script -->
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['gwo._setAccount', 'UA-xxxxxxxx-2']);
_gaq.push(['gwo._trackPageview', '/xxxxxxxxxx/test']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- End of Google Website Optimizer Tracking Script -->
#427
Posted 24 September 2011 - 03:24 AM
Add-Ons Installed
Header Tags SEO
Ultimate SEO URLs
Google Sitemap SEO
Easy Populate
QT Pro
Margin Report
AJAX Attribute Manager
Smart Columns
CKEditor
OSCThumb
Select Product Image Directory
Category CSS Menu
Enable Disable Categories
Contact Form Captcha
#428
Posted 25 September 2011 - 07:18 PM
echo '<img src="'.htmlentities('/phpThumb/phpThumb.php?src=/images/pic.jpg&w=50', ENT_QUOTES).'">';
echo '<img src="'.htmlentities(phpThumbURL('src=/images/pic.jpg&w=50', '&', '/phpThumb/phpThumb.php'), ENT_QUOTES).'">';
How do I do that for the osCommerce image code here:
// The HTML image wrapper function
function tep_image_original($src, $alt = '', $width = '', $height = '', $parameters = '') {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
return false;
}
// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . tep_output_string($src) . '" alt="' . tep_output_string($alt) . '"';
if (tep_not_null($alt)) {
$image .= ' title=" ' . tep_output_string($alt) . ' "';
}
if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
if ($image_size = @getimagesize($src)) {
if (empty($width) && tep_not_null($height)) {
$ratio = $height / $image_size[1];
$width = intval($image_size[0] * $ratio);
} elseif (tep_not_null($width) && empty($height)) {
$ratio = $width / $image_size[0];
$height = intval($image_size[1] * $ratio);
} elseif (empty($width) && empty($height)) {
$width = $image_size[0];
$height = $image_size[1];
}
} elseif (IMAGE_REQUIRED == 'false') {
return false;
}
}
if (tep_not_null($width) && tep_not_null($height)) {
$image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
}
if (tep_not_null($parameters)) $image .= ' ' . $parameters;
$image .= ' />';
return $image;
}
Add-Ons Installed
Header Tags SEO
Ultimate SEO URLs
Google Sitemap SEO
Easy Populate
QT Pro
Margin Report
AJAX Attribute Manager
Smart Columns
CKEditor
OSCThumb
Select Product Image Directory
Category CSS Menu
Enable Disable Categories
Contact Form Captcha
#429
Posted 27 September 2011 - 09:58 PM
Add-Ons Installed
Header Tags SEO
Ultimate SEO URLs
Google Sitemap SEO
Easy Populate
QT Pro
Margin Report
AJAX Attribute Manager
Smart Columns
CKEditor
OSCThumb
Select Product Image Directory
Category CSS Menu
Enable Disable Categories
Contact Form Captcha
#430
Posted 24 November 2011 - 09:12 AM
I met the problem that i cannot adjust watermark text to big. This look like the maximum point up to 5. This is because the people cannot see the small text. I readed the code from phpthumb.filters.php.
The code shows in the following:
Line 1178 $size = min(5, max(1, $size));
Although i hide the above code, but the watermark text is same, too small. I checked another place from phpthumb.filters.php.
This look like the following code cause the watermark text image to be fixed.
Line 1181 $text_width = 0;
Line 1182 $text_height = 0;
Line 1183 foreach ($textlines as $dummy => $line) {
Line 1184 $text_width = max($text_width, ImageFontWidth($size) * strlen($line));
Line 1185 $text_height += ImageFontHeight($size);
Line 1186 }
I changed "$text_width = 0;" to "$text_width = 100;", and changed "$text_height = 0;" to "$text_height = 100;", the problem still same. The watermark text is too small to me. Anyone can solve this problem? I cannot clear what is wrong with the above code.
Thanks,
Jun
#431
Posted 23 January 2012 - 02:27 AM
I've installed this modulo on osc 2.3.1 and I'm having this problem:
Warning: require(includes/classes/oscthumb.php) [function.require]: failed to open stream: No such file or directory in /home/ambiancebijoux/www/catalogo_homolog/admin/includes/application_top.php on line 184
Warning: require(includes/classes/oscthumb.php) [function.require]: failed to open stream: No such file or directory in /home/ambiancebijoux/www/catalogo_homolog/admin/includes/application_top.php on line 184
Fatal error: require() [function.require]: Failed opening required 'includes/classes/oscthumb.php' (include_path='.:/usr/local/lib/php') in /home/ambiancebijoux/www/catalogo_homolog/admin/includes/application_top.php on line 184
SOmeone can helpme please?
Tks
#432
Posted 25 April 2012 - 01:48 PM
<?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], '90', '90'); ?>
That it was not reconizing the width and the height correctly. After debuging I found out that the $alt tag was missing in html_output.
This is what you have to change: (around line 83 and 84)
just add $alt right after $src
$oscthumb->set_type ($src, $alt, $width, $height, $thumbnail_type); // Detect the type of image we are currently processing if ($oscthumb->set_size ($src, $alt, $width, $height)==false) return false; // Choose the displayed width and height of the image, and if display something
#433
Posted 25 April 2012 - 02:34 PM
It stopped to resize images too. Only my problem? Think is a google problem but im not sure.
Question is...
Is there another contribution for osc 2.31 that works like OscThumb?
OscThumb is really nice but maybe a lil outdated
#434
Posted 25 April 2012 - 03:51 PM
Remember, What you think I ment may not be what I thought I ment when I said it.
Contributions:
Auto Backup your Database, Easy way
Multi Images with Fancy Pop-ups, Easy way
Products in columns with multi buy etc etc
Disable any Category or Product, Easy way
Secure & Improve your account pages et al.
#435
Posted 26 April 2012 - 12:01 AM
I wait then
tx
#436
Posted 08 June 2012 - 10:53 AM
The OscThumb works perfect on any aspect accept for Lightbox popup images.
I hope someone has a solution.
Thx.
#437
Posted 08 June 2012 - 02:47 PM
neetjedem, on 08 June 2012 - 10:53 AM, said:
The OscThumb works perfect on any aspect accept for Lightbox popup images.
I hope someone has a solution.
Thx.
I think it has something to do with the includes\modules\sts_inc\product_info.php since there is the lightbox for sts configured but i dont know what en where to change.
#438
Posted 12 June 2012 - 06:08 PM
do you have any news regarding your re-write version?
I'm testing the latest in osc 2.3.1 and I can't seem to put it to work, I've seen no image so far. It's working on my osc 2.2 shop though... Not sure what's different...
if you need a beta tester let me know.
#439
Posted 11 July 2012 - 07:11 PM
I'm not a php-wizard so the solution might not be so nice but it works for me and i thought to share it.
I found this script on B&T's Tips and Scripts (thanks very very much) and changed it just a little bit:
<?php
// this script creates a watermarked image from an image file - can be a .jpg .gif or .png file
// where watermark.gif is a mostly transparent gif image with the watermark - goes in the same directory as this script
// where this script is named watermark.php
// call this script with an image tag
// <img src="watermark.php?path=imagepath"> where path is a relative path from the document root - such as subdirectory/image.jpg
$imagesource = $_SERVER['DOCUMENT_ROOT']."/".$_GET['path'];
if (!file_exists($imagesource)) die();
$filetype = strtolower(substr($imagesource,strlen($imagesource)-4,4));
if($filetype == ".gif") $image = @imagecreatefromgif($imagesource);
if($filetype == ".jpg") $image = @imagecreatefromjpeg($imagesource);
if($filetype == ".png") $image = @imagecreatefrompng($imagesource);
if (empty($image)) die();
$watermark = @imagecreatefrompng('watermark.png');
$imagewidth = imagesx($image);
$imageheight = imagesy($image);
$watermarkwidth = imagesx($watermark);
$watermarkheight = imagesy($watermark);
$startwidth = (($imagewidth - $watermarkwidth)/2);
$startheight = (($imageheight - $watermarkheight)/2);
imagecopy($image, $watermark, $startwidth, $startheight, 0, 0, $watermarkwidth, $watermarkheight);
header("Content-type: image/jpeg");
imagejpeg($image);
imagedestroy($image);
imagedestroy($watermark);
?>
This will be your watermark.php and save it in the root of your webshop.
Then make a watermark.php with background transparency and text or graphic transparency 20-25. Save it as PNG8 (small file size) and upload it also in your root folder.
Then in includes/modules/sts_inc/product_info.php find this (or something like it):
$template_pinfo['product_popup']= '<a rel="lightbox" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" title="'. $product_info['products_model'] . ' - '. $product_info['products_name'] .' | '. $manufacturer['manufacturers_name'] .'">'. $template_pinfo['imagesmall'] . '</a>'."\n";
and change to:
$template_pinfo['product_popup']= '<a rel="lightbox" href="watermark.php?path=/images/' . $product_info['products_image'] . '" title="'. $product_info['products_model'] . ' - '. $product_info['products_name'] .' | '. $manufacturer['manufacturers_name'] .'">'. $template_pinfo['imagesmall'] . '</a>'."\n";
The bold printed text "$template_pinfo['product_popup']= '<a rel="lightbox" href="watermark.php?path=/images/' . $product_info['products_image'] ." is the key. And there it works.
look for an example on http://www.gigaparts.nl (live shop!!)
Good luck all!
Edited by neetjedem, 11 July 2012 - 07:15 PM.
#440
Posted 11 July 2012 - 07:28 PM









