Jump to content
surfalot

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2

Recommended Posts

Thanks! Is it possible to do it through admin? The site is for a friend and I don't think he is able to upload straight....

you can try using the osCommerce file manager.

Share this post


Link to post
Share on other sites

Hi Surfalot,

 

I've got the thumbnail quick fix working sweet on my product_info, product_listing, and new_products, thanks!

 

One quick question, canthe same be done for the specials infobox that's on the main page?

 

Cheers

Share this post


Link to post
Share on other sites
Hi Surfalot,

 

I've got the thumbnail quick fix working sweet on my product_info, product_listing, and new_products, thanks!

 

One quick question, canthe same be done for the specials infobox that's on the main page?

 

Cheers

yes, you can make this work anywhere a small image is used. you have to find whatever var the image is represented by and replace with the code, example from the doc:

 

## open: /catalog/includes/modules/product_listing.php

## replace 2 occurrances of:

 

$listing['products_image']

 

## with:

 

(file_exists(DIR_WS_IMAGES.str_replace( '.','_s.',$listing['products_image']))?str_replace( '.','_s.',$listing['products_image']):$listing['products_image'])

 

 

Just replace "$listing['products_image']" everywhere above with the var you find in other pages.

Share this post


Link to post
Share on other sites

Hi every one , im new to this place .

 

First of all i would like to thanks 1000 times surfalot for this great contrib !!!

 

Well i'm also a newbi to PHP but i wanted to modifiy this code to put more than 6 images to my site so i modified it to 9 more extra images.

 

The best thing is guys, I could combine this great module with the great LIGHTBOX effect so no popup now all images in the same page with the lighteffect.

 

So if you are interested in guys i can post the code for you.i'm asking you this coz it made me mad to combine them to gether so im sure that there some other users like me who would like to have this cool effect with all extra images.

 

Request : if i upload this modification to the contib page am i able to change the original name of this module which is MORE PICS 6 to MORE PICS 9??? just a question if "surfalot" doesn't like this no matter lets forget it.

 

have a look to the modification online : http://srilankanauto.com

Edited by matrix_france

Share this post


Link to post
Share on other sites
Hi every one , im new to this place .

 

First of all i would like to thanks 1000 times surfalot for this great contrib !!!

 

Well i'm also a newbi to PHP but i wanted to modifiy this code to put more than 6 images to my site so i modified it to 9 more extra images.

 

The best thing is guys, I could combine this great module with the great LIGHTBOX effect so no popup now all images in the same page with the lighteffect.

 

So if you are interested in guys i can post the code for you.i'm asking you this coz it made me mad to combine them to gether so im sure that there some other users like me who would like to have this cool effect with all extra images.

 

Request : if i upload this modification to the contib page am i able to change the original name of this module which is MORE PICS 6 to MORE PICS 9??? just a question if "surfalot" doesn't like this no matter lets forget it.

 

have a look to the modification online : http://srilankanauto.com

 

 

I'm sure there are many folks that want to see a complete integration with the lightbox. Under the GNU rules and this community you may do what you are asking. renaming is up to you, you can rename and post to a new contrib if you want or back to this one. Might get lost if you start a new contrib. All I ask is to make sure the docs are updated with anything that needs to be. Maybe even an upgrade doc for those that have the version you started with. B)

Edited by surfalot

Share this post


Link to post
Share on other sites

Hee heee Great then , Thank you surfalot for these informations.

 

Im faceing a lil problem because ive done this contrib for a modified OSC version , so i can't send my files that's why im doing a full new contribe pack for the orignal version of OS.

 

Actually im making it :rolleyes: :rolleyes:

Share this post


Link to post
Share on other sites

What are main differences between this More_Pics contribution and this UltraPics one?

 

That one has screenshots clearly showing what it can do but this More_pics one doesn't.

 

I was hoping someone can give an unbiased opinion on what advantages and disadvantages one has over the other.

 

Thanks


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites
What are main differences between this More_Pics contribution and this UltraPics one?

 

That one has screenshots clearly showing what it can do but this More_pics one doesn't.

 

I was hoping someone can give an unbiased opinion on what advantages and disadvantages one has over the other.

