Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[resize contribution] Short PHP syntax question


Recommended Posts

I am using the resize contribution, and inserted 1 line to html_output.php, but it is hard coded (currently set to https), and I prefer to change it to tep, so it will work faster when I use http and not https:

 

$image = '<img src="https://www.MyUrl.com/resize.php?image=http://www.MyUrl.com' . tep_output_string($src) . '&width=' . $width . '" border="0" alt="' . tep_output_string($alt) . '"';

 

I tried to change it like this, but it output the title twice instead of once, so I must be doing it wrong:

 

$image = tep_image(DIR_WS_HTTP_CATALOG . 'resize.php?image=http://www.MyUrl.com' . tep_output_string($src) . '&width=' . $width . '" border="0" alt="' . tep_output_string($alt) . '"');

 

What is the the correct way to revise it?

Link to comment
Share on other sites

I am using the resize contribution, and inserted 1 line to html_output.php, but it is hard coded (currently set to https), and I prefer to change it to tep, so it will work faster when I use http and not https:

 

$image = '<img src="https://www.MyUrl.com/resize.php?image=http://www.MyUrl.com' . tep_output_string($src) . '&width=' . $width . '" border="0" alt="' . tep_output_string($alt) . '"';

 

I tried to change it like this, but it output the title twice instead of once, so I must be doing it wrong:

 

$image = tep_image(DIR_WS_HTTP_CATALOG . 'resize.php?image=http://www.MyUrl.com' . tep_output_string($src) . '&width=' . $width . '" border="0" alt="' . tep_output_string($alt) . '"');

 

What is the the correct way to revise it?

this is the function from the html_output.php:

 

function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '', $res = 1, $addattribs = 1)

 

 

so you see what you made wrong?

 

 

so if you place an image with that function it looks like this:

 

tep_image(>images adress< , >alt-text< , >width< , >height< , >parameters<)

 

 

;)

Edited by iveo
Link to comment
Share on other sites

Thanks you ;)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...