Jump to content
Sign in to follow this  
dreamscape

[Contribution] Dynamic MoPics

Recommended Posts

What does it do?

 

I absolutely loved the idea of the MoPics contribution, but adding 16

images in the admin section for each product grew rather tedious. I

noticed that all of my images followed a pattern, so I wrote this code.

 

Now only ONE image is needed to be defined in the admin. The rest of the

images will appear on the product_info.php page if they exsist.

 

Please not you do not have to follow my naming scheme. You can come up with

your own variations, as the script is flexible in that way. Mine is just an

example to follow. More on the naming scheme later. For now let's install it.

 

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


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 Joshua ... maybe this will get me past this break point I am in on the images right now ... :D

Share this post


Link to post
Share on other sites

version 1.21 is up now.

 

there were some problems discovered with v1 for some users... main thing being that most users probably have their main thumb in images/ and not images/thumbs.

 

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


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 working with several people on different problems they were having, Dynamic MoPics v2.0 is here!

 

Why jump to version 2.0? The code has been very much optimized for much much faster parsing time. v2.0 also conatins all previous bug fixes in versions 1.0 - 1.21

 

MAX_DISPLAY_THUMBS is now obsolete. you are only limited by how many extra thumbs u think you can handle making ;)

 

The display code will only be run based on how many extra thumbs it finds rather than MAX_DISPLAY_THUMBS.

 

*Note* if upgrading, just overwrite the popup_image and dynamic_mopics files

 

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


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

 

I'm installing v2.01 on MS1 and I am having problems displaying the images, my popup window comes back empty. I've checked through all the steps and can't find the problem.

 

Did anyone else have similar problems?


K

.....................................................................

When the going get's tough,

the tough get going.

Share this post


Link to post
Share on other sites

All sorted now, thanks.

 

Silly mistake :oops: (of course), had the big image as the main product images in the database.


K

.....................................................................

When the going get's tough,

the tough get going.

Share this post


Link to post
Share on other sites

I installed the Mopoics 2.1 version on the the 2/17/03 snapshot and am not getting it to work. It does display "coming soon!" in the product info page. Cant get it to display images though. Is there a SQL database that was suppose to come with this or what? Im at the end of my rope with this contribution and after reading many posts that go unanswered it seems many others as well. If u have the time to help me out i would greatly appreciate it, and so would others installing the new version.

Share this post


Link to post
Share on other sites

I followed the instructions and it worked. Just check that your images are where they should be, with the extension specified in the configure.php file (jpg is the default). The thumbs images are the ones displayed initially, when you click on the thumb then the images_big files are used.

 

Make sure that the products table in the database has the url of the image correctly set as well.

 

When I read the instructions properly it all worked like a dream. I think it's a great contribution, nice and simple!


K

.....................................................................

When the going get's tough,

the tough get going.

Share this post


Link to post
Share on other sites

I installed Dynamic_MO_PICS.

 

My Image files are located at

image/xyz.jpg

thums/xyz_screen1.jpg

 

Both xyz & xyz_screen1 showup at product info.

 

Problem is the link.

 

click enlage at the btm of xyz works fine. (popup xyz)

click enlare xyz_screen1 shows xyz instead of xyz_screen1.

 

Any suggestion ?

Share this post


Link to post
Share on other sites

a link please and your dynamic mo_pic parameters in configure.php


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

my link is

 

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

 

The configure.php mo_pics is

  define('IN_IMAGE_BIGIMAGES','images_big/'); //directory inside catalog/images where your big images are stored

 define('IN_IMAGE_THUMBS', 'thumbs/'); //directory inside catalog/images where you mopic thumbs are stored..

 define('MAIN_THUMB_IN_SUBDIR', [b]false[/b]); //if you store your main thumb in the above directory set this true.  if its in the main image dir, set it false

 define('THUMBS_PER_ROW', '4');

 define('MORE_PICS_EXT', '_screen');

 define('BIG_PIC_EXT', ''); // this is if you name your big thumb like IMAGE_big.jpg, you would put '_big' here.  otherwise leave it blank

 define('THUMB_IMAGE_TYPE', 'jpg'); //the extention for the extra thumbnail images (jpg, gif, bmp, png, etc...)

 define('BIG_IMAGE_TYPE', 'jpg'); //the extention for your big images (jpg, gif, bmp, png, etc...)

 

