Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Dynamic Images - a FREE mod for image resizing!

 
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4
 
Thread Tools
  #1  
Old 08-22-2008, 04:14 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Dynamic Images - a FREE mod for image resizing!

DO NOT USE MODS FROM THIS DEVELOPER. HE IS BANNED FROM THE FORUMS, OFFERS NO SUPPORT FOR HIS PRODUCTS AND HAS BEEN CAUGHT HACKING SITES.

The Dynamic Images module from PHP Site Solutions, is an open-source (and free) addition to the X-Cart ecommerce system. This module gives your X-Cart store the ability to dynamically resize images (and generate thumbnails) on the fly! You no longer have to worry about large product images driving customers away due to slow page loads. With our dynamic image generator, your product thumbnails will properly be resized & the new image is cached, to improve performance both on your server and for your customer.

This module comes already equipped to resize product thumbnails, and the primary image on your product pages. The Dynamic Images module is so easy to use, if you decide to implement resizable images in some other area of your shopping cart, you simply have to insert a single line of code into your Smarty template, wherever you want a resized image to appear.

Since this is a free module, and is open-source, you can make any modifications to the source code as you desire, or hire any PHP developer that you wish to further enhance the code!

Features:
  • Image resizing on-the-fly
  • Smart cache support, avoids generating multiple copies of the same size of the same image
  • Image watermarking
  • External images (images hosted via external URLs, or even images accessible only via X-Cart's image.php script)
  • Ability to specify resized image quality
  • Support for sharpening images, or applying unsharp mask
  • Ability to crop images
  • Support for image overlays
  • Ability to frame images using a separate image
  • Open-source
  • FREE!


Here's a page using the module (note, the popup functionality is an implementation of Lytebox, which was implemented separately): XXXXXX
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #2  
Old 08-22-2008, 08:13 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: Dynamic Images - a FREE mod for image resizing!

Just a note, to anyone that tried to get one of the free mods and experienced an error, please try again.

I had made a change to process orders with a total of $0 to automatically be processed, but didn't expect the resulting behavior from X-Cart. The error was reported to me by a customer, and has been corrected

Sorry for the inconvenience.
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #3  
Old 08-22-2008, 09:38 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: Dynamic Images - a FREE mod for image resizing!

I've posted a tutorial for the Dynamic Images module, to make it function nicely with Lytebox, an image viewer similar to Thickbox

Read it here:
Dynamic Images + Lytebox
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #4  
Old 08-23-2008, 05:22 AM
 
Asiaplay Asiaplay is offline
 

X-Wizard
  
Join Date: Oct 2005
Posts: 1,242
 

Thumbs up Re: Dynamic Images - a FREE mod for image resizing!

Thanks Jon... !!!

Very nice FREE module... and great to see this is even more powerful than Telafirma's (now extinct) Dynamic Image Generator mod. Water-marking and picture frames etc. etc.- cool!!!!

This module is really a must add-on for all X-Cart users, so they can avoid the painful way that X-Cart handles image import (and you have unbelievably made it FREE and open source so everyone can benefit).

Great work Jon and I am sure their will be some happy x-cart users, using this module.

Cheers and thanks - Asiaplay
__________________
X-Cart Gold version 4.1.9
(plus built in X-Cart bugs!)
Reply With Quote
  #5  
Old 08-23-2008, 07:48 AM
  WhiteDoveGifts's Avatar 
WhiteDoveGifts WhiteDoveGifts is offline
 

X-Adept
  
Join Date: Oct 2006
Location: Maarssen, The Netherlands
Posts: 474
 

Thumbs up Re: Dynamic Images - a FREE mod for image resizing!

I agree, many Kudos for Jon here!!! I was lucky to buy the Telafirma mod just before Stephen "dissappeared" and I see many people loosing their money because of this, not to mention the lack of support for those who purchased the mod...

Making this mod open source will make every X-Cart better and will hopefully be a default "out of the box" feature one day.
__________________
____________________________
X-Cart Gold 4.1.10

EWD Hosting | CDSEO Pro | One Page Checkout | Smart Search | Telafirma Dynamic Images | X-AOM | Product Importer Pro and many custom mods and tweaks found here...
Reply With Quote
  #6  
Old 08-23-2008, 11:21 PM
  tarty00's Avatar 
tarty00 tarty00 is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 46
 

Default Re: Dynamic Images - a FREE mod for image resizing!

Jon thank you so very much! Your a legend!! MASSIVE CHEERS MATE!!!
__________________
..::t a r a::..
____________________

La-Di-Da Studios

Version 4.1.11 Gold
Reply With Quote
  #7  
Old 08-24-2008, 12:02 AM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: Dynamic Images - a FREE mod for image resizing!

Just a note, while the patch file is specifically for 4.1.10, there's no reason it shouldn't work on 4.1.9, just might require manual patching

While I do believe the {thumb} plugin itself is definitely better, keep in mind that Telafirma's mod has quite a bit of additional functionality added in. Dynamic Images has the potential to be better, but is pretty much bare-bones to start with. Just clarifying so you aren't mislead

Cheers!
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
  #8  
Old 08-24-2008, 12:45 AM
  tarty00's Avatar 
tarty00 tarty00 is offline
 

Advanced Member
  
Join Date: Apr 2008
Posts: 46
 

Default Re: Dynamic Images - a FREE mod for image resizing!

LOL thanks heaps Mate. I just tried doing it on my 4.1.9 with no go so I am in the process of upgrading to 4.1.10. But I am having trouble with that too. LOL. Can't wait to get this going in my store because I am lost without the other one.

Cheers!
__________________
..::t a r a::..
____________________

La-Di-Da Studios

Version 4.1.11 Gold
Reply With Quote
  #9  
Old 08-25-2008, 06:29 PM
 
gennarof gennarof is offline
 

Advanced Member
  
Join Date: Feb 2008
Posts: 46
 

Default Re: Dynamic Images - a FREE mod for image resizing!

Quote:
Originally Posted by intel352
Just a note, while the patch file is specifically for 4.1.10, there's no reason it shouldn't work on 4.1.9, just might require manual patching

While I do believe the {thumb} plugin itself is definitely better, keep in mind that Telafirma's mod has quite a bit of additional functionality added in. Dynamic Images has the potential to be better, but is pretty much bare-bones to start with. Just clarifying so you aren't mislead

Cheers!

Most people I spoke with rave about ths mod.. I am trying to install it for my site desertvalleyelectronics.com but running into a couple of problems you may be able to clear up for me.

1) How exactly should I manually patch Product_thumbnail.tpl. code is presently as follows.

