Jump to content



Latest News: (loading..)

- - - - -

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2


  • Please log in to reply
1575 replies to this topic

#41   docprego

docprego
  • Members
  • 193 posts
  • Real Name:Mike
  • Location:Henderson, Nevada

Posted 20 December 2005 - 02:38 AM

View Postsurfalot, on Dec 19 2005, 04:23 PM, said:

I don't have the ability to see your code, so I can't tell you what was missed or misplaced. This has worked well on a default install of osCommerce and many other non-default installations, and by your admission, other sites you work on.

The code I pointed out earlier is the code that facilitates the functionality your missing. You need to check and make sure it is in the correct position in your code. If your code is modified, it would not necessarily be the same line number. If you check the delete image box and save, and the image is still there, this is the code that does it.

When this works correctly, you will see the images you are trying to delete on the confirmation page. But once you submit the confirmation page, the block of code starting at line 230 will remove those images and the references in the database.

Surfalot,

I think I owe you a huge apology, I was being premature in assuming that the images were not being deleted.  As you said they show on the confirmation page but after clicking update they are in fact deleted with one exception.  This does not work for the first image titled "Products Image" above "Products Image1".  This file does not delete but can be replaced by selecting another image.

Another quirk I have come across is that if my image name contains the character ' then the image will not save properly and be displayed in my product page.  In fact it turns out that on my server a file gets uploaded with a strange filename.  For example if I try to upload King's.gif then the image does not work and what appears on the server is a file named King\'s.gif.  this file cannot be deleted, renamed or moved.  I have to go to my host control panel to delete it.  Of course the simple fix is to rename the files before selecting them which is really not an issue.

Please remember I am not complaining, I am just letting you know about 2 quirks I have run across.  Neither of which changes the fact that I could not have my site as I want it without your great piece of work.

Thank you.

#42   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 20 December 2005 - 03:36 AM

View Postdocprego, on Dec 19 2005, 09:38 PM, said:

This does not work for the first image titled "Products Image" above "Products Image1".  This file does not delete but can be replaced by selecting another image.
Now that's a genuine oversight.


here's the fix. Add this just above the code that starts on line 230 of admin/categories.php:
		  //add delete image function
 		  if ($HTTP_POST_VARS['delete_image_1'] == 'yes') {
				unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_image]);
				$sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
		  }
		  //end delete image function

View Postdocprego, on Dec 19 2005, 09:38 PM, said:

Another quirk I have come across is that if my image name contains the character ' then the image will not save properly and be displayed in my product page.
That's not really an issue with MoPics specifically. The osC/html/php/MySQL necessitates converting quotes to backslash-quotes so the code doesn't break.  You'd be best off avoiding any non-alphanumeric characters when naming files for web. The dash, underscore and period are the only non-alphanumeric chars that are legal in web urls and file names.

#43   docprego

docprego
  • Members
  • 193 posts
  • Real Name:Mike
  • Location:Henderson, Nevada

Posted 20 December 2005 - 05:09 AM

View Postsurfalot, on Dec 20 2005, 03:36 AM, said:

Now that's a genuine oversight.
here's the fix. Add this just above the code that starts on line 230 of admin/categories.php:
		  //add delete image function
 		  if ($HTTP_POST_VARS['delete_image_1'] == 'yes') {
				unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_image]);
				$sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
		  }
		  //end delete image function
That's not really an issue with MoPics specifically. The osC/html/php/MySQL necessitates converting quotes to backslash-quotes so the code doesn't break.  You'd be best off avoiding any non-alphanumeric characters when naming files for web. The dash, underscore and period are the only non-alphanumeric chars that are legal in web urls and file names.

Thaks Surfalot that perfectly fixed it!  Now it is the ultimate!  I do understand now that the other quirk is a OSC/HTML/PHP?SQL issue and not a morepics issue.  So that fix makes the contribution perfect!

Thanks for the contribution and the incredible support.

