osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

MoPics External Images

This is a discussion on MoPics External Images within the osCMax v2 Customization/Mods forums, part of the osCMax v2.0 Forums category; Hi, I have got mopics working with external images by modifying html_output.php tep_images function to display images from http locations. ...



Find us on Facebook
Go Back   osCommerce and osCMax shopping cart software forums > osCMax v2.0 Forums > osCMax v2 Customization/Mods

Connect with Facebook Register FAQDonate Members List Calendar Mark Forums Read


Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-29-2005, 12:15 PM
New Member
 
Join Date: Jun 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
hrhstephen
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 07-30-2005, 12:20 AM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 343
Thanks: 0
Thanked 3 Times in 3 Posts
Rep Power: 7
red_fraggle is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 07-30-2005, 04:04 AM
New Member
 
Join Date: Jun 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
hrhstephen
Default

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:

Code:
  require('includes/application_top.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;
  }
  $navigation->remove_current_page();

  $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();"';

  require(DIR_WS_TEMPLATES . TEMPLATENAME_POPUP);

  require('includes/application_bottom.php');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

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


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


Powered by vBulletin®
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2009 osCMax
Inactive Reminders By Icora Web Design