Guys, I would really appreciate some feedback because I need to add one of these two contributions to a clients site within the next 2 days - many thanks to anyone taking the time out to reply!

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

uploaded js folder

add lightbox css to my css

 

copied over files from admin to admin

 

modified product_info

 

and all is good... until I edit html_output

 

I cut and pasted

function thumbimage ($image, $x, $y, $aspectratio, $resize, $cachedir){ ........ } to the end of my html_output, upload to /functions, thumbnail is large light box script works and site still functions.

 

comment out if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) { .....} upload new file to /functions, thumbnail is large light box script works and site still functions.

 

then I cut and paste:

 

if ($image_size = @getimagesize($src)) {

if ((CONFIG_CALCULATE_IMAGE_SIZE == 'true' && $src != DIR_WS_IMAGES . 'pixel_black.gif' && $src != DIR_WS_IMAGES . 'pixel_trans.gif' && $src != DIR_WS_IMAGES . 'pixel_silver.gif' )) {

if ( ($width) || ($height) ) {

if ( $width=="100%" ) {

$width = $image_size[0];

} elseif ( $height=="100%" ) {

$height = $image_size[1];

} elseif ( $width==0 ) {

unset($width);

} elseif ( $height==0 ) {

unset($height);

}

$src=thumbimage(DIR_FS_CATALOG . '/' .$src, $width, $height, 1, 1, DIR_FS_CATALOG . '/' . DIR_WS_IMAGES . 'imagecache');

if ((($image_size[1]/$height) > ($image_size[0]/$width) ) && $height>0){

$width=ceil(($image_size[0]/$image_size[1])* $height);

} elseif ($width>0) {

$height=ceil($width/($image_size[0]/$image_size[1]));

}

}

}

} elseif (IMAGE_REQUIRED == 'false') {

return '';

}

 

and I loose content, I still have navigation and header but 0 content, any suggestion would be appriciated.

Share this post


Link to post
Share on other sites
Guys, I would really appreciate some feedback because I need to add one of these two contributions to a clients site within the next 2 days - many thanks to anyone taking the time out to reply!

sorry, don't know anything about ultrapics

Share this post


Link to post
Share on other sites
sorry, don't know anything about ultrapics
I appreciate the response, thanks.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites
did you upload the version with 9 images?
He uploaded a contribution with lightbox but for some reason he's taken it down with letting anyone know why.

 

Anyway, does anyone know how easy or difficult it will be to have the images at two different size on product info:

 

1) the main product info image to be 100x75

2) the addition more pics to be 50x50

 

BTW - great contribution surfalot

 

Many thanks

Edited by chooch

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Please correct me if I'm wrong, but in regards to the QuickFix hack; wouldn't it be easier to have the 'popup_image.php' file run a function that searched for "product_b.gif" as opposed to hacking every other file to have it display the "product_s.gif"?

 

So this way, when creating a product, you upload your thumbnail images at the the happy and and static values of "Small Image Width/Height" which OSC already uses to display everywhere, then when 'popup_image.php' is run, the modified code searches for the file name with an appended "_b".

 

Again, correct me if I am wrong as I am not a master programmer by any regard, but with my limited knowlege this seems possible.

 

-Aloha

-C.A.D.

Share this post


Link to post
Share on other sites

The reason I like this approach better is that customizing OSC for me is very convoluted and confusing so the less changes made everywhere the better.

 

I found a solutuon to this by opening the More Pics 6 1.2c modded 'popup_image.php' file and immediately after line 103:

 

$img = DIR_WS_IMAGES . $insert;

 

I added:

 

$img = str_replace('.', '_b.', $img);

 

and things seem to be working fine as long as my popup (large) image is named appropriately with the "_b" appended to the end.

I don't know if this solution is leaving something out of the over all scope of things, so some feedback would be appreciated.

Share this post


Link to post
Share on other sites
Please correct me if I'm wrong, but in regards to the QuickFix hack; wouldn't it be easier to have the

If that works best for you, run with it.

 

I think you overlooked the name "quickfix". :D

for lack of more thought-out solution maybe...

 