#44   fan4chevy

fan4chevy
  • Members
  • 367 posts
  • Real Name:Charles

Posted 22 December 2005 - 08:31 PM

Nice contribution,Thanks.

With that said, I am finding a few things that may be a consideration of changing.

1.) It would be nice to be able to have the first image large and then the remaining as thumbnails.

#45   BoulderDash

BoulderDash
  • Members
  • 122 posts
  • Real Name:Mark P.

Posted 27 December 2005 - 07:58 PM

View Postsurfalot, on Dec 20 2005, 03:36 AM, said:

Now that's a genuine oversight.
here's the fix. Add this just above the code that starts on line 230 of admin/categories.php:
		  //add delete image function
 		  if ($HTTP_POST_VARS['delete_image_1'] == 'yes') {
				unlink(DIR_FS_CATALOG_IMAGES . $HTTP_POST_VARS[products_image]);
				$sql_data_array['products_image'] = tep_db_prepare_input($HTTP_POST_VARS['none']);
		  }
		  //end delete image function


Is this needed after downloading "more_pics_6_v1.1b" or is it already in that release (which I'll be putting in later tonight)?

Thanks,
BD

#46   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 27 December 2005 - 09:11 PM

View PostBoulderDash, on Dec 27 2005, 02:58 PM, said:

Is this needed after downloading "more_pics_6_v1.1b" or is it already in that release
That fix is need for 1.1b.  Should be the only one known at this time.

Edited by surfalot, 27 December 2005 - 09:12 PM.


#47   BoulderDash

BoulderDash
  • Members
  • 122 posts
  • Real Name:Mark P.

Posted 27 December 2005 - 11:07 PM

So,
It should be added above this:

// BOF: More Pics 6
		  if (isset($HTTP_POST_VARS['products_subimage1']) && tep_not_null($HTTP_POST_VARS['products_subimage1']) && ($HTTP_POST_VARS['products_subimage1'] != 'none')) {
			$sql_data_array['products_subimage1'] = tep_db_prepare_input($HTTP_POST_VARS['products_subimage1']);
		  }

etc. etc. etc.

Thank you,
BD

#48   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 28 December 2005 - 01:38 AM

immediately following the:

// BOF: More Pics 6

Should be at the top of that block of MorePics code.

Edited by surfalot, 28 December 2005 - 01:39 AM.


#49   juliatrops

juliatrops
  • Members
  • 33 posts
  • Real Name:Julia Trops

Posted 28 December 2005 - 05:52 AM

hi there...
I am just setting up a store, and am *very* new to all of this...

I have Easy populate installed, seems to be okay - and I just installed More_pics_6 v1.1b for osC 2.2 MS2 today - though I seem to remember installing something called Extra Images last week - it is all beginning to be a blur...

I followed the directions - they are very clear!! The query in step 1 ran great - in step 2, I adjusted files into their proper directory (I think!) - the product_info was updated from another contrib, but I cant remember what it was -  :o and it is overwritten -

Step 3 was a bit confusing, cuz I wasnt sure where in the /languages/english.php to put the little block of code, does it matter?

Step 4 as well, I didnt know where to put it, so I put the code in a section that started with TABLE, paying attention to the braces...{  }

Step 5 I dont know where I would find this in the popup_image.php file...?

Okay, so having all that done,

Where can I find how to access this in my osC admin table? I have the link in the table for Extra images, but  I have about 300 or so artworks to upload, with a couple of images each, and I would like to use EP as well... would this be the v_products_mimage, v_products_bimage etc.. and what is the difference between all of those?

My apologies, I am not a programmer, but I would really appreciate any help you can give.
Hope I am making sense!
Thank you very much!
Julia Trops

#50   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 28 December 2005 - 06:34 AM

I don't think this contrib would be able to coexist with Extra Images.  I have thought about extending this to handle SM-MD-LG images for each, but that is as far as it has gone. You need to be careful about which contribs you pic and do some forethought.  Mixing contribs that target the same area of osC can be difficult to get working, if it can be done at all.  Such as, More Pics and Extra Images.

View Postjuliatrops, on Dec 28 2005, 12:52 AM, said:

the product_info was updated from another contrib, but I cant remember what it was
Extra Images maybe?

View Postjuliatrops, on Dec 28 2005, 12:52 AM, said:

Step 3 was a bit confusing, cuz I wasnt sure where in the /languages/english.php to put the little block of code, does it matter?
anywhere is fine.

View Postjuliatrops, on Dec 28 2005, 12:52 AM, said:

Step 4 as well, I didnt know where to put it, so I put the code in a section that started with TABLE, paying attention to the braces...{  }
Anywhere is fine, as long as you didn't put the block inside another set of braces already there.

View Postjuliatrops, on Dec 28 2005, 12:52 AM, said:

Step 5 I dont know where I would find this in the popup_image.php file...?
You can find the collor to change by searching for #666666 in
catalog/popup_image.php. that line has the <hr> tag you can
modify the size="" (width of the line) and the color="#666666"
(color of the divider line)

View Postjuliatrops, on Dec 28 2005, 12:52 AM, said:

Where can I find how to access this in my osC admin table?
Admin table?  If you are looking for the few configure options they are in your osC administrator under Configuration -> More Pics

View Postjuliatrops, on Dec 28 2005, 12:52 AM, said:

v_products_mimage, v_products_bimage etc.. and what is the difference between all of those?
v_products_mimage, v_products_bimage are part of Extra Images. More Pics does not utilize those entry fields.


View Postjuliatrops, on Dec 28 2005, 12:52 AM, said:

I have about 300 or so artworks to upload, with a couple of images each, and I would like to use EP as well... would this be the v_products_mimage, v_products_bimage etc.. and what is the difference between all of those?
I have not programmed a patch for Easy Populate. At the moment you would have to populate the store with EP (only specifying v_products_image), then use the osC product editor to add any additional images. Since you overwrote the products_info.php anything you put in v_products_mimage, v_products_bimage will not show on the site when you are done. If you overwrote the catalog/admin/categories.php then likewise, the osC product editor would not have a place to add or change those images either (v_products_mimage, v_products_bimage).

#51   juliatrops

juliatrops
  • Members
  • 33 posts
  • Real Name:Julia Trops

Posted 28 December 2005 - 07:28 AM

Hi Surfalot!
Thank you very much for your help.

Found the More Pics under Configuration thank you! - yes, I didnt know what else to call that group of options, so Admin table was what I came up with...

I like the Anywheres.. that makes things easy..

I wasnt able to get the extra images working *at all* in EP because I couldnt figure out the v_product_ stuff - I may keep trying - my goal is to have this store and page in place by New Year's.. so I have a bit of time.

Thank you for your help!!
Wish me luck!
Julia

#52   killerwhale65

killerwhale65
  • Members
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 29 December 2005 - 12:57 PM

hi,

I was wondering how this produc deals with thumbnail? Is there a possibility to make the thumbnails yourself or are they just resizes?

thanks!
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#53   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 30 December 2005 - 07:26 AM

View Postkillerwhale65, on Dec 29 2005, 07:57 AM, said:

I was wondering how this produc deals with thumbnail? Is there a possibility to make the thumbnails yourself or are they just resizes?
currently this is just a simple no-thumbnail multiple-image contrib. It works as the original osC code does with resizing images in the HTML. I am considering adding some kind of thumbnail option because of the number of questions. If you have any good ideas, let'r rip.

#54   killerwhale65

killerwhale65
  • Members
  • 212 posts
  • Real Name:Matthias Thoen
  • Location:Belgium

Posted 30 December 2005 - 12:06 PM

View Postsurfalot, on Dec 30 2005, 08:26 AM, said:

currently this is just a simple no-thumbnail multiple-image contrib. It works as the original osC code does with resizing images in the HTML. I am considering adding some kind of thumbnail option because of the number of questions. If you have any good ideas, let'r rip.

Well, what i am looking for is the posibility to combine a multi-photo upload with a multi-size-per-photo possibility. So for example 3 different photos for one product, and each picture in 2 sizes. As the standard "resizing" is not a real resize, and as the quality of GD-resized pictures is too low, i am looking to create my own thumbnails and upload them myself (for example in a subfolder called /thumbs).

So in short (example): with three pics per product and each pic in 2 sizes, i would upload 6 pics per product, and no resizes would have to be done in OSC.
Matthias Thoen
my contribution: Photo Gallery for osCommerce
--check my homepage in my CARD--

#55   fan4chevy

fan4chevy
  • Members
  • 367 posts
  • Real Name:Charles

Posted 30 December 2005 - 08:51 PM

Initial Image Larger---- Image Description Under Images--

Hi,

I am wondering if there is an effort or upgrade on the way that will enable the initial image to be larger lets say like 200x200 for example while the remaining 6 images are 100x100?

Also wondering if anything is in progress to have an image description under each of the added images? This would allow for a small description of the added picture. Right now it just says click to enlarge.

#56   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 31 December 2005 - 01:36 AM

View Postfan4chevy, on Dec 30 2005, 03:51 PM, said:

Initial Image Larger---- Image Description Under Images--
not by myself at the moment. I'm currently busy on finalizing a couple other contrib versions.

the single larger image would be a *relatively* easy addition.

Thumbnails (suggested earlier) and Description on the other hand are changes that should be considered carefully. Adding both of those would add another 14 fields to the product. That with the original 6 additional image fields would be asking folk to add 20 fields per product to their databases. That's a lot of database and code bloat.

This contrib was originally designed with more of a quick and dirty fix. I just cleaned, fixed and updated it a little, while preserving it's simplicity, after the original contrib didn't quite fit a client's needs.

I have been thinking about these and maybe some other additions/changes, but the code and database elements need a bit of rearrangement to be efficient. And to do all that would make it full code reinstall for current users and a conversion script to rearrange the database elements.  At that point, moving it to a forked project might also be considered since the changes would make it incompatible with the current project.

So, I'm at a bit of an ethical impasse on this project right now.  We *could* put more time into it down the bloat road. Or we could take a slightly new direction that would provide more flexibility and options. Done right it would be unlimited images per product.

#57   fan4chevy

fan4chevy
  • Members
  • 367 posts
  • Real Name:Charles

Posted 31 December 2005 - 04:25 AM

I have an idea.

How about if you offered the contribution in two seperate ways.

1.) Exactly as it is.

2.) A version with the main image larger, image descriptions for the thumbnails.

This would enable those who just want a simple added image contrib to still have the option.

#58   ckarlo

ckarlo
  • Members
  • 7 posts
  • Real Name:Casper

Posted 02 January 2006 - 01:41 PM

I have just tried to upload an image after installing this contribution, but i get this error:

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/shop/admin/includes/languages/danish.php:317) in /var/www/html/shop/admin/includes/functions/general.php on line 18

Can anyone tell me what is wrong?

Kind Regards

Casper

#59   surfalot

surfalot
  • Members
  • 2,295 posts
  • Real Name:Todd Holforty
  • Gender:Male
  • Location:I'm right here!

Posted 02 January 2006 - 03:18 PM

you have some characters outside of the start or end <?php  ?> tags in your /var/www/html/shop/admin/includes/languages/danish.php file.  all include files must start with <?php and end with ?>  Nothing can be outside of those tags.

#60   fan4chevy

fan4chevy
  • Members
  • 367 posts
  • Real Name:Charles

Posted 02 January 2006 - 08:08 PM

I successfully installed the 6Images Mod. However, on mine the parent image is small just as the sub images. Is
there a way to have the sub images remain small and have the parent one remain its default larger size?