Jump to content
Sign in to follow this  
dreamscape

[Contribution] Dynamic MoPics

Recommended Posts

Does any one successfully get this to work on stock installation?. Please post your update installation here if you get it to work. It would be great thanks.

Share this post


Link to post
Share on other sites

Ok I got it to work!. Great contribution thanks. Below is my installation amendded to the orginal installation instruction. I hope it help some one.

 

====================================

Installation: for Stock ocsms2.2 installation

====================================

Step 1:

 

open catalog includes/filenames.php and add the following line in the

appropriate section:

 

define('FILENAME_DYNAMIC_MOPICS', 'dynamic_mopics.php');

 

====================================

Step 2:

 

open catalog includes/languages/english/product_info.php and add the line:

 

define('TEXT_NO_MOPICS', 'coming soon!');

 

repeat this step for each product_info.php language file (spanish/product_info.php, etc.)

 

====================================

Step 3:

 

open catalog product_info.php

 

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

<tr>

<td>

<?php include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?>

</td>

</tr>

 

If you want to put it below the product description and above the "This product was added.."

put it around line 187 below the:

 

<td class="main"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td>

</tr>

<tr>

<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>

</tr>

 

 

 

====================================

Step 4:

 

copy catalog popup_image.php and includes/modules/dynamic_mopics.php to their

appropirate locations. Set the permision 755

 

--Edit popup_image.php on line 61. add // or comment line 61 to remove the image path links to your picture in the

popup windows.

 

// echo DIR_FS_CATALOG . $image_path . $image_base . $image_addon . $image_ext . '<br>';

 

 

====================================

Step 5:

 

Import dynamic_mopics.sql into the database

 

====================================

Step 6:

 

If Updating from a version earlier than v2.1, delete the Dynamic MoPic

configuration variables from catalog/includes/configure.php

 

====================================

Installation is now complete. Naming scheme configuration is defined

in "Admin -> Configure -> Dynamic MoPics"

 

Note: If you see error relate to permission made sure you set the read permission. Mine is set to 755 and it work.

Share this post


Link to post
Share on other sites

Please help!

I haven't even yet run into any of the problems others have because my error is even more basic, but I don't know how to fix it.

 

Here's my error on product_info.php:

Fatal error: Call to undefined function: ?define() in /home/muchdesi/public_html/leonon/includes/configure.php on line 35

 

And here's my code from configure.php, line 35:

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

 

My images are indeed on the server in images/big_images...

Ideas are much appreciated!

Share this post


Link to post
Share on other sites

hello Jenn.

 

See that weird thing in front of define in the error? There is some weird character in the file (probably hidden from text editors) causing PHP to choke it looks like.

 

Try this: Place your cursor between the "d" and "e" of define in that line. Then hit the left arrow key once so that you know you are directly in front of the "d". Now hit backspace a few times. For good measure, it would probably be best to hit backspace until you take that line up the end of a previous line, and then hit enter to re-make the line endings.

 

Hope that helps


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

Hey, that helped, thank you so much!!

 

Of course now I get another error:

 

Warning: main(includes/modules/dynamic_mopics.php): failed to open stream: Permission denied in /home/muchdesi/public_html/leonon/product_info.php on line 118

 

 

Here's the code from product_info.php, line 118:

<td><?php include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?></td>

 

 

What could be going wrong here?? Again, thank you *so much* for any help...

Share this post


Link to post
Share on other sites

Actually I get three errors:

Warning: main(includes/modules/dynamic_mopics.php): failed to open stream: Permission denied in /home/muchdesi/public_html/leonon/product_info.php on line 118

Warning: main(includes/modules/dynamic_mopics.php): failed to open stream: Permission denied in /home/muchdesi/public_html/leonon/product_info.php on line 118

Warning: main(): Failed opening 'includes/modules/dynamic_mopics.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/muchdesi/public_html/leonon/product_info.php on line 118

 

And the code from product_info.php, line 118 is still the same:

<td><?php include(DIR_WS_MODULES . FILENAME_DYNAMIC_MOPICS); ?></td>

 