I placed RMC1_scree1.jpg in both images and big_images and

the results are same. When mouse are one the image is

1st image

--- popup_image.php?pID=30'

2nd image

--- popup_image.php?pID=30&pic=1'

Share this post


Link to post
Share on other sites

ok for starters in:

define('MAIN_THUMB_IN_SUBDIR', [b]false[/b]);

 

why are there 's around false?? that should just read:

define('MAIN_THUMB_IN_SUBDIR', false);

 

secondly http://www.valvetech.com/sams/images/image...mc1_screen1.jpg does not even exsist, so how can the module find it to show it if its not there?


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

did you replace popup_image.php with the one included in the contribution??

 

it does not look like it.


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 for quick response.

 

1. I try to highlited "false". It didn't work..

 

2. I put the images back to big_images directory

and uploaded popup_image.php again.

 

It works.... :lol:

I must be missed something...

It's the contribution that I really needed as you see at the page.

 

Thanks. again..

 

don

Share this post


Link to post
Share on other sites

don,

 

very cool...

 

I noticed almost right away when I went to your site and the 2nd popup showed the 1st thumbnail, it could not be the popup_image for the mopics, because the popup_image for the mopics will show the thumb for the extra pic clicked on if it cannot find the big image.

 

and also the popup_image for my mopics is so that you can click on the image to close the popup, and at the time yours was not like that, so again, it had to be the wrong the popup_image...

 

glad it works for ya now!


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 Josh, I am having a similar problom that was mentioned in a previous post - I could swear I have check and rechecked everything 4 times and still can't get my second image to appear.

 

this is an adult video store - still in development -

 

http://www.nastylittlestore.com/catalog/pr...products_id/137

 

// define dynamic mopics

 define('IN_IMAGE_BIGIMAGES','images_big/'); //directory inside catalog/images where your big images are stored

 define('IN_IMAGE_THUMBS', ''); //directory inside catalog/images where you mopic thumbs are stored..

 define('MAIN_THUMB_IN_SUBDIR', false); //if you store your main thumb in the above directory set this true.  if its in the main image dir, set it false

 define('THUMBS_PER_ROW', '1');

 define('MAX_DISPLAY_THUMBS', '4');

 define('MORE_PICS_EXT', '_pic');

 define('BIG_PIC_EXT', ''); // this is if you name your big thumb like IMAGE_big.jpg, you would put '_big' here.  otherwise leave it blank

 define('THUMB_IMAGE_TYPE', 'jpg'); //the extention for the extra thumbnail images (jpg, gif, bmp, png, etc...)

 define('BIG_IMAGE_TYPE', 'jpg'); //the extention for your big images (jpg, gif, bmp, png, etc...)

 

any suggestions you could offer would be greatly appreciated.

Share this post


Link to post
Share on other sites

Venus, from the info you have given me, the 2nd thumb would be:

 

http://www.nastylittlestore.com/catalog/im...AW2DVD_pic1.jpg

 

but that image does not exsist, so the module cannot show it.

 

the big image is there:

http://www.nastylittlestore.com/catalog/im...AW2DVD_pic1.jpg

 

But what you have defined the thumb to be, does not exist, so how can it show it?


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

Josh, the back cover thumbs were still in /images/thumbs (which I couldnt get to work) so I moved everything into /images

 

but still not working... I double checked to make sure the match to this one was in there. (we discovered we missed a couple)

 

any suggestions???

Share this post


Link to post
Share on other sites

Hi!

 

Mm, now its my turn to try and get this to work.

 

I have installed Dynamic MoPics v2.01,but i cant seem to get it to work.

 

This is my includes/configure.php

define('IN_IMAGE_BIGIMAGES','images_big/'); //directory inside catalog/images where your big images are stored

define('IN_IMAGE_THUMBS', 'thumbs/'); //directory inside catalog/images where you mopic thumbs are stored..

define('MAIN_THUMB_IN_SUBDIR', false); //if you store your main thumb in the above directory set this true. if its in the main image dir, set it false

define('THUMBS_PER_ROW', '4');

define('MORE_PICS_EXT', '_screen');

define('BIG_PIC_EXT', ''); // this is if you name your big thumb like IMAGE_big.jpg, you would put '_big' here. otherwise leave it blank

