Jump to content
surfalot

[Contribution] More_pics_6 v1.1 For osC 2.2 MS2

Recommended Posts

I have set 'Group parent image with sub-images' to false but the original pic still shows.

 

that is what it is suppose to do. if group original with More Pics is false, the it is displayed on it's own.

 

Also, I am finding that the pop up box is opening to the size of the original image only so I have to drag it to make larger. I tried removing the image height to nothing but it distorted all the pics.

 

What browser and browser version are you using?

Share this post


Link to post
Share on other sites

Conflict between this contribution and Ajax Attribute Manager

 

 

Please can I ask for guidance

 

Please see thread http://forums.oscommerce.com/index.php?s=&...ndpost&p=814410

 

Essentially the problem is that I can get one or the other to work but not both together

 

I have worked back and removed all code relating to More_Pics_6 for 2.2 ms2 to try and isolate the problem.

 

The only file that seems to be problematical is "admin/catagories.php

 

The code for More Pics paints the screen layout and also this piece of Java oriented code

 

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

 

Ajax also makes use of Java

 

Does the more pics use javascript? If so, in the install were you required to add somthing to the onload in the body tag? If you were add what ever function call to attrubuteManager/includes/attributeManagerHeader.inc.php within the goOnLoad javascript funciton.

 

I have compared pre and post files and whilst I am guessing I think it must come back to the above

 

 

Both contributions are absolutley top banana and it would be great to have them both working

 

I would be very grateful for any guidance

 

Thank you

 

Nossum

Share this post


Link to post
Share on other sites
Conflict between this contribution and Ajax Attribute Manager

Please can I ask for guidance

I'm sorry, I can't follow that. can you be more descriptive about what the actual problem is? What happens when you have both installed? What is not happening? More Pics does not make any modifications to the BODY tag ONLOAD element.

Edited by surfalot

Share this post


Link to post
Share on other sites
I'm sorry, I can't follow that. can you be more descriptive about what the actual problem is? What happens when you have both installed? What is not happening? More Pics does not make any modifications to the BODY tag ONLOAD element.

Surfalot Hi

 

Sorry if you are confused, it was getting late.....

 

I am also travelling so some of this is from memory

 

From the bottom

 

I have a development site which has quite a number of modifications, but is stable and works fine

 

If I install More_Pics or Ajax Attribute Manager by themselves they work fine

 

Putting them together results in Ajax dissapearing from the catalogue products screen with the exception of a small area of background colour. Your area of the same screen continues to display and seems to work fine

 

I have examined and compared all files and from my limited knowledge there doesnt appear to be any problems apart from the "admin/catagories.php" file which is very busy

 

On comparing the code to a clean version catagories.php both sets of contribution code seem ok ie dont intertwine or happen in the same area

 

However.....

 

I am obviousley going wrong somewhere

 

I wondered about publishing my code on the thread but its likely to clutter up things, given its length

 

So I am doing a poor job of describing the situation

 

Question I have just had a thought, do you recognise the code below as part of your contribution?

 

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

This appears around line 346 in admin/catagories.php

 

I am just wondering whether I am getting confused between different contributions

 

Surfalot - any thoughts or guidance would be much apprecitted, these are two superb contributions and I am sure they should work

 

Thank you

 

Nossum

Share this post


Link to post
Share on other sites
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onload="SetFocus();">

This appears around line 346 in admin/catagories.php

More Pics does not make any modifications to the BODY tag ONLOAD element.

 

All changed code is marked with:

 

// BOF: More Pics 6

// EOF: More Pics 6

Share this post


Link to post
Share on other sites

Installed more_pics_6_v1.2 with no error, very smooth installation and good documentation. After that, the main picture of the production page no longer shows as thunbnail, instead, it becomes the original size. I tried the all the switches in the configuration for more pics, doens't change anything. Did I miss anything?

Thanks

Share this post


Link to post
Share on other sites
Installed more_pics_6_v1.2 with no error, very smooth installation and good documentation. After that, the main picture of the production page no longer shows as thunbnail, instead, it becomes the original size. I tried the all the switches in the configuration for more pics, doens't change anything. Did I miss anything?

Thanks

 

Please ignore my previous thread. I fixed it.

Share this post


Link to post
Share on other sites

Hi

 

May not be the right place for this, but then may be it is :)

 

I have set this so that when you go into a product, images 1-6 display in full. This looks good, and I like the fact that it avoids having to click to enlarge.

 

However, image 0 (I guess its called that, the primary one attached to the product) appears at the top right as a thumbnail.

 

Is there any way to remove it from there, and open it in full just above images 1-6 so that it is consistent with the others.

 

Appreciate any ideas

 

Thanks

 

W

Share this post


