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. ...


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

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 07-29-2005, 01: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!
Sponsored Links
Advertisement
  #2  
Old 07-30-2005, 01:20 AM
red_fraggle's Avatar
Active Member
 
Join Date: Feb 2004
Location: wilmington, NC
Posts: 319
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 0
red_fraggle
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.
__________________
Clifton Murphy CEO/CTO
Hyperactive Inc.
osCommerce hosting, OSCMAX hosting, osCommerce modification, and OSCMAX modification specialists!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 07-30-2005, 05: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!
Sponsored Links
Advertisement
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 10:58 AM
Link to an external page jcomputers osCMax v2 Customization/Mods 1 07-27-2006 07:07 PM
Linking an external product to store. deviantla osCMax v2 Customization/Mods 3 03-15-2006 01:42 AM
OSC using an external user auth system beach_defender osCommerce 2.2 Modification Help 3 04-07-2004 08:04 AM
External DB authentication dgammon osCommerce 2.2 Modification Help 1 06-06-2003 10:34 AM


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


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax