»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 06-08-2003, 04:24 PM   #1 (permalink)
Registered User
 
Join Date: Jan 2003
Posts: 79
aarmenaa is on a distinguished road
Table Background through PHP echo

I'm trying to create a table, and it has a background image. The table and it's contents displays fine, but the background image isn't present. I get no errors, just no picture. Is it not possible to have a table work this way in PHP? I have included my code below. I'm making a theme for PHP-Nuke, but I'm a complete noob at PHP, so I'm looking lots of tutorials. Everything I read says it should be fine with any HTML I write.

-Aarmenaa

PHP file:
$tmpl_file = "themes/BinaryToast/header.htm";
$thefile = implode("", file($tmpl_file));
$thefile = addslashes($thefile);
$thefile = "\$r_file=\"".$thefile."\";";
eval($thefile);
print $r_file;

header.htm (called by PHP above):
<table width="100%" height="122" border="0" cellpadding="0" cellspacing="0" background="http://www.binarytoast.com/themes/BinaryToast/images/extender.gif" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td><img src="http://www.binarytoast.com/themes/BinaryToast/images/logo.gif" width="782" height="122" border="0" usemap="#topbar"></td>
</tr>
</table>

<map name="topbar">
<area shape="rect" coords="146,103,203,120" href="http://www.binarytoast.com/index.php">
<area shape="rect" coords="221,103,304,120" href="http://www.binarytoast.com/modules.php?name=Search">
<area shape="rect" coords="324,103,424,120" href="http://www.binarytoast.com/modules.php?name=News&file=categories&op=newindex& catid=2">
<area shape="rect" coords="443,103,532,120" href="http://www.binarytoast.com/modules.php?name=News&file=categories&op=newindex& catid=1">
<area shape="rect" coords="549,103,620,120" href="http://www.binarytoast.com/modules.php?name=Forums">
<area shape="rect" coords="638,103,736,120" href="http://www.binarytoast.com/modules.php?name=Your_Account">
</map>

<br>

Here's how it's supposed to work: There's a banner that's just a standard image in the table (logo.gif). In order to make the banner extend to the edge of any size browser, I took the last colum of pixels and made the extend.gif picture a background image. If I run the HTML on my computer, it looks fine, but the part about the background image is ignored when it's run through the PHP.

It's supposed to look like this


Last edited by aarmenaa; 06-08-2003 at 04:28 PM.
aarmenaa is offline   Reply With Quote
Old 06-09-2003, 12:00 PM   #2 (permalink)
Registered User
 
gothic's Avatar
 
Join Date: Oct 2001
Location: Palatine, IL
Posts: 375
gothic is on a distinguished road
I copy/pasted your code and dumped it onto my server and it worked perfectly (I assume anyway).

It displayed a blank page, with a 'Binary Toast' logo ontop which is an imagemap.

If I load header.htm without parsing it through the php script, it looks exactly the same.

I'm on Apache 2.0.46/Unix with PHP 4.3.1..
gothic is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 04:43 PM.