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. ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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. |
| Sponsored Links | ||
| ||
|
#2
| ||||
| ||||
| 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! |
|
#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: 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');
|
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| 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 |