I feel like there is something basic going wrong; I've read through both support threads for this contrib and haven't seen this addressed yet. (well at least I'm unique!)

Please, ideas are appreciated, I'm at the end of my rope...

Share this post


Link to post
Share on other sites
Warning: main(includes/modules/dynamic_mopics.php): failed to open stream: Permission denied in /home/muchdesi/public_html/leonon/product_info.php on line 118

I think that means that PHP does not have sufficient permissions to open the file.

 

Check the chmod value of includes/modules/dynamic_mopics.php. Try something like 755.


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 again, Dreamscape. I've got those problems fixed and now can start on the others (which are probably addressed elsewhere on these threads).

Much obliged!

Share this post


Link to post
Share on other sites

Does any one successfullly get this thing to use the jpg or other graphic format beside the gif? I can get the gif files display but not others.

 

my configuration in the admin

 

Big Images Directory images_big/

Thumbnail Images Directory thumbs/

Main Thumbnail In Thumb Directory false

Number of Pics per Row 5

Mo Pics Extension _pic

Main Big Pic Extension _big

Mo Pics Thumbnail Image Type gif

Mo Pics Big Image Type jpg

 

 

and the picture is in the right format and naming convention. I can only get the picture to show when the "Mo Pics Big Image Type jpg" is set to gif and yet i have both set in gif and jpg format.

 

Thanks for all your input

Share this post


Link to post
Share on other sites

Hey there! I have a problem with Dynamic Mopics, the path resets to the image root directory no matter how many times i specify it in a product listing image field. PLEASE HELP!

Share this post


Link to post
Share on other sites

Problem: Dynamic Mopics is looking in the right directory, but isn't including the name of the image file in the path.

 

So if my image name is ABC.jpg, as uploaded into the admin,

 

inside of thumbs and images_big I've got abc.jpg, abc_1.jpg, abc_2.jpg.

 

Underscore is set to be the extension.

 

On the product info page (I put in that 'hack' where it shows you the path d.mopics is looking for) it has the proper image path, but is looking for a file named "_1.jpg" - somehow it lost the ABC along the way.

 

I had this contrib working in one directory path on my server, but I've moved to a new directory and export/imported my database into a fresh one, and this contrib stopped working. I've checked every setting I can think of and have checked it against my old install where it works just fine, but can't see a difference anywhere. My 'original' image pop-up works fine.

 

Any clues? Thanks.

Share this post


Link to post
Share on other sites
Any clues? Thanks.

URLs and the configuration parameters are always helpful... otherwise I am just shooting in the dark, and I'm not doing that.


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

Unfortunately, I can't put out an URL right now, but I'll copy in whatever code would be helpful - what snippets would make it easiest to diagnose?

 

Big Images Directory

images_big/

 

Thumbnail Images Directory

thumbs/

 

Main Thumbnail In Thumb Directory

false

 

Number of Pics per Row

4

 

Mo Pics Extension

_

 

Main Big Pic Extension

 

Mo Pics Thumbnail Image Type

jpg

 

Mo Pics Big Image Type

jpg

 

Above is how I have my settings in the admin. My files are set up so that the original thumbnail uploaded in the catalog admin is in the catalog/images folder, and then inside of /images/thumbs there is ABC.jpg (a duplicate of the file uploaded through admin), ABC_1.jpg, ABC_2.jpg, ABC_3.jpg & then the same file names are duplicated in the /images/images_big folder (with full size images, of course)

 

I had this working perfectly with my old database, but I needed to move directories and now I just get 'coming soon!'. I've checked permissions of the files, the folder, etc...

 

I 'installed' that little hack that tells me what path dynamic mopics is looking for, and it's pointing to the right thumbs directory, but is looking for a file named " _1.jpg " - somehow it's forgeting the name of the original uploaded image file.

 

Thanks for any help, I appreciate it.

Share this post


Link to post
Share on other sites

Update to above post:

 

I now have two products in my catalog - Son & Von.

 

Both products original thumbnail image, uploaded into the admin is son.jpg & von.jpg, respectively.

 

I added Son to the database first, and with it, dynamic mopics is looking for thumbnails named "_1.jpg" , etc (so "_2.jpg", "_3.jpg" etc) - if I change my filenames to that then it works. I have to keep my big images named the full name though ("son_1.jpg", "son_2.jpg", etc).

 

I added a second product, Von, to the database. On it's product page, dynamic mopics is looking for thumbnails named "v_1.jpg, v_2.jpg" etc... - if I change my thumbs to that then they appear. I also have to keep my big images with their full name ("von_1.jpg") for them to appear properly.

 

I also tried adding a third product, Manic, with similar file structure (manic.jpg, manic_1.jpg, etc for both thumbs & big images). On the product info page, it makes the connection between the uploaded through admin picture (manic.jpg thumbnail in the main /images directory) and its big picture (/images/images_big/manic.jpg), but for the additional images, it is looking for a thumbnail named "ma_1.jpg" instead of "manic_1.jpg".

 

Not sure if that helps diagnose the problem or not, but it sure seems weird to me that the program is (randomly?) only looking for either zero, one, or two of the first characters in the filename as opposed to the entire thing.

 

Thanks for any help.

Share this post


Link to post
Share on other sites

dynamic mopics no longer works with php 4.3.8, i am waiting for someone to fix it as i cant code. It resets the path of the images no matter what configyou have it on.

 

Dreamscape, please help. Your the only one that can fix it.

 

I will give you my login details so you can check the problem out yourself if you want. The page was working great until my host updated the php version (security fixes) broke compability with mopics. Please help man, ive been unable to work on the page for months now.

Edited by eddyxp

Share this post


Link to post
Share on other sites

Eddy - How does it not work with 4.3.8? That's what my server is running, and I have it working fine - it doesn't reset the path or anything.

 

Now, *how* I got it working is another thing all together - I just followed the instructions and somehow it worked - but I've followed them a couple of other times without any success whatsoever - so I unfortunately couldn't tell you why my install is working - but I can verify it absolutely is.

 

This is a great contrib, but wow is it finicky. Sure wish I could code to try and help iron it out :)