{* existing code *}

{* $Id: product_thumbnail.tpl,v 1.19.2.1 2007/07/09 05:00:35 svowl Exp $ *}
{if $config.Appearance.show_thumbnails eq "Y" or ($type ne "T" and $type ne "")}<img{if $id ne ''} id="{$id}"{/if} src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&amp;id={$produc tid}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} style="margin:5px;" alt="{$product|escape}" />{/if}

{* end existing code *}

I tried the following but then no product images are rendered at all. Just the descriptions.

{ * after manual patch for product_thumbnail.tpl *}

{* $Id: product_thumbnail.tpl,v 1.19.2.1 2007/07/09 05:00:35 svowl Exp $ *}
{* skin1/product_thumbnail.tpl (revision 15) *}
{* skin1/product_thumbnail.tpl (working copy) *}
{* @@ -1,2 1,44 @@*}
{* $Id: product_thumbnail.tpl,v 1.19.2.1 2007/07/09 05:00:35 svowl Exp $*}

{strip}
{* PHP Site Solutions - Dynamic Images *}
{if $active_modules.PHPSS_Dynamic_Images ne ""}
{if $config.Appearance.show_thumbnails eq "Y" or ($type ne "T" and $type ne "")}
{if $main eq "catalog" || $main eq "search" || $main eq "manufacturer_products" || $main eq "download_home"}
{if !$alt}
{assign var=alt value=$product}
{/if}
{/if}
{if $tmbn_url}
{if $usertype eq 'A' || $usertype eq 'P'}
{assign var="tfile" value=$tmbn_url|replace:"`$http_location`/":"../"|replace:"`$https_location`/":"../"}
{else}
{assign var="tfile" value=$tmbn_url|replace:"`$http_location`/":""|replace:"`$https_location`/":""}
{/if}
{if !$class}
{assign var="class" value="thumb"}
{/if}
{if !$sharpen}
{assign var="sharpen" value="true"}
{/if}
{if !hint}
{assign var="hint" value="false"}
{/if}
{if !overlay_position}
{assign var="overlay_position" value="5"}
{/if}
{thumb file="$tfile" width="$image_x" link="false" hint="false" overlay_position="$overlay_position" overlay="$overlay" sharpen="$sharpen" get_image_path="$get_image_path" html="class=\"$class\" alt=\"`$alt`\""}
{else}
{* Capture the image tag and clean out extra whitespaces *}
{capture assign="img_cln"}
<img {if $id}id="{$id}"{/if} src="{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&amp;id={$produc tid}{if $file_upload_data.file_path}&tmp=y{/if}" {if $image_x ne 0}width="{$image_x}"{/if} {if $image_y ne 0}height="{$image_y}"{/if} alt="{$product|escape}" {if $align}align="{$align}"{/if} {if $class}class="{$class}"{/if} />
{/capture}
{$img_cln|strip}
{/if}
{/if}
{else}
{if $config.Appearance.show_thumbnails eq "Y" or ($type ne "T" and $type ne "")}<img{if $id ne ''} id="{$id}"{/if} src="{if $tmbn_url}{$tmbn_url}{else}{if $full_url}{$http_location}{else}{$xcart_web_dir}{/if}/image.php?type={$type|default:"T"}&amp;id={$produc tid}{/if}"{if $image_x ne 0} width="{$image_x}"{/if}{if $image_y ne 0} height="{$image_y}"{/if} alt="{$product|escape}" />{/if}
{/if}
{* / PHP Site Solutions - Dynamic Images *}
{/strip}

