Page 129 of 169 FirstFirst ... 2979119127128129130131139 ... LastLast
Results 1,281 to 1,290 of 1688
  1. #1281
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: 4 days and 8 hrs a day later - hover effect still not working

    Good point about there not being a small suffix.

    maybe we can agree on something like:

    Code:
    	function determine_image_sizetype() {
    		global $ihConf;
    		
    		$this->sizetype = 'generic';
    
    		if($ihConf['large']['suffix'] != '')
    		{
    			if (strstr($this->src, $ihConf['large']['suffix'])) {
    				$this->sizetype = 'large';
    			}			
    		}
    
    		if($ihConf['medium']['suffix'] != '')
    		{
    			if (strstr($this->src, $ihConf['medium']['suffix'])) {
    				$this->sizetype = 'medium';
    			}			
    		}		
    		
    
    		if ((intval($this->width) == intval($ihConf['small']['width'])) && (intval($this->height) == intval($ihConf['small']['height']))) 
    		{
    			$this->sizetype = 'small';
    		}			
    
    	}

  2. #1282
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: 4 days and 8 hrs a day later - hover effect still not working

    Cool will try this out this weekend..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  3. #1283
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: 4 days and 8 hrs a day later - hover effect still not working

    Yup, Diva, you know my thoughts about this module. And the slightly bizarre naming conventions in Zen that are a hangover from osCommerce. And you know that I choose not to use it on sites these days :-)

    If someone chooses to have the same suffix for medium and large that will mess up Zen. That really isn't an IH issue. It's a zen issue because even without IH zen would not function correctly if someone does that.

    To keep Zen useful and at least slightly competitive you also know that my thoughts are that IH, or something similar, needs to rolled into the core. And that the bizarre naming conventions need to be done away with because in the modern world they are just completely limiting.

    And I am more than aware that that would be lovely for you to because looking after IH takes a huge amount of work which is appreciated by some but not all. So, I would not underestimate your contribution.

  4. #1284
    Join Date
    Jan 2007
    Location
    Los Angeles, California, United States
    Posts
    10,021
    Plugin Contributions
    32

    Default Re: 4 days and 8 hrs a day later - hover effect still not working

    Quote Originally Posted by niccol View Post
    Yup, Diva, you know my thoughts about this module. And the slightly bizarre naming conventions in Zen that are a hangover from osCommerce. And you know that I choose not to use it on sites these days :-)

    --------

    To keep Zen useful and at least slightly competitive you also know that my thoughts are that IH, or something similar, needs to rolled into the core. And that the bizarre naming conventions need to be done away with because in the modern world they are just completely limiting.
    Bizarre naming was done away with in the version that's in my Github repo.. Another outstanding Zenner provided the code that finally gave the image filenames some "normalcy".. Once I get your code snippet incorporated and tested, I'll finally submit it to the free downloads.. I know you don't like Image Handler, but you might want to check it out if for no other reason just to see that FINALLY the MD5 naming of images is gone gone gone!!

    Quote Originally Posted by niccol View Post
    And I am more than aware that that would be lovely for you to because looking after IH takes a huge amount of work which is appreciated by some but not all. So, I would not underestimate your contribution.
    Awww sweet of you to say..
    My Site - Zen Cart & WordPress integration specialist
    I don't answer support questions via PM. Post add-on support questions in the support thread. The question & the answer will benefit others with similar issues.

  5. #1285
    Join Date
    Jul 2012
    Posts
    16,798
    Plugin Contributions
    17

    Default Re: 4 days and 8 hrs a day later - hover effect still not working

    If the naming convention is considered of having the same medium and large suffix is itself considered a no-no, then would leave the first two ifs in their current sequence, though to maintain current system response (and still solve the original issue of recent) would suggest swapping them.

    What about if a large image and the small images have the same dimensions? Would there be a negative effect of the "small" image sizetype being provided when the file has the suffix for a large image? If that would be a problem, I would suggest that the last if group be placed before the first.

    Basically because this section is being revised from an if it matches one of these things it is assigned a size in first match sequence of large, medium, small or generic, to it's generic until proven otherwise by the last match, I would suggest that to maintain the existing behavior to invert the sequence of the three if statements.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #1286
    Join Date
    Apr 2009
    Posts
    2,134
    Plugin Contributions
    3

    Default Re: 4 days and 8 hrs a day later - hover effect still not working

    Yup, quite right again. If a user has taken the time to create and upload small and large images that are exactly the same size and taken the time to rename them accordingly then it may well confuse the issue. But this hypothetical user is quite a confused individual anyway. And actually the way that $this-sizetype is used in the rest of the class, on first glance, it really doesn't matter. But for consistency let's change it.

    Code:
    	function determine_image_sizetype() {
    		global $ihConf;
    		
    		$this->sizetype = 'generic';
    
    		if ((intval($this->width) == intval($ihConf['small']['width'])) && (intval($this->height) == intval($ihConf['small']['height']))) 
    		{
    			$this->sizetype = 'small';
    		}		
    
    
    		if($ihConf['medium']['suffix'] != '')
    		{
    			if (strstr($this->src, $ihConf['medium']['suffix'])) {
    				$this->sizetype = 'medium';
    			}			
    		}		
    		
    		if($ihConf['large']['suffix'] != '')
    		{
    			if (strstr($this->src, $ihConf['large']['suffix'])) {
    				$this->sizetype = 'large';
    			}			
    		}
    	
    
    	}

  7. #1287
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Image Handler 4 (for v1.5.x) Support Thread

    Image Handler Readme

    Make sure that your main product image files names DO NOT contain any special characters (non-alphanumeric characters such as / \ : ! @ # $ % ^ < > , [ ] { } & * ( ) + = ). Always use proper filenaming practices when naming your images
    What if there are about 2000 images containing these forbidden characters? That were in place before image handler was used...

    could str_replace be used to stop & symbols breaking IH?

  8. #1288
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Image Handler 4 (for v1.5.x) Support Thread

    from google_feeder
    PHP Warning: preg_match(): Compilation failed: missing ) at offset 69
    or
    PHP Warning: preg_match(): Compilation failed: unmatched parentheses at offset 88
    image_handler
    PHP Warning: preg_match(): Compilation failed: missing ) at offset 36

    Files with Parentheses are also a problem (as stated in the readme). Is it not possible to look at the filename and str_replace it to something that won't break it?
    Last edited by DigitalShadow; 12 Feb 2015 at 10:03 PM.

  9. #1289
    Join Date
    Mar 2009
    Posts
    609
    Plugin Contributions
    0

    Default Re: Image Handler 4 (for v1.5.x) Support Thread

    oh and the & symbol causes this error in google_base

    PHP Warning: DOMDocument::createElement(): unterminated entity reference

  10. #1290
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: Image Handler 4 (for v1.5.x) Support Thread

    Yes there is a way. I have a filter written for another Zen Cart module we could apply. But may be worth adding an alert / warning / block adding image from admin as well with characters not typically allowed in URLs being in the image filename.

 

 

Similar Threads

  1. v158 Image Handler 5 (for v1.5.5 - v1.5.8) Support Thread
    By lat9 in forum All Other Contributions/Addons
    Replies: 711
    Last Post: 10 May 2025, 02:13 PM
  2. Attribute image replaces main product image on select [Support Thread]
    By exoticcorpse in forum All Other Contributions/Addons
    Replies: 160
    Last Post: 28 Oct 2024, 10:50 PM
  3. v139h Image Handler 3 Support Thread (for ZC v1.3.9)
    By DivaVocals in forum All Other Contributions/Addons
    Replies: 1095
    Last Post: 2 Oct 2017, 12:42 PM
  4. v138a Image Handler 2 (for ZC v1.3.8 ONLY) Support
    By timkroeger in forum All Other Contributions/Addons
    Replies: 7098
    Last Post: 12 Oct 2014, 03:48 AM
  5. Image Handler Support Please
    By nadinesky in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 30 Sep 2013, 03:47 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR