Jump to content
Sign in to follow this  
dr_lucas

[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?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Thanks you ;)

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  

×