Jump to content
Sign in to follow this  
dreamscape

[Contribution] Dynamic MoPics

Recommended Posts

Could we make it so iyou upload the large image and the use netpbm or imagemagick to make the thumb nails this make life so much quicker


Why reinvent the wheel

Share this post


Link to post
Share on other sites

I have read this entire thread and have gone over this too many times to count. I don't see why I am still getting "coming soon!" and not my pics.

 

http://www.fetzers.bz/catalog/product_info...&products_id=31

 

define('IN_IMAGE_BIGIMAGES', 'images_big/'); // big images location

define('IN_IMAGE_THUMBS', 'thumbs/'); // thumbnail image locaitons

define('MAIN_THUMB_IN_SUBDIR', false);

define('THUMBS_PRE_ROW', '3');

define('MORE_PICS_EXT', '_pic');

define('BIG_PIC_EXT', '');

define('THUMB_IMAGE_TYPE', 'jpg');

define('BIG_IMAGE_TYPE', 'jpg');

 

images/stool.jpg

images/stool_pic1.jpg

images/stool_pic2.jpg

images/stool_pic3.jpg

 

images/thumbs/stool.jpg

images/thumbs/stool_pic1.jpg

images/thumbs/stool_pic2.jpg

images/thumbs/stool_pic3.jpg

 

images/images_big/stool.jpg

images/images_big/stool_pic1.jpg

images/images_big/stool_pic2.jpg

images/images_big/stool_pic3.jpg

 

If I change MAIN_THUMB_IN_SUBDIR to true I get a popup with no picture trying to go to http://www.fetzers.bz/catalog/images/thumbs/.jpg

 

But when I set it to false I get http://www.fetzers.bz/catalog/images/thumbs/stool.jpg

 

TIA,

 

Erik

Share this post


Link to post
Share on other sites

Dynamic MoPics v2.1 released. Moved configuration to admin. Cleaned up code in popup_image.php.

 

** The configuration now being in admin should make it easier to get running.

 

** If updating, please delete the Dynamic MoPic confuration vars from catalog/includes/configure.php

 

http://www.oscommerce.com/community/contributions,1114

 

Note: I do not know why so many people have trouble getting this to work. It is probably one of the easiest extra image contributions to install and use. It is not meant to be difficult to use. It should be overly simple to use.


The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Share this post


Link to post
Share on other sites

After many tests, it appears much of the problems stem from the dev team changing the product_info variables at a certain point in time... that has now been fixed to work for all versions of osCommerce. Please get the new version if you are having troubles, and continue discussion in this thread about the new v2.2:

 

http://forums.oscommerce.com/viewtopic.php...p=207705#207705


The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Share this post


Link to post
Share on other sites

efetzer,

 

Just a shot, try the following changes:

 

define('IN_IMAGE_BIGIMAGES', 'images_big/'); // big images location

define('IN_IMAGE_THUMBS', 'thumbs/'); // thumbnail image locaitons

define('MAIN_THUMB_IN_SUBDIR', false);

define('THUMBS_PRE_ROW', '3');

define('MORE_PICS_EXT', '_pic');

define('BIG_PIC_EXT', ''); change to define('BIG_PIC_EXT', '_pic');

define('THUMB_IMAGE_TYPE', 'jpg');

define('BIG_IMAGE_TYPE', 'jpg');

 

images/stool.jpg This is your main thumbnail set in your catalog/product setup page.

images/stool_pic1.jpg (don't need)

images/stool_pic2.jpg (don't need)

images/stool_pic3.jpg (don't need)

 

images/thumbs/stool.jpg (don't need)

images/thumbs/stool_pic1.jpg

images/thumbs/stool_pic2.jpg

images/thumbs/stool_pic3.jpg

 

images/images_big/stool.jpg

images/images_big/stool_pic1.jpg

images/images_big/stool_pic2.jpg

images/images_big/stool_pic3.jpg

 

 

I finaly got my Dynamic MoPics working today. It realy was a simple setup, once I understood the following:

1) Setup all your products first and select your main thumbnail image (imagename.jpg) from the admin catalog/product setup page.

2) Put the full size image that relates to your main thumbnail in the folder images_big/ and name it the same as you thumbnail image (imagename.jpg)

3) Put all your additional thumbnails into the folder thumbs/ and use the ext you set up with define('MORE_PICS_EXT', '_pic');

4) Put all corresponding full size images in the folder images_big/ and use the extension you set up with define('BIG_PIC_EXT', '_pic');

 

