Jump to content
Sign in to follow this  
Parikesit

[Contribution] Additional Images Module

Recommended Posts

whats the difference between productinfo.php & includes/classes/dispayimages.php ??? :blink:

Share this post


Link to post
Share on other sites

Hello everyone,

 

I have 2 separate problems here:

 

PROBLEM 1) I have a heavily modified version of osCommerce. I have used Beyond Compare to view the changes in my files but I am having trouble with the catalog/includes/classes/boxes.php file.

 

Can anyone explain what this file does......especially the additional images code snippet for this file........it may help me understand a little better.

 

At first I simply added the additional images code to the bottom of the boxes.php file and it seemed ok until I tried to access the URL www.mysite.com/account.php. I then got the following error:

 

Warning: Cannot modify header information - headers already sent by (output started at /htdocs/includes/classes/boxes.php:725) in /htdocs/includes/functions/general.php on line 33

 

Here is the code I need to add to the boxes.php file:

 

 

// BOF: Additional Images
 class imagesBox extends tableBox {	  
function imagesBox($contents) {		
  $info_box_contents = array();		
  $info_box_contents[] = array('text' => $this->imagesBoxContents($contents));		
  $this->table_cellpadding = '1';		
  $this->tableBox($info_box_contents, true);	  
 }
function imagesBoxContents($contents) {
  $this->table_cellpadding = '4';
  $this->table_parameters = 'class="imagesBoxContents"';
  return $this->tableBox($contents);
}
 }
 // EOF: Additional Images

 

 

And here is the code from my modified version of boxes.php:

 

<?php
/*
 $Id: boxes.php,v 1.33 2003/06/09 22:22:50 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 class tableBox {
var $table_border = '0';
var $table_width = '';
var $table_cellspacing = '0';
var $table_cellpadding = '0';
var $table_parameters = '';
var $table_row_parameters = '';
var $table_data_parameters = '';

// class constructor
function tableBox($contents, $direct_output = false) {
  $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
  if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
  $tableBox_string .= '>' . "\n";

  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
	$tableBox_string .= '  <tr';
	if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
	if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
	$tableBox_string .= '>' . "\n";

	if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
	  for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
		if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
		  $tableBox_string .= '	<td';
		  if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
		  if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
			$tableBox_string .= ' ' . $contents[$i][$x]['params'];
		  } elseif (tep_not_null($this->table_data_parameters)) {
			$tableBox_string .= ' ' . $this->table_data_parameters;
		  }
		  $tableBox_string .= '>';
		  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
		  $tableBox_string .= $contents[$i][$x]['text'];
		  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
		  $tableBox_string .= '</td>' . "\n";
		}
	  }
	} else {
	  $tableBox_string .= '	<td';
	  if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
	  if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
		$tableBox_string .= ' ' . $contents[$i]['params'];
	  } elseif (tep_not_null($this->table_data_parameters)) {
		$tableBox_string .= ' ' . $this->table_data_parameters;
	  }
	  $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
	}

	$tableBox_string .= '  </tr>' . "\n";
	if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
  }

  $tableBox_string .= '</table>' . "\n";

  if ($direct_output == true) echo $tableBox_string;

  return $tableBox_string;
}
 }
 // ------------------ infoBoxHeading ----------
 class infoBoxHeading extends tableBox {
function infoBoxHeading($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
  $this->table_cellpadding = '0';
  $this->table_parameters = ' class="box_header_txt"';
  if ($left_corner == true) {
	$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif');
  } else {
	$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
  }
  if ($right_arrow == true) {
	$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
  } else {
	$right_arrow = '';
  }
  if ($right_corner == true) {
	$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif');
  } else {
	$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
  }

  $info_box_contents = array();
  $info_box_contents[] = array(array('params' => '',
									 'text' => ''.$contents[0]['text'].''));

  $this->tableBox($info_box_contents, true);
}
 }  

 // ------------------ infoBox ----------
 class infoBox extends tableBox {
function infoBox($contents) {
  $info_box_contents = array();
  $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
  $this->table_cellpadding = '0';
  $this->table_parameters = '  style="border-bottom:2px solid #000000;"';
  $this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
  $this->table_cellpadding = '0';
  $this->table_parameters = ' class="box_body"';
  $info_box_contents = array();
  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	$info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
									   'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
									   'params' => ' style="border:1px solid #282828; border-width:12px 10px 12px 17px;"',
									   'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
  }

  return $this->tableBox($info_box_contents);
}
 }
 // ------------------ infoBoxHeading1 ----------
 class infoBoxHeading1 extends tableBox {
function infoBoxHeading1($contents, $left_corner = true, $right_corner = true, $right_arrow = false) {
  $this->table_cellpadding = '0';

  if ($left_corner == true) {
	$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_left.gif');
  } else {
	$left_corner = tep_image(DIR_WS_IMAGES . 'infobox/corner_right_left.gif');
  }
  if ($right_arrow == true) {
	$right_arrow = '<a href="' . $right_arrow . '">' . tep_image(DIR_WS_IMAGES . 'infobox/arrow_right.gif', ICON_ARROW_RIGHT) . '</a>';
  } else {
	$right_arrow = '';
  }
  if ($right_corner == true) {
	$right_corner = $right_arrow . tep_image(DIR_WS_IMAGES . 'infobox/corner_right.gif');
  } else {
	$right_corner = $right_arrow . tep_draw_separator('pixel_trans.gif', '11', '14');
  }

  $info_box_contents = array();
  $info_box_contents[] = array(array('params' => ' class="box_header_txt1"',
									 'text' => ''.$contents[0]['text'].''));

  $this->tableBox($info_box_contents, true);
}
 } 
 // ------------------ infoBox1 ----------
 class infoBox1 extends tableBox {
function infoBox1($contents) {
  $info_box_contents = array();
  $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
  $this->table_cellpadding = '0';
  $this->table_parameters = '  style="border-bottom:8px solid #ffffff;"';
  $this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
  $this->table_cellpadding = '0';
  $this->table_parameters = ' style="background:#F4F6DE;border:1px solid #F4F6DE; border-width:0px 11px 15px 11px;" class="box_body"';
  $info_box_contents = array();
  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	$info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
									   'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
									   'params' => '',
									   'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
  }

  return $this->tableBox($info_box_contents);
}
 }
 // ------------------ infoBox2 ----------
 class infoBox2 extends tableBox {
function infoBox2($contents) {
  $info_box_contents = array();
  $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
  $this->table_cellpadding = '0';
  $this->table_parameters = '  style="border-bottom:2px solid #000000;"';
  $this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
  $this->table_cellpadding = '0';
  $this->table_parameters = '';
  $info_box_contents = array();
  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	$info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
									   'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
									   'params' => '',
									   'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
  }

  return $this->tableBox($info_box_contents);
}
 }
 //----------------------------------------------- tableBox_output ----------------------------------
class tableBox_output {
var $table_border = '0';
var $table_width = '';
var $table_cellspacing = '0';
var $table_cellpadding = '0';
var $table_parameters = ' ';
var $table_row_parameters = '';
var $table_data_parameters = '';

// class constructor
function tableBox_output($contents, $direct_output = false) {
  $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
  if (tep_not_null($this->table_parameters)) $tableBox_string .= '' . $this->table_parameters;
  $tableBox_string .= '>' . "\n";

  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";


	 if ($i != 0) { $tableBox_string .= '';} 

	$tableBox_string .= '   <tr';
	if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
	if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
	$tableBox_string .= '>' . "\n";

	if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
	  for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
		if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {




			if ($x >= 1){

				if($i == 0) {$tableBox_string .= '';}
				else		{ 



			  $tableBox_string .= '';} 
										}
$color=' class="product2"';
 if ($i %2) { $color = '';}  

			$tableBox_string .= '	<td'.$color;  
		  if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
		  if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
			$tableBox_string .=  ' ' . $contents[$i][$x]['params'];
		  } elseif (tep_not_null($this->table_data_parameters)) {
			$tableBox_string .=' ' . $this->table_data_parameters;
		  }
		  $tableBox_string .= '>';
		  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
		  $tableBox_string .= $contents[$i][$x]['text'];
		  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
		  $tableBox_string .= '</td>  ' . "\n";
		}
	  }
	} else {
	  $tableBox_string .= '	<td';
	  if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
	  if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
		$tableBox_string .= ' ' . $contents[$i]['params'];
	  } elseif (tep_not_null($this->table_data_parameters)) {
		$tableBox_string .= ' ' . $this->table_data_parameters;
	  }
	  $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
	}

	$tableBox_string .= '  </tr>	 ' . "\n";
	if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
  }

  $tableBox_string .= '</table>' . "\n";

  if ($direct_output == true) echo $tableBox_string;

  return $tableBox_string;
}
 }
//---------------- tableBox_output --------------------- 
 class contentBox extends tableBox_output {
function contentBox($contents) {
  $info_box_contents = array();
  $info_box_contents[] = array('text' => $this->contentBoxContents($contents));
  $this->table_cellpadding = '0';
  $this->table_parameters = ' class="box_width_cont product"';
  $this->tableBox_output($info_box_contents, true);
}

function contentBoxContents($contents) {
  $this->table_cellpadding = '0';
  $this->table_parameters = 'class=""';
  return $this->tableBox_output($contents);
}
 }
// ------------------ contentBoxHeading ---------------------------------------------------------
 class contentBoxHeading extends tableBox {
function contentBoxHeading($contents) {

  $this->table_cellpadding = '0';
  $this->table_parameters = '';
  $info_box_contents = array();
  $info_box_contents[] = array( array('params' => ' class="cont_header_txt"',
									 'text' => ''.$contents[0]['text'].''));

  $this->tableBox($info_box_contents, true);
}
 }

//---------------- contentBoxHeading_WHATS_NEW --------------------- 
 class contentBoxHeading_WHATS_NEW extends tableBox {
function contentBoxHeading_WHATS_NEW($contents) {

  $this->table_cellpadding = '0';
  $this->table_parameters = '';
  $info_box_contents = array();
  $info_box_contents[] = array(array('params' => ' class="cont_header_txt"',
									 'text' => ''.BOX_HEADING_WHATS_NEW.''));

  $this->tableBox($info_box_contents, true);
}
 }
//---------------- contentBoxHeading_ProdNew --------------------- 
 class contentBoxHeading_ProdNew extends tableBox {
function contentBoxHeading_ProdNew($contents) {

  $this->table_cellpadding = '0';
  $this->table_parameters = '';
  $info_box_contents = array();
  $info_box_contents[] = array(array('params' => ' class="cont_header_txt"',
									 'text' => ''.HEADING_TITLE.''));

  $this->tableBox($info_box_contents, true);
}
 }

 class errorBox extends tableBox {
function errorBox($contents) {
  $this->table_data_parameters = 'class="errorBox"';
  $this->tableBox($contents, true);
}
 }


//---------------- tableBox_shopping_cart --------------------- 
class tableBox_shopping_cart {
var $table_border = '0';
var $table_width = '';
var $table_cellspacing = '0';
var $table_cellpadding = '0';
var $table_parameters = '';
var $table_row_parameters = '';
var $table_data_parameters = '';

// class constructor
function tableBox_shopping_cart($contents, $direct_output = false) {
  $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
  if (tep_not_null($this->table_parameters)) $tableBox_string .= ' ' . $this->table_parameters;
  $tableBox_string .= '>' . "\n";

  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";
   if ($i >= 2) { $tableBox_string .= '


					<tr><td style="background:#000000;height:1px;" colspan="4">'.tep_draw_separator('spacer.gif', '1', '1').'</td></tr>							  
						  ';}

	$tableBox_string .= ' <tr';

	if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
	if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
	$tableBox_string .= '>' . "\n";

	if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
	  for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
		if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {
		  if ($x >= 1) $tableBox_string .= '';

		  $tableBox_string .= '	 <td';
		  if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
		  if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
			$tableBox_string .= ' ' . $contents[$i][$x]['params'];
		  } elseif (tep_not_null($this->table_data_parameters)) {
			$tableBox_string .= ' ' . $this->table_data_parameters;
		  }
		  $tableBox_string .= '>';

			if ($i == 0)  $tableBox_string .= tep_draw_shop_top();
			else $tableBox_string .= tep_draw_shop_top();
		  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
		  $tableBox_string .= $contents[$i][$x]['text'];
		  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
		  if ($i == 0)  $tableBox_string .= tep_draw_shop_bottom();
		  else $tableBox_string .= tep_draw_shop_bottom();

		  $tableBox_string .= '</td>' . "\n";
		}
	  }
	} else {
	  $tableBox_string .= '	<td';
	  if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
	  if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
		$tableBox_string .= ' ' . $contents[$i]['params'];
	  } elseif (tep_not_null($this->table_data_parameters)) {
		$tableBox_string .= ' ' . $this->table_data_parameters;
	  }
	  $tableBox_string .= '>'.tep_draw_shop_top_1() . $contents[$i]['text'] . tep_draw_shop_bottom_1().'</td>' . "\n";
	}

	$tableBox_string .= '  </tr>' . "\n";

/*  if ($i >= 2) {  */
$tableBox_string .= '

