Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

thejudge99

Pioneers
  • Posts

    119
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by thejudge99

  1. hi ken0306

     

    As ive already posted , if someone already has an account in the shop - the 3 fields First / Last name and Email address will already exist.

     

    Then if someone tries to login with facebook or google and those same 3 fields are not identical - login will fail.

     

    IF email is found - but the first and last names are something different - that could be concieved as Fraud , and without email address we could mistakenly log someone into the shop to someone elses login.

     

    This is the reason why TWITTER SHOULD NOT BE USED - without Email this is not suitable .

     

    As for Password - if someone creates a new account by using facebook or google - we dont need a password - the authentication will always be performed by FB or G.

     

    If however someone creates an account with FB or G and then needs to login through the shops internal login then the customer will have to use the password recovery to generate a real shop password.

     

    Jules

  2. Hi jimmy

     

    The double popup sounds like it could be from the query slide which is used in the last update ( if memory serves its called sexy popup) which isnt actually done by me so i cant say.

     

    The google login sounds like a setup / config error ( mismatch with the redirect URL ).

     

    As for Twitter ive already coded a login function but i didnt supply it as its not really adequate for a shop. Twitter does not supply Email address as a means of proving credentials only first and last name.

    As its possible ( although unlikely ) that more than one shop customer can have the same first and last name , it could create some problems.

    However as Email addresses are unique - testing credentials against first / last name AND Email ( which my contribution does) proves 100% that the customer is who he/she says he is.

  3. try this new function in html_output.php

    // New HTML image wrapper function modified for KISS Image Thumbnailer by FWR Media
     function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') {
       // If width and height are not numeric then we can't do anything with it
    
    
    $imageg = @getimagesize($src);
    
    // Check the input variables and decide what to do:
    
    if($width > $imageg[0] && $height > $imageg[1]){
    
      $image = '<img src="' . tep_output_string($src) . '" alt="' . tep_output_string($alt) . '"';
    
      if (tep_not_null($alt)) {
     $image .= ' title=" ' . tep_output_string($alt) . ' "';
      }
    
    
    
    
     $image .= ' '.$imageg[3];
    
    
      if (tep_not_null($parameters)) $image .= ' ' . $parameters;
    
      $image .= ' />';
    
      return $image;
    
    }else{
    
      if ( !is_numeric ( $width ) || !is_numeric ( $height ) ) return tep_image_legacy( $src, $alt, $width, $height, $parameters );
      require_once DIR_WS_MODULES . 'kiss_image_thumbnailer/classes/Image_Helper.php';
      $attributes = array( 'alt' => $alt, 'width' => $width, 'height' => $height );
      $image = new Image_Helper( array( 'src'				   => $src,
    		 'attributes'		    => $attributes,
    		 'parameters'		    => $parameters,
    		 'default_missing_image' => DIR_WS_IMAGES . 'no_image_available_150_150.gif',
    		 'isXhtml'			   => true,
    		 'thumbs_dir_path'	   => DIR_WS_MODULES . 'kiss_image_thumbnailer/thumbs/',
    		 'thumb_quality'		 => 75,
    		 'thumb_background_rgb' => array( 'red'   => 255,
    				  'green' => 255,
    				  'blue'  => 255 ) ) );
      if ( false === $image_assembled = $image->assemble() ) {
     return tep_image_legacy( $src, $alt, $width, $height, $parameters );
      }
      return $image_assembled;
    }
     } // end function
    

    it checks first the Image dimensions with the original - if both width and height are bigger - it will instead just link the original Image

  4. Is there way to keep the proportions of the image but without the blank (or any colour) background? I mean the thumbnail taking the whole space even if it means that some part of the image is hidden? (overflow: hidden kind of thing)

    My modification posted above achieves this
  5. Hi marun ,

    Short anwer - I dont know. This script is using the supplied API from facebook . What might be the cause is the TOKEN life ( terminology might be wrong) - in that logging in with this API generates some kind of token/session that has a lifespan - and subsequent logins within this lifespan will simply login without asking for login infos again. This obviously seems to ignore whether someone is actually logged into facebook or not.

     

    Facebook API contacts facebook - asks if this persons login infos are correct - facebook replies with yes or no.

    If yes facebook API on our oscommerce site creates this token .

     

    This however is probably not the same as going to fxxxbook.com and loggin in.

     

    Jules

  6. I thought i would share here a slight modification for those not wanting the extra background padding it generates when using the

     

    $_take_resize_dimensions_as_absolute = true

     

    By setting this to false disables this extra padding - and the generated thumb will indeed look perfect - when its first generated.

     

    However on making a browser refresh the script will check for the presence of a thumb - which will of course be found - but will use the dimensions passed originally to the script which will cause the browser to stretch / skew the image to fit the size.

     

    This modified function will instead use the actual size of the already generated thumb.

     

    includes/modules/kiss_image_thumbnailer/classes/Image_Helper.php

     

    the new checkImage function is as follows

     

    protected function _checkImage() {
     if ( !is_file ( $this->src ) ) {
     $this->src = $this->default_missing_image;
     }
     $image_path_parts = pathinfo ( $this->src );
     $this->_image_name = $image_path_parts['basename'];
     $this->_thumb_filename = $this->attributes['width'] . 'x' . $this->attributes['height'] . '_' . $this->_image_name;
     $this->_thumb_src = $this->thumbs_dir_path . $this->_thumb_filename;
     if ( is_readable ( $this->_thumb_src ) ) {
     $imagegen = @getimagesize($this->_thumb_src);
    
     //$this->_calculated_width = $this->attributes['width'];
     //$this->_calculated_height = $this->attributes['height'];
    
    $this->_calculated_width = $imagegen[0];
     $this->_calculated_height = $imagegen[1];
     $this->src = $this->_thumb_src;
     return 'no_thumb_required';
     }
     if ( !$this->_original_image_info = getimagesize ( $this->src ) ) {
     return 'abort';
     }
     if (!in_array ( $this->_original_image_info['mime'], $this->_valid_mime ) ) {
     return 'abort';
     }
    } // end method
    

     

    subsequent refreshes / pageloads wont stretch the thumb

     

    Jules

     

    edit: this needs

     

    $_take_resize_dimensions_as_absolute = false;
    

     

    setting in Image.php

  7. This is actually considered a markup problem with the latest jquery - because of the <base> tag.

     

    The tabs are using as links something like #tab1 #tab2 etc - what this means with the base tag is

     

    http://somedomain.com/#tab1 or http://somedomain.com/#tab2

     

    which is literally the site root loaded in the tab - working as intented ( although this wasnt pre 1.9 behaviour ).

     

    Changing the markup to something like

     

    <li><a href="<? echo $_SERVER['REQUEST_URI'];?>#tab1">MY TAB</a></li>
    

     

    forces the tab url to be something like

     

    http://somedomain/somepath.html#tab1

     

    which then loads correctly ( for me at least anyways - with the latest jquery versions)

     

    Jules

×
×
  • Create New...