Results 1 to 3 of 3

Thread: MoPics External Images

  1. #1

    Default MoPics External Images

    Hi, I have got mopics working with external images by modifying html_output.php tep_images function to display images from http locations. But it will not enlarge the pics, I presume it is because it cannot find them in the required folder. How do i fix this.?

    N.b. It does enlarge other local pics. Any help on what else needs modifying will be greatly appreciated as this saves me a lot of space with my hosting company.

  2. #2

    Default RE: MoPics External Images

    I would try editing the popup functions in the /includes/functions directory. These functions look for the popup image in an admin configurable directory. the directory it uses is based on the settings in admin for "dynamic mopics" > "large Image Folder", i think. This directory is normally, /images/images_big/ , you need to modify the popup funrtion to search for an external URL instead of a local folder for these images.

  3. #3


    Thanks, that sounds a bit complicated.
    Instead of searching is it possible to just enlarge the standard picture from the url which it already displays shrunk down. Here is popup_image.php:

    	// Include dynamic mopics functions
    	require(DIR_WS_FUNCTIONS . 'dynamic_mopics.php');
      require(DIR_WS_LANGUAGES . $_SESSION['language'] . '/' . FILENAME_POPUP_IMAGE);
    	// Fix for search engine friendly urls with MS2
      if (SEARCH_ENGINE_FRIENDLY_URLS == 'true') {
        if (isset($HTTP_GET_VARS)) $_GET =& $HTTP_GET_VARS;
      $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
      $product_info = tep_db_fetch_array($products_query);
    	// Set the large image's basename; replaces "imagebase" in the user's pattern
    	$image_base_lg = mopics_get_imagebase($product_info['products_image'], DIR_WS_IMAGES . DYNAMIC_MOPICS_BIGIMAGES_DIR);
    	// Validate the image type
    	$allowed_types = explode(',', str_replace(' ', '', DYNAMIC_MOPICS_BIG_IMAGE_TYPES));
    	if (!in_array($_GET['type'], $allowed_types)) {
    		die("Requested image was not found.");
    	if (isset($_GET['pic']) && tep_not_null($_GET['pic'])) {
    		// Get the current count
    		$i = $_GET['pic'];
    		// Set the search for the str_replace pattern search/replace
    		$search = array('imagebase', mopics_match_pattern(DYNAMIC_MOPICS_PATTERN));
    		// Set the replace for the str_replace pattern search/replace
    		$replace = array($image_base_lg, $i);
    		// Set the large image
    		$image = str_replace($search, $replace, DYNAMIC_MOPICS_PATTERN) . '.' . $_GET['type'];
    	} else {
    		$image = $image_base_lg . '.' . $_GET['type'];
      $content = CONTENT_POPUP_IMAGE;
      $javascript = $content . '.js';
      $body_attributes = ' onload="resize();"';

Similar Threads

  1. MoPics Images Per Row
    By im2smrt4u in forum osCMax v2 Features Discussion
    Replies: 5
    Last Post: 09-15-2006, 09:58 AM
  2. Link to an external page
    By jcomputers in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 07-27-2006, 06:07 PM
  3. Linking an external product to store.
    By deviantla in forum osCmax v2 Customization/Mods
    Replies: 3
    Last Post: 03-15-2006, 12:42 AM
  4. OSC using an external user auth system
    By beach_defender in forum osCommerce 2.2 Modification Help
    Replies: 3
    Last Post: 04-07-2004, 07:04 AM
  5. External DB authentication
    By dgammon in forum osCommerce 2.2 Modification Help
    Replies: 1
    Last Post: 06-06-2003, 09:34 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts