Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Image resizing


Beezer2005

Recommended Posts

I just installed the On-the-fly thumbnail generator but every time I change the text in the output-html file I get the following error...I even changed back to an old html-output.php file in and everything works fine until I change it. Please help ASAP, My thumbnails look sad. Any help would be greatly appreciated!! heres the code where the error occurs

 

if (empty($default) && isset($GLOBALS[$name])) $default = stripslashes($GLOBALS[$name]);

 

for ($i=0, $n=sizeof($values); $i<$n; $i++) {

$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

if ($default == $values[$i]['id']) {

$field .= ' SELECTED';

}

 

$field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

}

$field .= '</select>';

 

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

 

return $field;

}

 

Also I get the following error..

 

Parse error: parse error, unexpected '<', expecting ',' or ';' in /home/rubarts4/public_html/catalog/includes/functions/html_output.php on line 16

 

line 16:

global $request_type, $session_started, $SID;

 

 

Thanks,

Bill & Tashia

Link to comment
Share on other sites

Most likely you are not replacing all the code you need to be. If you are not familiar with the code the directions are not as clear as they could be.

 

You need to start with the following at or about line 72 in a default install

 

////

// The HTML image wrapper function

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

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

return false;

 

 

All the way to the following at or about line 113

 

if (tep_not_null($parameters)) $image .= ' ' . $parameters;

 

$image .= '>';

 

return $image;

}

 

Basically you go all the way to just before and replace with the new code.

 

////

// The HTML form submit button wrapper function

// Outputs a button in the selected language

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Great..Now I have another error stated below:

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/rubarts4/public_html/catalog/includes/functions/html_output.php on line 278

Any Help Greatly Appreciated!!!

 

Thanks

Bill & Tash

 

 

Heres some of the code surrounding the error line

 

 

for ($i=0, $n=sizeof($values); $i<$n; $i++) {

$field .= '<option value="' . tep_output_string($values[$i]['id']) . '"';

if ($default == $values[$i]['id']) {

$field .= ' SELECTED';

}

 

line=278 $field .= '>' . tep_output_string($values[$i]['text'], array('"' => '"', '\'' => ''', '<' => '<', '>' => '>')) . '</option>';

}

$field .= '</select>';

 

if ($required == true) $field .= TEXT_FIELD_REQUIRED;

 

return $field;

}

 

////

// Creates a pull-down list of countries

function tep_get_country_list($name, $selected = '', $parameters = '') {

$countries_array = array(array('id' => '', 'text' => PULL_DOWN_DEFAULT));

$countries = tep_get_countries();

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...