Zen Cart Logo
Forums / General Questions / <img> tag not working!?

<img> tag not working!?

Locked

Views: 2,688

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
16 Aug 2007, 3:28 AM
#1
flipjargendy avatar

flipjargendy

New Zenner

Join Date:
Jun 2007
Posts:
87
Plugin Contributions:
0

<img> tag not working!?

I'm having problems with <img> tags. No image shows up and there isn't even a spot with a broken image icon. I've had problems with this on my define_main_page.php as well as tpl_header.php.

Does anyone know what would be the cause?

I don't see anything wrong but maybe I'm going crazy... i have been looking at this screen a little too much lately, so it's quite possible. Here is a little code from each:

define_main_page.php> <img style="float:right; padding:6px; margin-top:5px;" src="../../../templates/wiseTemplate/images/blogImage.gif">

There are millions of
...
into the blood stream.
<br><br>
<a href="index.php?main_page=page&id=12&chapter=0"><h4>Read More (Click Here)</h4></a>

tpl_header.php> <div id="headerWrapper">

<!--bof-navigation display--> <div id="navMainWrapper"> <div id="navMain"> <ul class="back"> <li><?php echo '<a href="' . HTTP_SERVER . DIR_WS_CATALOG . '">'; ?><?php echo '<img src="../images/mnHome.gif">'; ?></a></li> <?php if ($_SESSION['customer_id']) { ?> <li><a href="<?php echo zen_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></li> <?php if (!($_SESSION['COWOA'])) { ?>
16 Aug 2007, 2:37 PM
#2
flipjargendy avatar

flipjargendy

New Zenner

Join Date:
Jun 2007
Posts:
87
Plugin Contributions:
0

Re: <img> tag not working!?

I noticed that in my subject it says (COWOA installed). I did not put that there, I'm assuming a MOD did. Is this a common problem with COWOA?

16 Aug 2007, 7:19 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: <img> tag not working!?

flipjargendy:

I noticed that in my subject it says (COWOA installed). I did not put that there, I'm assuming a MOD did. Is this a common problem with COWOA?

It may or may not be.
It's uncertain.
Perhaps someone using the COWOA mod might know better.
Or perhaps removing the COWOA code might reveal whether the problem persists without it installed.

17 Aug 2007, 3:02 PM
#4
flipjargendy avatar

flipjargendy

New Zenner

Join Date:
Jun 2007
Posts:
87
Plugin Contributions:
0

Re: <img> tag not working!?

I had an idea of what might cause this last night. Tell me if I'm wrong... I'm just guessing.

define_main_page.php is located in /includes/language/english/html_includes/ so to make an image show up on a page located there I would type > <img src="../../../templates/customTemplate/images/image.gif>
Because a PHP module (or whatever) calls the defines page would the defines page actually be considered in the directory of the PHP file that calls it?

17 Aug 2007, 3:44 PM
#5
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: <img> tag not working!?

I am not sure which is which, but IE or FF does not show broken images, just the alt text (and if the alt text is missing it will show nothing).

(And the file that is called by the browser is the "base file", not the included or required files by the script.)

17 Aug 2007, 4:29 PM
#6
flipjargendy avatar

flipjargendy

New Zenner

Join Date:
Jun 2007
Posts:
87
Plugin Contributions:
0

Re: <img> tag not working!?

(And the file that is called by the browser is the "base file", not the included or required files by the script.)

So technically the img tag should be working correctly if I type it in (like I did above) on the define page?

17 Aug 2007, 8:07 PM
#7
flipjargendy avatar

flipjargendy

New Zenner

Join Date:
Jun 2007
Posts:
87
Plugin Contributions:
0

Re: <img> tag not working!?

I am becoming slow :frusty:

I decided to just use:
~/public_html/zenCartincludes/templates/customTemplate/images/image.gif

17 Aug 2007, 9:04 PM
#8
paulm avatar

paulm

Totally Zenned

Join Date:
Nov 2003
Posts:
1,878
Plugin Contributions:
5

Re: <img> tag not working!?

flipjargendy:

I decided to just use:
~/public_html/zenCartincludes/templates/customTemplate/images/image.gif:shocking:

If that works it indicates that it was just your path that was wrong. The above path is hardcoded and absolute. You really should try to avoid that, and use relative and defined paths (definded by the Zen Cart script).

17 Aug 2007, 11:29 PM
#9
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,606
Plugin Contributions:
0

Re: <img> tag not working!?

Try includes/templates/customTemplate/images/image.gif

18 Aug 2007, 2:58 AM
#10
flipjargendy avatar

flipjargendy

New Zenner

Join Date:
Jun 2007
Posts:
87
Plugin Contributions:
0

Re: <img> tag not working!?

Kim:

Try includes/templates/customTemplate/images/image.gif

Woah, i thought i tried that (several times) to be sure it didn't work.... it works!! Man i'm getting burned out with this client.

Thanks guy!

18 Aug 2007, 2:06 PM
#11
flipjargendy avatar

flipjargendy

New Zenner

Join Date:
Jun 2007
Posts:
87
Plugin Contributions:
0

Re: <img> tag not working!?

I just tried the above in tpl_header.php and it doesn't work I'll try some things and post what works for those who ever are looking to solve the same problem.

UPDATE:
It was a typo... it works!