Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add text to popup image


deacon470

Recommended Posts

Posted

How can I add a standard text to my enlarged images? I would like to add the same text to all of the image popups.

 

Thank you

 

Rick Wolfe

Posted

/catalog/popup_image.php

 

Old code:

 

<body onload="resize();">
<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>
[b]<br>
[color="#FF0000"]<h1>Your text here!</h1>[/color][/b]
</body>
</html>

If your text isn't visible try making this number larger in the code:

 

  if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+[b][color="#FF0000"]60[/color][/b]-i);

Backup the file before making any edits.

 

Read my signature regarding that...

;)

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Jim

Thanks a lot for your reply. I really appreciate it. I have tried this code, but nothing shows up. I also tried changing the height size that you suggested to various numbers, but no text shows up.

Any further thoughts?

 

Rick

 

 

/catalog/popup_image.php

 

Old code:

 

<body onload="resize();">
<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?>
[b]<br>
[color="#FF0000"]<h1>Your text here!</h1>[/color][/b]
</body>
</html>

If your text isn't visible try making this number larger in the code:

 

  if (document.images[0]) window.resizeTo(document.images[0].width +30, document.images[0].height+[b][color="#FF0000"]60[/color][/b]-i);

Backup the file before making any edits.

 

Read my signature regarding that...

;)

Posted

Sometimes I post code I think will work.

 

Sometimes I post code I've tried to be sure it DOES work.

 

Since this was the latter, and NOT the former, I don't know what to say.

:huh:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Archived

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

×
×
  • Create New...