define('THUMB_IMAGE_TYPE', 'jpg'); //the extention for the extra thumbnail images (jpg, gif, bmp, png, etc...)

define('BIG_IMAGE_TYPE', 'jpg'); //the extention for your big images (jpg, gif, bmp, png, etc...)

 

 

I have change all the other files of course.

 

My folders are

catalogImages

catalogImagesimages_big

catalogImagesthumbs

 

Where should i place the diffrent files and how?

Could someone try to sort the things out for me, i be really happy :D ?

(with a simple yes or no)

 

The main thumbnail file goes in "images",because i have put false in my configure.php?

Should this file be a thumbnail size?

If a named the file image.jpg should the big image be named image.jpg and be in "images_big" folder (but be a full size picture?)

 

My second image thumbnail should be placed in "thumbs" folder and be called image_pic1.jpg (and be a thumbnail size image)?

And when you click this picture is should show the big picture named image_pic1.jpg (full size images) that i have in "images_big" folder?

 

I only see "comming soon!" when i try to add a second pic, maybe because i have no clue of what picture to put where (yes i have read the "Now A word on the naming scheme" to many times but i still cant get it to work :cry:

 

Thanks in advance.

 

/Anneli

Share this post


Link to post
Share on other sites
The main thumbnail file goes in "images",because i have put false in my configure.php?

Should this file be a thumbnail size?

that is correct. it goe sin just "images" since you set that to false. And yes it is a thumbnail size

 

If a named the file image.jpg should the big image be named image.jpg and be in "images_big" folder (but be a full size picture?)

yes

 

My second image thumbnail should be placed in "thumbs" folder and be called image_pic1.jpg (and be a thumbnail size image)?

And when you click this picture is should show the big picture named image_pic1.jpg (full size images) that i have in "images_big" folder?

that is correct, however your configuration says other wise. you have MORE_PICS_EXT set as "_screen". if you are naming your images image_pic1.jpg, etc... you would want to set 'MORE_PICS_EXT' to '_pic'.

 

I only see "comming soon!" when i try to add a second pic, maybe because i have no clue of what picture to put where (yes i have read the "Now A word on the naming scheme" to many times but i still cant get it to work

you have everything in an ok place and named ok. You just have not set up the configuration correctly. 'MORE_PICS_EXT' should be '_pic' if that is what you are adding to the end of your extra images.


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

well I still didnt get mine to work, but I found an alternate solution.

 

I changed the configuration to show only one thumb and changed the big_Images extension to _pic1 and so now when someone clicks on the front cover thumb image - the big back cover opens.

 

I also changed the link below to read "Click for back cover"

Share this post


Link to post
Share on other sites

Nice contrib :)

 

Just for people with older snapshots you'll need to change $product_info to $product_info_values in dynamic_mopics.php

 

hth

Share this post


Link to post
Share on other sites

i still can't get it to work. must be me though :(

 

i have:

 

catalog/images/cdrom.jpg

catalog/images/thumbs/cdrom_pic1.jpg

catalog/images/images_big/cdrom_big1.jpg

 

  define('IN_IMAGE_BIGIMAGES','images_big/'); //directory inside catalog/images where your big images are stored

 define('IN_IMAGE_THUMBS', 'thumbs/'); //directory inside catalog/images where you mopic thumbs are stored..

 define('MAIN_THUMB_IN_SUBDIR', false); //if you store your main thumb in the above directory set this true.  if its in the main image dir, set it false

 define('THUMBS_PER_ROW', '3');

 define('MORE_PICS_EXT', '_pic');  // this is the name of the extra images ext

 define('BIG_PIC_EXT', '_big'); // this is if you name your big thumb like IMAGE_big.jpg, you would put '_big' here.  otherwise leave it blank

 define('THUMB_IMAGE_TYPE', 'jpg'); //the extention for the extra thumbnail images (jpg, gif, bmp, png, etc...)

 define('BIG_IMAGE_TYPE', 'jpg'); //the extention for your big images (jpg, gif, bmp, png, etc...)

 

am i missing the point or?

 

thanks, zlack


It's easier to remember, then to forget

Share this post


Link to post
Share on other sites

oops! the false in the code abose was nearly testing. it is actually true.


It's easier to remember, then to forget

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  

×