{ * end of manual patch *}

2) My second question is with regard to the directory /images/cache/
The instructions state " A new directory will have been created, images/cache/, please CHMOD this directory to 777 (it must be writeable to cache your images)"

As this directory was not created that I could see, I just created the directory under images in the root, not skin1 directory and chmod 777 and left it writeable . I just need to know that that is ok.

As I said, after I activate and configure the module from the back end, no product images display at all, just description.

Any feed back will be appreciated.
Thanks to all for previous assist.
__________________
Ver 4.1.9
Reply With Quote
  #10  
Old 08-25-2008, 07:13 PM
 
intel352 intel352 is offline
 

X-Wizard
  
Join Date: Dec 2005
Posts: 1,071
 

Default Re: Dynamic Images - a FREE mod for image resizing!

Hi gennarof, to make the code more readable (just a tip), it's best to place it within [code] tags in your posts.

You said that no images/cache/ folder was created, if that's correct, then that suggests you didn't upload the files from the /upload/ folder to your site root. The /upload/ folder has the following structure:
/upload/images/cache/
/upload/include/templater/plugins/function.thumb.php
/upload/include/templater/plugins/function.thumb_imp.php
/upload/sql/phpss_dynamic_images.sql

So once you've uploaded the contents of /upload/, you should see the images/cache/ folder exist (along with the plugin files, etc). Or if you did upload properly, it's possible that your Unzip program didn't preserve the images/cache/ folder because it's empty?


Additionally, you mention that when you modified the product_thumbnail file, no images were displayed. Please check your /var/log/ directory for any PHP error log files, please post the content of the most recent log file.

Cheers
__________________
-Jon Langevin
WARNING: Unethical developer - NOT RECOMMENDED
See details here
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Third Party Add-Ons for X-Cart 4


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:11 AM.

   

 
X-Cart forums © 2001-2020