Link to post
Share on other sites

Sorry, i see the answer to that lies within Admin!!! under Configuration, More Pics, Group parent image with sub-images

 

Hi

 

May not be the right place for this, but then may be it is :)

 

I have set this so that when you go into a product, images 1-6 display in full. This looks good, and I like the fact that it avoids having to click to enlarge.

 

However, image 0 (I guess its called that, the primary one attached to the product) appears at the top right as a thumbnail.

 

Is there any way to remove it from there, and open it in full just above images 1-6 so that it is consistent with the others.

 

Appreciate any ideas

 

Thanks

 

W

Share this post


Link to post
Share on other sites

Darn, now I have selected that it forces my Reviews and Add to cart button to the bottom left.

 

Sorry, i see the answer to that lies within Admin!!! under Configuration, More Pics, Group parent image with sub-images

Share this post


Link to post
Share on other sites

Ok, I have it down to a piece of code within catalog/product_info.php. There are two contribs (QTPro and More Pics) that are both after the same space. Tried several things but do not get a result.

 

Has any one successfully applied both contribs to this file? If so, could I see? :thumbsup:

 

Code in question

 

In More pics

 

<?php

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

if ($products_attributes['total'] > 0) {

?>

<table border="0" cellspacing="0" cellpadding="2">

<tr>

<td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>

</tr>

<?php

$products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "' order by popt.products_options_name");

while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {

$products_options_array = array();

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

while ($products_options = tep_db_fetch_array($products_options_query)) {

$products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);

if ($products_options['options_values_price'] != '0') {

$products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

}

}

 

if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {

$selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];

} else {

$selected_attribute = false;

}

?>

<tr>

<td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>

<td class="main"><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>

</tr>

<?php

}

?>

</table>

<?php

}

// BOF: More Pics 6

if (MOPICS_TABLE_LOCATION=='below') {

echo ' <br>

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td align="center" class="smallText">'.$mopics_output.'</td>

</tr>

</table>'."\n";

}

// EOF: More Pics 6

?>

 

and in QTPro

 

<?php

}

//++++ QT Pro: End Changed Code

$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");

$products_attributes = tep_db_fetch_array($products_attributes_query);

if ($products_attributes['total'] > 0) {

//++++ QT Pro: Begin Changed code

$products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']);

require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');

$class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;

$pad = new $class($products_id);

echo $pad->draw();

//++++ QT Pro: End Changed Code

}

?>

 

Thanks

 

W

 

Darn, now I have selected that it forces my Reviews and Add to cart button to the bottom left.
Edited by Wired PSF

Share this post


Link to post
Share on other sites
Ok, I have it down to a piece of code within catalog/product_info.php. There are two contribs (QTPro and More Pics) that are both after the same space. Tried several things but do not get a result.

 

Has any one successfully applied both contribs to this file? If so, could I see? :thumbsup:

I haven't. Sorry.

 

You need to watch the BOF and EOF tags carefully in the product_info.php example file in the More Pics package. More Pics does not do anything to the attributes areas of the product display. What you have posted above as part of the More Pics is far more of the code then More Pics actually changes.

 

The changes for More Pics start with // BOF: More Pics 6 and end with // EOF: More Pics 6

 

Hope that helped.

Share this post


Link to post
Share on other sites