Share this post


Link to post
Share on other sites

1st what version are you running (are you on the latest version)?

 

and 2nd it is not "finicky" and there is nothing magical about getting it to work. If you understand how it works and set it up correctly, it is very simple.

 

I have always been able to correctly set it up in a matter of minutes for people who can't seem to figure it out.


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
Unfortunately, I can't put out an URL right now

is it possible you could PM me a URL?

 

also, what version of the contrib. are you running? Make sure you are on the newest version.


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
dynamic mopics no longer works with php 4.3.8...

 

Dreamscape, please help. Your the only one that can fix it.

newest version works fine on php 4.3.8

 

also I can't access the URL you PMed me. I'd love to help, but again, I can't possibly help when I'm metaphorically blind.


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

dreamscape -

 

I got it to work on the first database I had running - gave up on the second and just reverted to the first (long story, not important).

 

I mean no offense when I say this contrib is finicky, but when there are pages after pages of people saying that their settings look correct but still aren't getting images to show up, then that seems finicky to me. Again - not slighting your work at all - very appreciative in fact.

 

I realize it must be frustrating when everybody can't "seem to figure it out", but since it seems like there is a higher ratio of people that have problems with this contrib than many others, perhaps better install instructions would help lower everybody's need to get help from you. We're only trying to utilize your hard work - not frustrate and annoy you. If I understood how it all worked I would be more than willing to help, but I'm pretty clueless with the behind-the-scenes.

 

Anyways, thanks again for helping us all utilize this contrib.

 

I'm running v2.2 on php 4.3.8, FYI.

Share this post


Link to post
Share on other sites
dynamic mopics no longer works with php 4.3.8, i am waiting for someone to fix it as i cant code. It resets the path of the images no matter what configyou have it on.

 

I am having this same problme since upgrading to php 4.3.8. I am running Dynamic MoPics version 2.2.

 

Not only does the path of the images get reset, but the dummy image file that is created in the images folder (instead of images/thumbs where I told it to do it) has the owner and group of "apache". Weird.

 

Tracy Gibson

Edited by tntmom5

God Bless,

Tracy Gibson

Share this post


Link to post
Share on other sites

After doing some more testing. The only problem I seem to have with Dynamic MoPics and PHP 4.3.8 is when I have the mail thumb in the thumbs directory.

 

For example, when I indicate that the main thumb is in the thumbs directory the procedure for adding images to a product is to type thumbs/imagename.gif in the box on the add images page. When I do this the problem occurs where the image is put in images not images/thumbs and the file is owner/group "apache." The image then does not show up.

 

If I instead, just use the browse button to upload the images or just type imagename.gif in the box. And have my Dynamic Mopics set to look for the main thumb in the images directory, I have no problem. I am going to set up all my stores that way to avoid this problem.

 

I will post if I have any other revelations. :)

 

Tracy


God Bless,

Tracy Gibson

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  

×