';
/*  }  */		

	if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
  }

  $tableBox_string .= '</table>' . "\n";

  if ($direct_output == true) echo $tableBox_string;

  return $tableBox_string;
}
 }
 class productListingBox extends tableBox_shopping_cart {
function productListingBox($contents) {
  $this->table_parameters = ' class="box_width_cont shop_cart"';
  $this->tableBox_shopping_cart($contents, true);
}
 }

// -------------------------------------- --------------------------  
 function tep_draw_heading_top()
 {
		/*  require(DIR_WS_BOXES . 'panel_top.php');  */ 
 echo '
				  <table cellpadding="0" cellspacing="0" border="0" style="background:#444642;border:4px solid #313130;">
					<tr><td>
 ';
 }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom()
{

echo '
					</td></tr>
				</table>
				<table cellpadding="0" cellspacing="0" border="0"><tr><td height="2"></td></tr></table>
';
}
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------  
 function tep_draw_heading_top_1()
 {
 echo '
					  <table cellpadding="0" cellspacing="0" border="0">
						<tr><td style="border:0px solid #444642;border-width:0px 13px 10px 13px;">
 ';

 }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom_1()
{

echo ' 

						</td></tr>
					</table>
';
}
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------   
 function tep_draw_heading_top_2()
 {

 echo '
<table cellpadding="0" cellspacing="0" border="0">  
<tr><td>'.tep_draw_separator('spacer.gif', '15', '1').'</td>
	<td width="100%">

';
 }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom_2()
{

echo '

</td><td>'.tep_draw_separator('spacer.gif', '25', '1').'</td></tr>
</table> ';
} 
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------  
 function tep_draw_heading_top_3()
 {
 echo '
					  <table cellpadding="0" cellspacing="0" border="0">
						<tr><td style="background:#4E4F4C;border:0px solid #ffffff;border-width:0px 0px 0px 0px;">
 ';

 }
// -------------------------------------- --------------------------  
function tep_draw_heading_bottom_3()
{

echo ' 

						</td></tr>
					</table>
';
}
// -------------------------------------- --------------------------
// -------------------------------------- --------------------------
 function  tep_draw_prod_top()
 {
 return $table = '';
 }
// -------------------------------------- --------------------------
 function  tep_draw_prod_bottom()
 {
  return $table =  '';
 }
 // -------------------------------------- --------------------------
 function  tep_draw_shop_top()
 {
 return $table = '';
 }
// -------------------------------------- --------------------------
 function  tep_draw_shop_bottom()
 {
  return $table =  '';
 }
 // -------------------------------------- --------------------------
 function  tep_draw_shop_top_1()
 {
 return $table = '';
 }
// -------------------------------------- --------------------------
 function  tep_draw_shop_bottom_1()
 {
  return $table =  '';
 }
// -------------------------------------- --------------------------  
 function tep_draw_result_top()
 {
 echo '';
 }
// -------------------------------------- --------------------------  
function tep_draw_result_bottom()
{
echo '';
}
// -------------------------------------- --------------------------  
function tep_draw_separate()
{
echo '
		<table cellpadding="0" cellspacing="0"><tr><td height="3"></td></tr></table>
';
}
// -------------------------------------- --------------------------  
  // ------------------ infoBox_77 ----------
class infoBox_77 extends tableBox {
function infoBox_77($contents) {
  $info_box_contents = array();
  $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
  $this->table_cellpadding = '0';
  $this->table_parameters = 'class=""';
  $this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
  $this->table_cellpadding = '0';
  $this->table_parameters = ' class=""';
  $info_box_contents = array();
  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	$info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
									   'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
									   'params' => '',
									   'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
  }

  return $this->tableBox($info_box_contents);
}
}
// ------------------ infoBox_78 ----------
class infoBox_78 extends tableBox {
function infoBox_78($contents) {
  $info_box_contents = array();
  $info_box_contents[] = array('text' => $this->infoBoxContents($contents));
  $this->table_cellpadding = '0';
  $this->table_cellspacing = '1';
  $this->table_parameters = 'class="infoBox"';
  $this->tableBox($info_box_contents, true);
}

function infoBoxContents($contents) {
  $this->table_cellpadding = '0';
   $this->table_cellspacing = '15';
  $this->table_parameters = 'class="infoBoxContents "';
  $info_box_contents = array();
  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	$info_box_contents[] = array(  array (  'align' => (isset($contents[$i]['align']) ? $contents[$i]['align'] : ''),
									   'form' => (isset($contents[$i]['form']) ? $contents[$i]['form'] : ''),
									   'params' => ' class="main"',
									   'text' => ''.(isset($contents[$i]['text']) ? $contents[$i]['text'] : '').''));
  }

  return $this->tableBox($info_box_contents);
}
}

 //----------------------------------------------- tableBox_output1 ----------------------------------
class tableBox_output1 {
var $table_border = '0';
var $table_width = '';
var $table_cellspacing = '0';
var $table_cellpadding = '0';
var $table_parameters = ' ';
var $table_row_parameters = '';
var $table_data_parameters = '';

// class constructor
function tableBox_output1($contents, $direct_output = false) {
  $tableBox_string = '<table border="' . tep_output_string($this->table_border) . '" width="' . tep_output_string($this->table_width) . '" cellspacing="' . tep_output_string($this->table_cellspacing) . '" cellpadding="' . tep_output_string($this->table_cellpadding) . '"';
  if (tep_not_null($this->table_parameters)) $tableBox_string .= '' . $this->table_parameters;
  $tableBox_string .= '>' . "\n";

  for ($i=0, $n=sizeof($contents); $i<$n; $i++) {
	if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= $contents[$i]['form'] . "\n";


	 if ($i != 0) { $tableBox_string .= '

				<tr><td colspan="3" class="bg_gg">'.tep_draw_separator('spacer.gif', '1', '1').'</td></tr>			 
				 ';} 

	$tableBox_string .= '   <tr';
	if (tep_not_null($this->table_row_parameters)) $tableBox_string .= ' ' . $this->table_row_parameters;
	if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) $tableBox_string .= ' ' . $contents[$i]['params'];
	$tableBox_string .= '>' . "\n";

	if (isset($contents[$i][0]) && is_array($contents[$i][0])) {
	  for ($x=0, $n2=sizeof($contents[$i]); $x<$n2; $x++) {
		if (isset($contents[$i][$x]['text']) && tep_not_null($contents[$i][$x]['text'])) {




			if ($x >= 1){

				if($i == 0) {$tableBox_string .= '
										<td class="bg_vv">'.tep_draw_separator('spacer.gif', '1', '1').'</td>
										';}
				else		{ 



			  $tableBox_string .= '
										<td class="bg_vv">'.tep_draw_separator('spacer.gif', '1', '1').'</td>
										';} 
										}

		  $tableBox_string .= '	<td';
		  if (isset($contents[$i][$x]['align']) && tep_not_null($contents[$i][$x]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i][$x]['align']) . '"';
		  if (isset($contents[$i][$x]['params']) && tep_not_null($contents[$i][$x]['params'])) {
			$tableBox_string .= ' ' . $contents[$i][$x]['params'];
		  } elseif (tep_not_null($this->table_data_parameters)) {
			$tableBox_string .= ' ' . $this->table_data_parameters;
		  }
		  $tableBox_string .= '>';
		  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= $contents[$i][$x]['form'];
		  $tableBox_string .= $contents[$i][$x]['text'];
		  if (isset($contents[$i][$x]['form']) && tep_not_null($contents[$i][$x]['form'])) $tableBox_string .= '</form>';
		  $tableBox_string .= '</td>  ' . "\n";
		}
	  }
	} else {
	  $tableBox_string .= '	<td';
	  if (isset($contents[$i]['align']) && tep_not_null($contents[$i]['align'])) $tableBox_string .= ' align="' . tep_output_string($contents[$i]['align']) . '"';
	  if (isset($contents[$i]['params']) && tep_not_null($contents[$i]['params'])) {
		$tableBox_string .= ' ' . $contents[$i]['params'];
	  } elseif (tep_not_null($this->table_data_parameters)) {
		$tableBox_string .= ' ' . $this->table_data_parameters;
	  }
	  $tableBox_string .= '>' . $contents[$i]['text'] . '</td>' . "\n";
	}

	$tableBox_string .= '  </tr>	 ' . "\n";
	if (isset($contents[$i]['form']) && tep_not_null($contents[$i]['form'])) $tableBox_string .= '</form>' . "\n";
  }

  $tableBox_string .= '</table>' . "\n";

  if ($direct_output == true) echo $tableBox_string;

  return $tableBox_string;
}
 }
//---------------- tableBox_output1 --------------------- 
 class contentBox1 extends tableBox_output1 {
function contentBox1($contents) {
  $info_box_contents = array();
  $info_box_contents[] = array('text' => $this->contentBoxContents($contents));
  $this->table_cellpadding = '0';
  $this->table_parameters = ' class="box_width_cont product"';
  $this->tableBox_output1($info_box_contents, true);
}

function contentBoxContents($contents) {
  $this->table_cellpadding = '0';
  $this->table_parameters = 'class=""';
  return $this->tableBox_output1($contents);
}
 }	?>

 

 

If anyone could help me integrate the code from the 2 files together, I would be very grateful. The code differences are best viewed using beyond compare or a similar file comparison software.

 

PROBLEM 2) I am having trouble with displaying my thumbnails correctly. If I want to get the store to display the thumbnails how they have been resized by Additional Images (i.e. nice and unstretched), I have to go into Admin->Config->Images and set 'small image width' and 'small image height' to both 0 or just a blank field. But doing this has an effect on the Additional Images Thumbnail Utility under Admin->Catalog-Additional Images. When I hit the 'process' button I get these errors:

 

Warning: imagejpeg(): supplied argument is not a valid Image resource in /homepages/11/d158288303/htdocs/admin/includes/classes/alterimage.php on line 383

 

Warning: chmod() [function.chmod]: No such file or directory in htdocs/admin/includes/classes/alterimage.php on line 392

 

Warning: Cannot modify header information - headers already sent by (output started at htdocs/admin/includes/classes/alterimage.php:383) in htdocs/admin/includes/functions/general.php on line 22

 

EDIT: I have just noticed that the same error occurs if i also change the "display image width" also.

 

So I have to set the small image width/height back to normal for the Thumbnail processing to work. Does anyone have any ideas of how to get around this error, as eventually my client will want to use the admin section and rezise thumbnails himself.

 

 

Thanks in advance.

Jp

Edited by jpmad4it

Share this post


Link to post
Share on other sites

Removing blank lines at the end of general.php / alterimage.php files will fix the following error:

 

Warning: Cannot modify header information - headers already sent by (output started at htdocs/admin/includes/classes/alterimage.php:383) in htdocs/admin/includes/functions/general.php on line 22

Share this post


Link to post
Share on other sites

Hello I hope someone can help with this - it's driving me nuts!!

 

I have had a good search of the forum and google and it seems a few other people are getting this problem, so hopefully someone may be able to help.

 

I have tried to reinstall this contribution three times now and I am sure all of the code is perfectly copied over.

 

The porblem I have is that I can't get Step B. DATABASE INSTALLATION to work: where I have to go to http://www.mydomain.com/admin/additional_i...s_configure.php.

 

My shop for the moment is in a folder called catalog, so the address I have been going to is: http://www.mydomain.com/catalog/admin/addi...s_configure.php

 

The page appears to display fine, but I get the following messages on screen:

 

Your database requires updates.

 

Configuration Group "Additional Images" does not exist.

 

Configuration Group "Images" exists.

Checking for items...

Configuration Key "DISPLAY_IMAGE_WIDTH" does not exist.

Configuration Key "DISPLAY_IMAGE_HEIGHT" does not exist.

Configuration Key "POPUP_IMAGE_WIDTH" does not exist.

Configuration Key "POPUP_IMAGE_HEIGHT" does not exist.

 

Checking for Tables...

Table "additional_images" was not found.

 

Checking for Columns...

Column "products_image_med" not found in Table "products".

Column "products_image_pop" not found in Table "products".

Column "products_image_description" not found in Table "products".

Table "additional_images" was not found, column check not performed.

 

no matter how many times I click on the "run Configuraito Utlity" nothing happens other than the page refreshes to itself.

 

I am on a Windows 2003 server, PHP Version 4.3.11, register globals is on, and the latest download of OS Commerce.

 

 

I am guessing, but I think it is something to do with the page not being able the database as it doesn't have permissions to insert tables? - but I could be wrong.

 

Does anyone know of a fix for this, or even better - does anyone have the sql statement for inserting new tables and configs etc into the dtabase.

 

I did try reading the php, with a view to maually adding the tables and rows into the databse but I couldn;t really make head or tail of it.

 

Any help in fixing this or maully updating the database would be cool.

 

thanks

Share this post


Link to post
Share on other sites
Removing blank lines at the end of general.php / alterimage.php files will fix the following error:

 

Warning: Cannot modify header information - headers already sent by (output started at htdocs/admin/includes/classes/alterimage.php:383) in htdocs/admin/includes/functions/general.php on line 22

 

 

hi there, thanks for the repsone........I removed the blank lines from those files, but it didnt seem to work though? I still receive the error?

Share this post


Link to post
Share on other sites
hi there, thanks for the repsone........I removed the blank lines from those files, but it didnt seem to work though? I still receive the error?

 

 

Should the thumbnails on the product list pages be resized automatically................. As mine are not being changed? Hence why I have been trying to set the small image width / height to 0 or no value. I even have the settings "use image size restrictions" set to False too so that the pre-defined sizes are ignored.........everything seems to work apart from the thumbnails.....pleeeeease help! Could it be the fact that my boxes.php file is not set up correctly thats causing this error?

Share this post


Link to post
Share on other sites
Hello I hope someone can help with this - it's driving me nuts!!

 

I have had a good search of the forum and google and it seems a few other people are getting this problem, so hopefully someone may be able to help.

 

I have tried to reinstall this contribution three times now and I am sure all of the code is perfectly copied over.

 

The porblem I have is that I can't get Step B. DATABASE INSTALLATION to work: where I have to go to http://www.mydomain.com/admin/additional_i...s_configure.php.

 

My shop for the moment is in a folder called catalog, so the address I have been going to is: http://www.mydomain.com/catalog/admin/addi...s_configure.php

 

The page appears to display fine, but I get the following messages on screen:

 

Your database requires updates.

 

Configuration Group "Additional Images" does not exist.

 

Configuration Group "Images" exists.

Checking for items...

Configuration Key "DISPLAY_IMAGE_WIDTH" does not exist.

Configuration Key "DISPLAY_IMAGE_HEIGHT" does not exist.

Configuration Key "POPUP_IMAGE_WIDTH" does not exist.

Configuration Key "POPUP_IMAGE_HEIGHT" does not exist.

 

Checking for Tables...

Table "additional_images" was not found.

 

Checking for Columns...

Column "products_image_med" not found in Table "products".

Column "products_image_pop" not found in Table "products".

Column "products_image_description" not found in Table "products".

Table "additional_images" was not found, column check not performed.

 

no matter how many times I click on the "run Configuraito Utlity" nothing happens other than the page refreshes to itself.

 

I am on a Windows 2003 server, PHP Version 4.3.11, register globals is on, and the latest download of OS Commerce.

I am guessing, but I think it is something to do with the page not being able the database as it doesn't have permissions to insert tables? - but I could be wrong.

 

Does anyone know of a fix for this, or even better - does anyone have the sql statement for inserting new tables and configs etc into the dtabase.

 

I did try reading the php, with a view to maually adding the tables and rows into the databse but I couldn;t really make head or tail of it.

 

Any help in fixing this or maully updating the database would be cool.

 

thanks

 

 

Hello - just in case this helps anyone I mananged to fix the problem.

 

I am now quite sure that the initial problem is that the windows server I am using does not have permissions set to allow a web page to create tables within a database.

 

So I looked in Admin > Includes > additional_images_configure.php

 

Begining from line 212 is the following code:

 

// this array is used for creating new tables

$tables_array = array();

$tables_array [] = array ( 'tablename' => 'additional_images',

'create' => "CREATE TABLE additional_images (

additional_images_id int(11) NOT NULL auto_increment,

products_id int(11) NOT NULL default '0',

images_description varchar(64) default NULL,

thumb_images varchar(64) default NULL,

medium_images varchar(64) default NULL,

popup_images varchar(64) default NULL,

PRIMARY KEY (additional_images_id),

KEY products_id (products_id)

);",

'remove' => "DROP TABLE IF EXISTS additional_images;" );

 

 