Went back to the beginning and re inserted the contribs. All seems fine now if I keep the primary image where it is (ie to the right of the description. If I try to combine it with the other images it forces the review and buy now buttons to the bottom left.

 

No dramas, have left as is.

 

W

 

I haven't. Sorry.

 

You need to watch the BOF and EOF tags carefully in the product_info.php example file in the More Pics package. More Pics does not do anything to the attributes areas of the product display. What you have posted above as part of the More Pics is far more of the code then More Pics actually changes.

 

The changes for More Pics start with // BOF: More Pics 6 and end with // EOF: More Pics 6

 

Hope that helped.

Share this post


Link to post
Share on other sites
If I try to combine it with the other images it forces the review and buy now buttons to the bottom left.

this is most likely due to the right justification of the More Pics table. If you want to hard code a solution, we can just remove the justification of the table. This would also mean the right-left switch in the admin will no longer work. I looked at the stock code, and I don't see how, in a stock site, this could happen. Sounds like you may have combined some table cells.

Edited by surfalot

Share this post


Link to post
Share on other sites

Hi surfalot..

 

how do i back up my website and data base.. as I want to install this contribution (this will be my 1st try at a contibution)

 

Any once started, no doubt I might need to ask you questions..

 

Where should I start first on your contribution.

 

Cheers.

 

Regards

Grant.

Share this post


Link to post
Share on other sites
how do i back up my website and data base.. as I want to install this contribution (this will be my 1st try at a contibution)

 

First try?!? 54 post and none are for contribs? If you know a little about PHP and how to use a file merge program, it's fairly easy.

 

FILES:

How to backup your site is based on your host. cPanel is real easy, just use their html area backup and the phpMyAdmin export.

 

If you manually download the entire set of PHP/HTML, make sure you zip-up the whole thing in a backup locally before starting to change files.

 

SQL:

Most hosts give you access to a SQL tool call phpMyAdmin, select your database, go to the export tab, select all your tables, check the "add drop tables" checkbox, click go. copy the whole result into a text file on your local computer.

 

Good Luck!!

Share this post


Link to post
Share on other sites

thankyou... yeah i know 54 posts and no contrib's... I have only just starte to get the confidence with these contrib's..

 

Will start this in the next day or two.. will let you know how i go..

 

cheers.

 

Regards

Grant.

Share this post


Link to post
Share on other sites
More Pics does not make any modifications to the BODY tag ONLOAD element.

 

All changed code is marked with:

 

// BOF: More Pics 6

// EOF: More Pics 6

 

Hi surfalot

 

Sorry been out of circulation

 

Just to wrap up this item - there is no conflict with Ajax Attribute Manager

 

Nimmit the author of Ajax was quite right - I had not installed correctly

 

Two great contributions

 

Thank you surfalot

 

Regards

 

Nossum

Share this post


Link to post
Share on other sites

Surfalot I have an interesting one for you. Recently all but my home page has been de-indexed from Google. I posted on a few search engine forums without much success. Today I got an e-mail from someone trying to help suggesting that it is an over use of title and alt tags on my images that may be the problem and causing me to be penalized and consequently de-indexed.

 

Here is a sample piece of my code:

 

<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.playitagaingames.com/product_info.php?products_id=346"><img src="images/Teamsofenemies1.JPG" border="0" alt="Teams Of Enemies" title=" Teams Of Enemies " width="100" height="80" class=imageborder></a><br><a href="http://www.playitagaingames.com/product_info.php?products_id=346">Teams Of Enemies</a><br>$24.99</td>

 

He went on to say that googlebot/mozillabot is going to see this as two identical links to "Teams of Enemies" in a row along with another title text of Teams of Enemies immediately following. Thats three key phrases used in a row, two of which are linked to the same page.

 

He says I should drop the alt and title text to my images where an identical link exists directly below it or near it. And the same problem occurs on all of my category pages. Images with linked alt text, identical title text, then another identical hyperlink.

 

Have you heard anything like this before? I am desperate to get my site back in Google and don't know where else to turn. If I want to do as he suggests is their an easy way to modify the morepics code so that it will globally afffect all of the images and fix it according to his reccomendations?

 

Thank you.

Edited by docprego

Share this post


Link to post
Share on other sites
Surfalot I have an interesting one for you. Recently all but my home page has been de-indexed from Google. I posted on a few search engine forums without much success. Today I got an e-mail from someone trying to help suggesting that it is an over use of title and alt tags on my images that may be the problem and causing me to be penalized and consequently de-indexed.

 

Here is a sample piece of my code:

 

<td align="center" class="smallText" width="33%" valign="top"><a href="http://www.playitagaingames.com/product_info.php?products_id=346"><img src="images/Teamsofenemies1.JPG" border="0" alt="Teams Of Enemies" title=" Teams Of Enemies " width="100" height="80" class=imageborder></a><br><a href="http://www.playitagaingames.com/product_info.php?products_id=346">Teams Of Enemies</a><br>$24.99</td>

 

He went on to say that googlebot/mozillabot is going to see this as two identical links to "Teams of Enemies" in a row along with another title text of Teams of Enemies immediately following. Thats three key phrases used in a row, two of which are linked to the same page.

 

He says I should drop the alt and title text to my images where an identical link exists directly below it or near it. And the same problem occurs on all of my category pages. Images with linked alt text, identical title text, then another identical hyperlink.

 

Have you heard anything like this before? I am desperate to get my site back in Google and don't know where else to turn. If I want to do as he suggests is their an easy way to modify the morepics code so that it will globally affect all of the images and fix it according to his reccomendations?

 

Thank you.

 

First, this code isn't generated by More Pics. this is part of the index.php page that generates the product lists. It is the standard code for osC.

 

Overuse of keywords rarely gets you delisted or banned from Google. If that was really taken into consideration by Google (and it is), the penalty would simply by a poor rank. You have to use doorway pages with no content and/or scripts that present different content to your browsers then it does to google, and/or any other hard-core SEO trickery.

 

You may also be delisted from an outage at your host that happened to occur while they are trying to crawl your site.

 

You may also be delisted if your content is determined to be a duplicate of another site, eg. your site is a cookie cutter of another, perhaps it was purchased from a turnkey site seller, or if the site was recently moved and a copy of it exists in google's DB under it's IP address (http://123.123.123.123/etc.)(I've seen this before)

 

another possibility is the dreaded DHTML menu, did you enable a DHTML menu recently by chance?

 

I'm sure there is some other explination, but this is all way off topic here ;) Get my email from the contrib and send me your URL if you would like me to look at your site.

Share this post


Link to post
Share on other sites

Hi! Thanks for a great contrib! I have installed it and I've also installed the flash image tweek:

 

----------------------------------------------------------------------------

////

// The HTML image wrapper function

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $swf = 'no') {

if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {

return false;

}

$extension = substr($src, -4);

if ($extension == '.swf') $swf = 'yes';

 

// alt is added to the img tag even if it is null to prevent browsers from outputting

// the image filename as default

if ($swf == 'no') {

$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

} else {

$image = '<embed src="' . tep_output_string($src) . '"';

}

 

if ((tep_not_null($alt)) && ($swf == 'no')) {

$image .= ' title=" ' . tep_output_string($alt) . ' "';

}

 

if (((CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height))) && ($swf=='yes')) {

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

if (empty($width) && tep_not_null($height)) {

$ratio = $height / $image_size[1];

$width = $image_size[0] * $ratio;

} elseif (tep_not_null($width) && empty($height)) {

$ratio = $width / $image_size[0];

$height = $image_size[1] * $ratio;

} elseif (empty($width) && empty($height)) {

$width = $image_size[0];

$height = $image_size[1];

}

} elseif (IMAGE_REQUIRED == 'false') {

return false;

}

}

 