Thats what worked for me, hope it works for you.

Share this post


Link to post
Share on other sites

Just wanted to add something that helped me when I was having the problem quite a few people seem to have - dynamic mopics looking for the wrong directory/file.

 

One thing the mod does is check if the first file exists before trying to display them.

You can see what it is looking for by adding this line to modules/dynamic_mopics.php.

 

<?php echo DIR_FS_CATALOG . $image_path . $image_base . MORE_PICS_EXT . '1' . $image_ext; ?>

 

AFTER

 

<td align="left" class="smallText"><?php echo TEXT_NO_MOPICS; ?>

 

This will print out what it is looking for if it can't find it, and you can adjust your settings and file names accordingly. (My problem was DIR_FS_CATALOG was configured wrong).

 

Also be sure that the directories you create to hold the images (thumbs, images_big) have the correct permission set so the files can be read.

 

Also remember to remove that line after you have fixed everything up. ;)

Share this post


Link to post
Share on other sites

Is this the configure.php file what everyone is talking about here. I don't have anything concerning Mopics in my catalog/includes/configure.php file. Is this the problem?

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.vintageland.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.vintageland.com');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/catalog/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/vintag5/public_html/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'vintag5_amishbob');
 define('DB_SERVER_PASSWORD', 'hidden');
 define('DB_DATABASE', 'vintag5_');
 define('USE_PCONNECT', 'true'); // use persistent connections?
 define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'
// STS: ADD: Define Simple Template System files
 define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
 define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php'); 
 define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
 define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES . 'sts_templates/');
 define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html'); 
 define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
 define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
// STS: EOADD
?>

Share this post


Link to post
Share on other sites

I know it has been months since the last post but would anybody be willing to help me?

 

I have the contrubition istalled, my pictures are in the correct files and format but all I get is "coming soon" on my listings.

 

If anyone is willing to help me I would very much appreciate it.

 

 

Mike

Share this post


Link to post
Share on other sites

I am unable to get this contribution to work. I have a fresh install of MS2........read through all the instructions and when I try to add more than one pic it just gets replaced. And yes I did rename them product1_pic1.gif. So what am I doing wrong here?

 

I really like the way these pics pop up.

 

http://www.valvetech.com/sams/product_info...?products_id=30

 

 

There is no url attached.

 

Can someone please help me out?

Edited by Paris

Share this post


Link to post
Share on other sites

you do not upload the extra images through the osCommerce admin. If you want to do that, you'll be wanting the regular MoPics contribution.

 

With my "Dynamic MoPics" contribution, you just upload the products main thumbnail via the admin. The extra images, you have to upload yourself via FTP or whatever.

 

Some may think this is dumb, retarded, or counter-intuitive; but for some of us, it is a huge time saver especially when we have many images per product. It also allows for adding and removing of product images -days, weeks, months, or years later- on-the-fly without having to edit the product or alter anything in the database. Just add or remove the images to the server and they will automatically show up or stop showing up.

Edited by dreamscape

The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Share this post


Link to post
Share on other sites

hi there

i have got things working sort of but am having some problems

example is here

 

http://www.templatesquad.com/product_info..../products_id/66

 

first he top thumbnail opens in a new window instead of a image-hugging popup, why is this so ?

 

as you can see down the bottom the 5 pics are loading fine as are their image-hugging popups

 

the problem is they are knocking the desing out and i need to set them to 2 pics per row

IU have done via configuration>dynamic mopics but there is still 3 to a row ?

 

where is the config info for this kept ?

 

THanks - my first post - great contrib!!!

Share this post


Link to post
Share on other sites

nextwave,

 

I see you are using popup_add_images.php to display the larger images and from the way the URL is structured, it looks like it is another multi-image contrib and not dynamic mopics.


The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Share this post


Link to post
Share on other sites

thanks dreamscape!

okay next question...

 

i want to use it but how do i go about doing it ?

i am using a AbbaCar Install with Dynamic MoPics pre-installed

i have to in my admin menu under configuration but i dont know how to call it on the page ?

 

thanks for any help you can provide

Share this post


Link to post
Share on other sites

i have followed the instructions and got to step 3

 

open catalog product_info.php

 