// this array is used for altering table that already exist in the default osC shop

$table_mods_array = array();

$table_mods_array [] = array ( 'tablename' => 'products',

'columnname' => 'products_image_med',

'create' => "ALTER TABLE products ADD products_image_med VARCHAR(64) default NULL AFTER products_image;",

'remove' => "ALTER TABLE products DROP products_image_med" );

$table_mods_array [] = array ( 'tablename' => 'products',

'columnname' => 'products_image_pop',

'create' => "ALTER TABLE products ADD products_image_pop VARCHAR(64) default NULL AFTER products_image_med;",

'remove' => "ALTER TABLE products DROP products_image_pop" );

$table_mods_array [] = array ( 'tablename' => 'products',

'columnname' => 'products_image_description',

'create' => "ALTER TABLE products ADD products_image_description VARCHAR(64) default NULL AFTER products_image_pop;",

'remove' => "ALTER TABLE products DROP products_image_description" );

// table mod added to catch earlier versions of Additional Images

$table_mods_array [] = array ( 'tablename' => 'additional_images',

'columnname' => 'thumb_images',

'create' => "ALTER TABLE additional_images ADD thumb_images VARCHAR(64) default NULL AFTER images_description;",

'remove' => "ALTER TABLE additional_images DROP thumb_images" );

 

I gave this to my techie mate and he manually created the tables using php myadmin

 

Then I logged in and went to

 

http://www.mydomain.com/catalog/admin/addi...s_configure.php and it said that some of the items were not installed and I clicked on the "Force Configuration Defaults" and lciked the button and hey presto it all worked!!!

 

I must admit this whole problem would have been much simpler if the sql for a fresh install had been included..

 

great contribution otherwise!!

Share this post


Link to post
Share on other sites

How can I make the additional images on product_info.php into 1 long list of images....1 on top of each other. At present they are displayed in rows of 3 images. I have narrowed it down to the displayimages.php file that controls this action, but I cannot get the desired effect. I have managed to get the images to display in rows of 2, but I cant get it to show images in rows of 1. This is how i mean if you are confused:

 

Image

Image

Image

etc

etc

 

Any help would be great.

 

EDIT: Just noticed the variables at the top of the page! var $numberofrows etc!! Its fixed now!!

Edited by jpmad4it

Share this post


Link to post
Share on other sites

I have tried this module - and gone through updates carefully but Product_info.php displays:

 

1146 - Table 'violateclothing-oscommerce.TABLE_ADDITIONAL_IMAGES' doesn't exist

 

select additional_images_id, images_description, thumb_images, medium_images, popup_images from TABLE_ADDITIONAL_IMAGES where products_id = '32'

 

[TEP STOP]

 

http://www.violateclothing.com/catalog/pro...;products_id=32

 

 

Any ideas would be really helpful

 

Graeme

Share this post


Link to post
Share on other sites

Hi everyone,

 

I've downloaded the file Additional Images - 2007/09/21 - v2.0.1 - Tree365(tree365@hotmail.com).

I understand everything in the instalation except for the compare files...

I have a New Unchanged shop so can I replace the files in my catalog with the ones in 2_files_to_compare folder ?

 

I've tried to find some help in this thread but there are so many pages...I'm really needing help.

 

Thank's to everyone in advance.

Share this post


Link to post
Share on other sites

:'(

at first, thank you for great contribution which really help my website.

 

I'd like to have just one modification. would you please help?

the addtional picture' size are the same on product_info and popup_add_image.

I would like to have the image on popup_add_image much smaller. How could I?

 

example)----addtional image size---

 

on Product_info

138 x 138 like other small image size

 

on popup_add_image

70 x 70

Share this post


Link to post
Share on other sites

On the product info page the additional images are displayed at the same size as the normal images are displayed. I belive it's the medium size or "Display Image" size. I want the additional images to be displayed using the "Small Image" size restrictions on that page. Been playing with the file for a while now and cant seem to get anywhere.

Share this post


Link to post
Share on other sites

OSCommerce Version 2.2-MS2

Server OS: Linux

PHP Version: 4.1.2 (on server)

 

Hi All...

 

I have installed this GREAT contribution: Additional Imanges without any issue - it all works perfectly!

Thank you it is just want I needed.

 

I have also added another contribution: Stock Viewer with Quantity per Attribute without any issue.

 

And now I am trying to add a contribution: Product Sort Contribution

 

I have *limited* PHP coding knowledge and am using the Beyond Compare software to update the files...however have a question on how to merge the code in the categories.php file. If anyone already has both contributions installed, or if anyone simply knows how to merge the code....I would be eternally greatful.

 

catalog/admin/categories.php