the one thing you are missing is the option to display a larger image on the product info page. if you place the thumbs in the regular product image field, you can't have a larger primary image on the product info page.

 

The other issue is that if someone had a fully stocked shop before adding More Pics, they would have to re-upload every image with a thumbnail size before installing a package that assumes the named images are all thumbs and the larger images are extraneous.

 

Not everyone wants their shop setup with preprocessed thumbnails, or has the time and motivation to do so, therefore this works for all regardless of how they want to use the shop. When providing a solution to the GP, you have to think of all the possible scenarios and what would be best and easiest for all.

Share this post


Link to post
Share on other sites
He uploaded a contribution with lightbox but for some reason he's taken it down with letting anyone know why.

 

Anyway, does anyone know how easy or difficult it will be to have the images at two different size on product info:

 

1) the main product info image to be 100x75

2) the addition more pics to be 50x50

 

BTW - great contribution surfalot

 

Many thanks

he didn't take it down. only the admins are allowed to do that. There must have been a violation of the board rules.

 

1) there is an option that allows you to display the main product info image unrestricted. see "Restrict parent image size".

2) "Use SMALL_IMAGE_ Restrictions" setting.

 

if both of those are false, it will display the images in their original sizes which can be anything you choose.

 

Assuming you are using this with the main pic and the additional pic separate, you can do this to hardcode a size for the main product image.

 

find this in product_info.php

 

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH), (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT), 'hspace="5" vspace="5"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
<?php // EOF: More Pics 6 ?>
</noscript>

 

where you see: (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH)

and this: (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT)

 

repace with the numeric width and height you require. hint: find 2 places for each.

 

hope that helps

Share this post


Link to post
Share on other sites
the one thing you are missing is the option to display a larger image on the product info page. if you place the thumbs in the regular product image field, you can't have a larger primary image on the product info page.

yeah, I noticed that too, but did a replace string in the 'product_info.php' to reflect a third image. It may sound silly to do this but everything being sold on the site is our own personal artwork and I would like every image to be as pristine as possible.

 

The other issue is that if someone had a fully stocked shop before adding More Pics, they would have to re-upload every image with a thumbnail size before installing a package that assumes the named images are all thumbs and the larger images are extraneous.

 

Not everyone wants their shop setup with preprocessed thumbnails, or has the time and motivation to do so, therefore this works for all regardless of how they want to use the shop. When providing a solution to the GP, you have to think of all the possible scenarios and what would be best and easiest for all.

This is exactly what I wanted to know as it gives me a better understanding of the mod and OSC in general, so thank you for that! :)

Share this post


Link to post
Share on other sites
where you see: (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_WIDTH)

and this: (MOPICS_RESTRICT_PARENT=='false'?'':SMALL_IMAGE_HEIGHT)

 

repace with the numeric width and height you require. hint: find 2 places for each.

 

hope that helps

Many thanks for the instructions. I will try these modifications when I get a chance and update the thread.

 

Cheers :thumbsup:


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Hi guys , well im very sorry coz i ve uploaded the cotrib 2 times to this site but the moderators rejected it because of copyrighting problems.

 

it seems to be that lightbox is not a opensource :angry: :angry: :'( :'(

 

if any one need this contrib with lightbox and auto thumbnail i can upload it to a free server and post the link here !!!

 

(surfalot i didn't add 9 images ive only fix the lightbox and the auto thumbnail creator to your exisitant More Pics 6 version )

Share this post


Link to post
Share on other sites
it seems to be that lightbox is not a opensource :angry: :angry: :'( :'(
Well the simple way around it is to upload all your files but take out the lightbox files but leave the lightbox 'instructions' in there... ie where to download and how to add to the morepics contribution.

Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

surfalot, I have seen a site on the 'live shop' with what seems to be the more_pics contribution but with a modified function - it has a feature where the rolled-over images replace the larger product info page - as well allowing a pop-up

 

here's the link: Sex Toy Shop

 

I understand the pop-up part, it is from a different contribution, but can you please see the product info page and let me know if that is a modified version of more_pics or if that is something different because that may well be worth me trying to make possible for my own product info page.

 

Many thanks in advance.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

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

×