Place this where you would like the MoPics to show up:

 

 

 

 

when i open that file this is what i see

 

<?php

/*

$Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require('includes/application_top.php');

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);

 

$product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");

$product_check = tep_db_fetch_array($product_check_query);

 

$content = CONTENT_PRODUCT_INFO;

$javascript = 'popup_window.js';

 

require(DIR_WS_TEMPLATES . TEMPLATENAME_MAIN_PAGE);

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

?>

 

 

now im pretty sure i cant just passte that html in there

 

where do i paste this code ?

am i doing somehting wrong

i swear half the time when i try to install some contribs i cant follow the instructions due to some code mentioned that i dont have in my version...

 

i guess my version is different ?

altho as i said above its 2.2ms,

thanks

Edited by nextwave

Share this post


Link to post
Share on other sites

okay i think i wokrked it out a bit more...

the code has to go templates/content/product_info.tpl.php not catatog/product_info.php as it says in your instructions :blink:

 

now to work out how to actually get the images to display...

Edited by nextwave

Share this post


Link to post
Share on other sites

okay

ive got it sorta working http://www.templatesquad.com/product_info..../products_id/66

see the image below the top one as its handled by Dynamic MoPics

am lost as to why the larger image isnt coming up, it comes up with an error

http://www.templatesquad.com/popup_image.php/pID/66/pic/1

 

My config is as follows

 

Big Images Directory images_big/

Thumbnail Images Directory thumbs/

Main Thumbnail In Thumb Directory false

Number of Pics per Row 3

Mo Pics Extension _pic

Main Big Pic Extension _pic

Mo Pics Thumbnail Image Type gif

Mo Pics Big Image Type gif

 

Both these files below exist ?

http://www.templatesquad.com/images/thumbs...reme_1_pic1.gif

http://www.templatesquad.com/images/images...reme_1_pic1.gif

 

 

also how do you add the main thumbnail to the product with Dynamic MoPics ?

at the moment the main thumbnail on this page opens a blank window and would like it to hug the image ...

 

thanks for any help you can provide

Share this post


Link to post
Share on other sites

Hi Nextwave, I also lost the larger images on the popup.

 

I think it's related to a setting in the main configuration: where you choose to have Search Engine Friendly URLs. Turn this off and the popup images come back.

 

Now I just have to figure out how to get the images to work with the better URLs!

Share this post


Link to post
Share on other sites
Hi Nextwave, I also lost the larger images on the popup.

 

I think it's related to a setting in the main configuration: where you choose to have Search Engine Friendly URLs. Turn this off and the popup images come back.

 

Now I just have to figure out how to get the images to work with the better URLs!

that has already been answered in this thread numerous times.

 

once again, there is a problem with search engine friendly URLS where the $_GET does not work like it should. in the popup_image.php file, find all instanced of $_GET and replace with $HTTP_GET_VARS.

 

Please read the existing replies rather than being "trigger happy" and reposting the same problem that has been asked and answered a number of times in this thread alone.


The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Share this post


Link to post
Share on other sites
it has the path there ?

 

how to remove it

I do not have the popup file in front of me at the moment, but in popup_image.php is where it is echoed...

 

you can tell because it says something like "// uncomment to see path" followed by the line that spits the path out. In later versions I uncommented it by default so people could see the path it was trying to use. So just comment it out again with "//".


The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Share this post


Link to post
Share on other sites

okay got everything working a charm

next question is how do i adjust the size of the thumbnails ?

at the moment they are 100x80 and i ned them a little bit larger..

looked everywhere and couldnt find it?>

 

thanks

Share this post


Link to post
Share on other sites

well I would resize them with a graphics application so they look nice, but hey that is just me ;)

 

anyways, Admin -> Configuration -> Images: Small Image Width & Small Image Height sets up the constraints for thumbnails... I generally leave the 2 fields blank and use a graphic application to resize the thumbnails to the size I want.


The only thing necessary for evil to flourish is for good men to do nothing

- Edmund Burke

Share this post


Link to post
Share on other sites

okay got it

sorry didnt realize to look in there :mellow:

 

have it all up and rtunning now

thanks VERY much, its a FANTASTIC contrib!

Share this post


Link to post
Share on other sites

does this contribution work with the STS contribution?

 

I've installed MoPics but cant seem to figure out how to get my images to show... I'm wondering if I am able to use it with STS...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×