(my current code including Additional Image Contrib)

            // BOF: Additional Images: Added: , products_image_med, products_image_pop, products_image_description

           $product_query = tep_db_query("select products_quantity, products_model, products_image, products_image_med, products_image_pop, products_image_description, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
           // EOF: Additional Images
           $product = tep_db_fetch_array($product_query);

           // BOF: Additional Images: Added: , products_image_med, products_image_pop, products_image_description     -and-   , '" . tep_db_input($product['products_image_med']) . "', '" . tep_db_input($product['products_image_pop']) . "', '" . tep_db_input($product['products_image_description']) . "'
           tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model,products_image, products_image_med, products_image_pop, products_image_description, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_image_med']) . "', '" . tep_db_input($product['products_image_pop']) . "', '" . tep_db_input($product['products_image_description']) . "', '" . tep_db_input($product['products_price']) . "',  now(), " . (empty($product['products_date_available']) ? "null" : "'" . tep_db_input($product['products_date_available']) . "'") . ", '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "')");
           // EOF: Additional Images
           $dup_products_id = tep_db_insert_id();

           // BOF: Additional Images
           // get image names from database
           $ai_copyimg_query = tep_db_query("select products_id, images_description, popup_images, medium_images, thumb_images from " . TABLE_ADDITIONAL_IMAGES . " where products_id = '" . (int)$product_id . "'");
           while ($ai_copyimg = tep_db_fetch_array($ai_copyimg_query)) {
             tep_db_query("insert into " . TABLE_ADDITIONAL_IMAGES . " (products_id, images_description, popup_images, medium_images, thumb_images) values ('" . (int)$dup_products_id . "', '" . tep_db_input($ai_copyimg['images_description']) . "', '" . tep_db_input($ai_copyimg['popup_images']) . "', '" . tep_db_input($ai_copyimg['medium_images']) . "', '" . tep_db_input($ai_copyimg['thumb_images']) . "')");
           }
           // EOF: Additional Images

 

(code I need to insert)