if (tep_not_null($width) && tep_not_null($height)) {

$image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';

}

 

if ((tep_not_null($parameters)) && ($swf =='no')) $image .= ' ' . $parameters;

 

$image .= '>';

 

return $image;

}

-------------------------------------------------------------------------

 

I don't have any problems with uploading swf's and they shows up almost like expected:-)

 

It's just that they all have the same size.

 

I've changed the "no" to a "yes" in this line:

 

-------------------------------------------------------------------------

 

if (((CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height))) && ($swf=='yes'))

 

-----------------------------------------------------------------------------------------------

And that should output the flash in it's proper size, so I wonder if there's something in the morepics contrib, that you know of, which overrules the above tep_image function and outputs the swf in a fixed size. Looks like the size is 200x150px.

 

Kind regards/Michael

Share this post


Link to post
Share on other sites
And that should output the flash in it's proper size, so I wonder if there's something in the morepics contrib, that you know of, which overrules the above tep_image function and outputs the swf in a fixed size. Looks like the size is 200x150px.

More pics uses the tep_image to display the images and there is nothing special about the way it uses it. there is a configure item that was added to the admin config that tells More Pics to use or not use the default small image restrictions.

Share this post


Link to post
Share on other sites
More pics uses the tep_image to display the images and there is nothing special about the way it uses it. there is a configure item that was added to the admin config that tells More Pics to use or not use the default small image restrictions.

 

Hi,

 

Thanks for the reply but my small image size is set to 70x50px and the flash shows up in that size if I turn on the morepics restrictions so that's not where the problem lies.

 

I would appreciate to hear from someone that use these contribs and get the flash to show up, at least, in a properly scaled version.

 

 

Thanks again and keep up the great work!

 

Kind regards/Michael

Share this post


Link to post
Share on other sites

Hello,

 

I? recently installed the contribution and everything looks good with one exception, when I click on any product (which brings up product_info.php?products_id=240 for example) I receive the following error message:

 

Fatal error: Cannot redeclare tep_show_category() (previously declared in /home/pswyter/public_html/includes/header.php:315) in /public_html/includes/boxes/categories.php on line 13

 

Here is my code for my header at line 315:

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

and here is the code for the categories at line 13:

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

Any suggestions?

 

Thank you,

Brian

Edited by bfoder

Share this post


Link to post
Share on other sites
I? recently installed the contribution and everything looks good with one exception, when I click on any product (which brings up product_info.php?products_id=240 for example) I receive the following error message:

Hmm, that's interesting. Your problem is not from installing this contrib. This contrib does not contain that function, nor does it change anything in those files.

 

That error means you have the function that you pointed out defined twice in your code. you need to remove one of them. It might actually be safer to wrap each of those functions in something like this:

 

if(!function_exists('tep_show_category')) {

 

function tep_show_category($counter) {

global $tree, $categories_string, $cPath_array;

 

etc....

etc....

}

 

}

 

in both files:

/includes/boxes/categories.php

/includes/header.php

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

×