Author |
Message |
mds
Client
![](modules/Forums/images/avatars/blank.gif)
Joined: Dec 24, 2004
Posts: 194
Location: Michigan
|
Posted:
Tue Feb 13, 2007 11:01 pm |
|
trying to add a background image instead of background color to "blocks" (ie the "news" block) displayed in center of the page..i have changed the left and right side blocks succesfully just havnt figured out the center 1's yet
<tr>
Quote: | <td bgcolor=\"#F4F6FB\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">
<tr>
<td>"; |
----------------------------------------------------------------------------
i tried this
<td background-image= url(themes/fisubice/images/cellpic4.jpg)"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
<td>";
which gave a blank white screen on index
-----------------------------------------------------------
i tried this with same result
<tr>
<td background="themes/fisubice/images/cellpic4.jpg"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr> |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
Site Admin
![](modules/Forums/images/avatars/0c0adf824792d6d341ef4.gif)
Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Feb 13, 2007 11:30 pm |
|
Well, first of all "background-image" is a CSS / Style attribute not HTML, so you will either need to use:
style="background-image ......" or better, use a
class="give it a name" and then add that class definition to your CSS.
You are getting a parse error. Do you see anything different in how the quotes look in your <td> line? ![Wink](modules/Forums/images/smiles/icon_wink.gif) |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mds
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Feb 19, 2007 6:06 pm |
|
montego wrote: |
You are getting a parse error. Do you see anything different in how the quotes look in your <td> line? |
you mean with the "\" (backslashs) ? if so thats a direct copy and paste from the table.php file.........
montego wrote: | Well, first of all "background-image" is a CSS / Style attribute not HTML, so you will either need to use:
style="background-image ......" or better, use a
class="give it a name" and then add that class definition to your CSS.
|
i think ive tried the style="background-image" and it results in blank white page and as for the class="give it a name" i have no idea how to ...tho i will look into it...Thank you very much for the help |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Feb 19, 2007 6:12 pm |
|
Like I said, you have a parse error and it appears to be in the code you added. I am not sure if these are echo lines or a variable assignment, so I will assume it is echo. To fix the parse error, it would need to look like this:
Code:
echo "<td style=\"background-image= url(themes/fisubice/images/cellpic4.jpg)\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
<td>";
|
if you are going to wrap a string in " ", you MUST backslash each of the inner double-quotes.
Fix that first so that you can actually see what your code is doing rather than giving you the white page. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mds
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Feb 19, 2007 6:29 pm |
|
I apoligize if am totally missing what you saying ...but i copied what you have above and pasted over the bold below and that didnt work either......here is the file the bold is what i am trying to change: hope this helps
Code:<?php
/************************************************************/
/* OpenTable Functions */
/* */
/* Define the tables look&feel for you whole site. For this */
/* we have two options: OpenTable and OpenTable2 functions. */
/* Then we have CloseTable and CloseTable2 function to */
/* properly close our tables. The difference is that */
/* OpenTable has a 100% width and OpenTable2 has a width */
/* according with the table content */
/************************************************************/
function OpenTable() {
global $bgcolor1, $bgcolor2;
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"7\">
<tr>
<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
<td bgcolor=\"#486386\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
<td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
[b]<td bgcolor=\"#F4F6FB\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">[/b]
<tr>
<td>";
}
function CloseTable() {
echo "</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>";
}
function OpenTable2() {
global $bgcolor1, $bgcolor2;
echo "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"7\">
<tr>
<td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
<td bgcolor=\"#486386\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
<td bgcolor=\"#FFFFFF\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
[b]<td bgcolor=\"#F4F6FB\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">[/b]
<tr>
<td>";
}
function CloseTable2() {
echo "</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>";
}
?>
|
|
Last edited by mds on Mon Feb 19, 2007 6:52 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Feb 19, 2007 6:35 pm |
|
mds, please use the bbcode code tag....
By "not work" do you mean it is still giving you the white page (which is what I was first trying to resolve), or, it isn't showing the way you want it to?
I see no parse issues with this file as is, so you may have an issue in another file that you've possibly edited. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mds
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Feb 19, 2007 6:49 pm |
|
sorry..fixed
its blank white page......could this have something to do with working on this locally...... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Feb 19, 2007 9:30 pm |
|
What do you mean by "working on this locally"? If you are accessing this file directly, this script is just defining these functions so it will output a blank white page. This is a theme file to the tables.php right? I see know issue with this script so you must have a parse error somewhere else? Maybe with changes to the theme.php? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mds
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Feb 19, 2007 10:06 pm |
|
i have wamp setup on my desktop so i can have a working ravennuke site setup to work from instead of on the "live" server
yes its the standard fisubice theme that comes with ravens latest distro...only thing i have been editing is blocks.html, and this line in style.css Code:.body{background:url(\themes\fisubice\images\bg_main.jpg);color:#000000;}
|
nothing in themes.php has been changed
and so far everything is working until i try adding a background image in table.php...i can change to other colors etc. and everything works with color specified....just when trying to change to an image does it go blank
i'm also using PHPEDIT which checks for errors with changes and everything checks so far
when i add :
Code:echo "<td style=\"background-image= url(themes/fisubice/images/cellpic4.jpg)\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
|
phpedit gives me this error:
unexpected T_String, expecting ',' or ';' (line 24) of table.php
then if i take off the echo" in phpedit the error goes away but the dreaded white screen is still there |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
montego
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 20, 2007 9:48 pm |
|
Try this:
Code:
echo "<td style=\"background-image= url(themes/fisubice/images/cellpic4.jpg);\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
<tr>
|
If you see, I added a semi-colon to close out the style tag. Not sure that is it as its strange in that it denotes a parse error while I would think that would given you a different "run-time" issue.
By the way, CSS / Style URL's are relative to the file where the style tag is used. So, in this case, I am thinking this would not work the way you have it. You might try just:
images/cellpic4.jpg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
mds
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Feb 27, 2007 8:33 pm |
|
ok so ended up starting over with a fresh fisubice theme......somewhere along the way something went array so i decided to start over fresh...i also think that the browsers ( both firefox and IE ) where part at fault as well....for some reason firefox still does not load all the images ...and for the most part IE everything is working as changed...so far..
in tables.php heres what ended up working
Code:<tr>
<td style=\"background-image= url(themes/fisubice/images/cellpic_nav.jpg)\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"4\">
<tr>
<td>";
|
and as for the
Quote: | By the way, CSS / Style URL's are relative to the file where the style tag is used. So, in this case, I am thinking this would not work the way you have it. You might try just:
images/cellpic4.jpg |
i had thought about that about the same time you posted it but didnt get a chance to try it till tonight and no go.....i started with images/cellpic4.jpg and saved it...refreshed the page...nothing...added in a / and saved nope didnt work either...added back in fisubice and saved nope no diiff...anyway ended up with full path to image..
i have font colors to play with and the "story pages" to play with and few minor details to change yet ..but you can view what i have done so far at nocfa dot org and let me know how im doing and as i said it displays like it should with IE and not firefox...atleast not for me anyway...please let me know if it work in firefox for you
Thanks for all the help (past and future ) and the time I've taken you away from the 2.10 project that we are all trying to wait patiently for ... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|