// BOF Product Sort
		$product_query = tep_db_query("select products_quantity, products_model, products_image, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id, products_sort_order from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
		$product = tep_db_fetch_array($product_query);

      		tep_db_query("insert into " . TABLE_PRODUCTS . " (products_quantity, products_model, products_image, products_price, products_date_added, products_date_available, products_weight, products_status, products_tax_class_id, manufacturers_id, products_sort_order) values ('" . tep_db_input($product['products_quantity']) . "', '" . tep_db_input($product['products_model']) . "', '" . tep_db_input($product['products_image']) . "', '" . tep_db_input($product['products_price']) . "',  now(), '" . tep_db_input($product['products_date_available']) . "', '" . tep_db_input($product['products_weight']) . "', '0', '" . (int)$product['products_tax_class_id'] . "', '" . (int)$product['manufacturers_id'] . "', '" . (int)$product['products_sort_order'] . "')");
		$dup_products_id = tep_db_insert_id();
// EOF Product Sort

 

Question: Do I merge the two codes and if so with PHP is it ok to have a BOF Product Sort, Additional Image and then EOF Product Sort, Additional Image or do I seperate them and place the Product Sort Code above the Additional Image Code???

 

Any help anyone can offer on this would be much appreciated.

 

Thank you,

Nita

Share this post


Link to post
Share on other sites

Hello All...

 

Just a quick reply to my earlier thread....

 

I believe that I figured out how to merge the 3 contributions successfully. :D

I would be happy to share the files necessary if anyone else needs to merge these same 3 contributions.

I strongly suggest that you use a comparison software - I use Beyond Compare.

Please remember I am not a PHP guru (still a green pea)

I am still testing everything...so far it all seems to be working GREAT!!!

 

LOVE THESE CONTRIBUTIONS

 

The three contributions that I am using are:

Product Sort Contrib

http://addons.oscommerce.com/info/911

Stock Viewer with Quantity per Attribute

http://addons.oscommerce.com/info/4061

Additional Images Contrib

http://addons.oscommerce.com/info/1032

Share this post


Link to post
Share on other sites

Hi all,

 

When I searching trough google, I found this article "OScommerce: "Additional Images" Module SQL Injection": http://www.opencommercio.com/Article169.html.

 

So, you all should update the code like below instruction....

 

Hello!

Doing forensics in an hacked shop system we found the following vulnerability in the "Additional Images" Module of OScommerce from "Author: zaenal <zaenal AT paramartha.org>. Find more detailed information here: [url="http://www.oscommerce.com/community/contributions,1032"]http://www.oscommerce.com/community/contributions,1032[/url]

Description:

If a anonymous remote user changes the value of 'products_id' when he gets "product_info.php" he is able to insert SQL Code in an SQL Query, if the module in question is installed.

Impact:

An attacker might read out parts or the whole of the database.

Code:

the following code on line 16 in SHOPROOT/catalog/includes/modules/ additional_images.php doesn't check the value of the "products_id" variable.

$images_product = tep_db_query("SELECT additional_images_id, products_id, images_description, medium_images, popup_images FROM " . TABLE_ADDITIONAL_IMAGES . " WHERE products_id = '" . $HTTP_GET_VARS ['products_id'] . "'");

Solution:

Contact the author/vendor.

Workaround:

Change line 16 in SHOPROOT/catalog/includes/modules/ additional_images.php to:

$images_product = tep_db_query("SELECT additional_images_id, products_id, images_description, medium_images, popup_images FROM " . TABLE_ADDITIONAL_IMAGES . " WHERE products_id = '" . (int) $HTTP_GET_VARS['products_id'] . "'");

thanks to the guy who found the log entry in question.

bye
defa 

Share this post


Link to post
Share on other sites

Just installed and everything went fine until i did the edit on the files and the admin url would not work giving me a HTTP 404 error!?!?

 

SO i loaded the backed up files back to FTP and now i get the following error when i try to log into the admin panel..

 

1146 - Table 'fixxtuning.TABLE_ADMINISTRATORS' doesn't exist

select id from TABLE_ADMINISTRATORS limit 1

[TEP STOP]

 

It seems like something got screwy with the database but i have no clue how to fix it!! any help would be appreciated.

Share this post


Link to post
Share on other sites

For the guy confused about the compare...

 

it's basically saying that you need to change certain lines of code in the files that are listed. So, instead of going through the code to find parts here and there and replace them manually, if you use a compare program, it'll show you where the differences are. This makes your job a lot easier.

Edited by zooshx

Share this post


Link to post
Share on other sites

Hello,

 

I have installed the module to my local shop installation (after the backup), I am getting the following error on the storefront, but admin working fine:

 

Fatal error: Class 'infoHeaderHeading' not found in C:\www\sports\includes\boxes\search.php on line 18

 

 

Please help me!

 

Thanks.

Share this post


Link to post
Share on other sites

Odd Problem I hope someone can help

 

 

Additional images module has worked fine for until I upgraded and moved to a bigger server

 

Everything was imported and worked fine.

 

This is the behavior that is going on

 

In Admin I can add additional images and they show fine in admin - Everything in admin with module works correctly as it should

 

On the customer side all thumbs show as a square with the dreaded red X as a broken image

Full size images in pop up work fine

image directory and all under it have permissions of 777

 

In the image/imagecache directory I have deleted all images and reloaded customer page and thumbnails appear once again in this directory for the broken images. These images are still broken on customer side. I have d/loaded one of the broken images and it does not work so that means that the thumbnailer is creating the filename of thumb that is supposed to be there but this file is unable to be opened. I have tried loading the broken thumb image in a browser window by going to mysite.com/images/imagecache/filename.jpg and all that loads in the browser window are the words mysite.com/images/imagecache/filename.jpg with no image

 

This problem does not happen with products that were loaded into the database before the server migration. It only happens with products added to the site since the migration. All older product thumbs work fine.

 

I have checked all configure files as well as all permissions and everything seems to be ok.

 

Here are server setups:

 

The PHP configure:

'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-zlib-dir=/usr' '--with-mysql' '--with-gd=yes' '--with-png-dir=/usr' '--enable-track-vars' '--enable-force-cgi-redirect' '--enable-mbstring' '--enable-sockets' '--enable-magic-quotes' '--enable-discard-path' '--with-gettext' '--with-jpeg-dir=/usr' '--enable-ftp' '--with-gdbm' '--with-regex=system' '--with-ncurses' '--with-xml' '--enable-memory-limit' '--enable-gd-native-ttf' '--enable-versioning' '--with-freetype-dir=/usr' '--with-curl=/usr/local' '--with-openssl=/usr/local/ssl'

 

 

PHP Version 4.4.7

 

register_globals is on

safemode is off

 

 

Apache loaded modules

mod_php4, mod_setenvif, mod_so, mod_auth, mod_access, mod_rewrite, mod_alias, mod_userdir, mod_actions, mod_imap, mod_asis, mod_cgi, mod_dir, mod_autoindex, mod_include, mod_status, mod_negotiation, mod_mime, mod_log_config, mod_env, http_core

 

My GD Library

GD Support enabled

GD Version bundled (2.0.28 compatible)

FreeType Support enabled

FreeType Linkage with freetype

GIF Read Support enabled

GIF Create Support enabled

JPG Support enabled

PNG Support enabled

WBMP Support enabled

XBM Support enabled

 

 

Well there it is - Can anyone offer something ? I have played with this until I am exhausted.

Share this post


Link to post
Share on other sites

ok all is well and working again. Not sure if I understand why or how come but I got to checking the size of the images that I was uploading. The ones that gave a problem were 507K size of 480x360

 

All the rest of the pics that were working were 16k and same sizes... So I deleted the 506k pics and uploaded some smaller 16k pics and worked fine. So for some reason the the thumbnailer portion was choking on the bigger files. Not sure if I know why.

Share this post


Link to post
Share on other sites
For the guy confused about the compare...

 

it's basically saying that you need to change certain lines of code in the files that are listed. So, instead of going through the code to find parts here and there and replace them manually, if you use a compare program, it'll show you where the differences are. This makes your job a lot easier.

 

Need some help. I am using a compare program "zsCompare Pro Edition". When I run the compare of the files I see the differences. I am using a bought off the net theme / template so there are many differences. My question is how do I know what need to be changed. If I sync the files is it going to modify my original files to where its going to mess up whats already working. I am new to this, need some help...if anyone can help me, please :'(

 

Thanks a bunch.

Share this post


Link to post
Share on other sites

I've been reading a lot of posts and learned a lot about this contribution. I think its great and have seen some cool integrations. I've gotten everything successfully installed except the prduct_info.php page. I use a template that I purchased from the web so my product_page format is totally different.

 

Can anyone point me in the right direction for what I need to move over? I know to look at the BOF / EOF tags. However, it appears there is HTML code interspersed w/in the tags...i stayed awake quite late last night pouring over it and I can't isolate the code that determines the size of the image to display or how to integrate that logic into the layout structure of my customized site?

 

Any help is greatly appreciated.

Thanks,

 

Michael

Share this post


Link to post
Share on other sites

I figured out how to edit my product_info.php page. GREAT!!!!

 

I now have a problem w/ a contrib I installed and was hoping someone has had a similar problem? I'm trying to get this add-on to work w/ a lightbox contrib.

 

I have the lightbox from www.huddletogether.com/projects/lightbox/ installed and I can get it to work w/out the additional images contrib.

 

In a worst case scenario - has anyone used this contrib successfully w/ a lightbox add-on?

 

Thanks

 

Michael

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  

×