[Fix] Problems with subSilver and backgrounds

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Ready
Registered User
Posts: 96
Joined: Thu May 23, 2002 6:44 am
Contact:

Post by Ready »

Tried using the first code mentioned again in the overall_header.tpl


background-image: url(templates/subSilver/images/T_BODY_BACKGROUND});

Running out of ideas... Could my background be to large? It is about 1200 X 1200... (Just a thought).



Nothing...
:?
-Ready
Teach
Registered User
Posts: 305
Joined: Wed Nov 28, 2001 6:58 am
Location: Hopefully, soon to be somewhere else

Post by Teach »

Ready wrote: Running out of ideas... Could my background be to large? It is about 1200 X 1200... (Just a thought).

To quickly test that theory, try temporarily using a small image (like 100 x 100) and see if it works.
User avatar
Techie-Micheal
Security Consultant
Posts: 19511
Joined: Sun Oct 14, 2001 12:11 am
Location: In your servers

Post by Techie-Micheal »

Ready wrote: Code for subSilver.css

Observation: My code is different than yours. And on top of all that the code listed below is wrong for what my board is doing... 8O I have different colors than what is listed below set in my styles adim. If my board isn't running off of this file... What the heck is it running off of!

My Forum link:

http://www.thewaterrats.com/phpBB2/index.php

Code: Select all

/* General page style. The scroll bar colours only visible in IE5.5+ */
body {
	background-color: #E5E5E5;
	scrollbar-face-color: #DEE3E7;
	scrollbar-highlight-color: #FFFFFF;
	scrollbar-shadow-color: #DEE3E7;
	scrollbar-3dlight-color: #D1D7DC;
	scrollbar-arrow-color:  #006699;
	scrollbar-track-color: #EFEFEF;
	scrollbar-darkshadow-color: #98AAB1;
	background-image: url(templates/subSilver/images/{T_BODY_BACKGROUND}); 
}
Code for overall_header.tpl

Code: Select all

<meta http-equiv="Content-Type" content="text/html; charset={S_CONTENT_ENCODING}">
<meta http-equiv="Content-Style-Type" content="text/css"></head><body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" background-image: url(templates/subSilver/images/{T_BODY_BACKGROUND});>

Look at the code you posted:
In the css file, the variable {T_BODY_BACKGROUND} is not recognized because the css file is not parsed by the server as the tpl files are. In the body tag, that code isn't correct either. If you want to do it that way, it should be:

Code: Select all

background="templates/subSilver/images/{T_BODY_BACKGROUND}">
If you want to do it directly via the css file, it should be this:

Code: Select all

background-image: url(images/img.gif);
See the difference? If you want to see an over-used example, check out my forums: http://forum.michealcottingham.com (won't leave the image up for too long though)
Last edited by Techie-Micheal on Thu Jun 06, 2002 10:51 pm, edited 1 time in total.
Proven Offensive Security Expertise. OSCP - GXPN
Ready
Registered User
Posts: 96
Joined: Thu May 23, 2002 6:44 am
Contact:

Post by Ready »

hmmm... Still working on it. Sorry to be suck a rock...


I am beginning to think we are working on two different files.

I am editing overall_header.tpl & subSilver.css.


If I edit just the subSilver.css file with

background-image: url(images/background.jpg);

it's going to work?


Bottom line is I am trying to do what you have done on your site. But with a few little extras... I plan on making the Table that the header runs in transparent to allow the background to be seen...

To give you an idea of where I am going and the look I am trying to get please look at another page of the site I am building...

http://www.thewaterrats.com/newsite/index.html

You will notice the Table below the nav bar is transparent. I want to do this with the board too... I don't have a problem making the Table I want transparent... It's just the darn background won't show up.

:(
-Ready
Kage Musha
Registered User
Posts: 444
Joined: Sun Dec 23, 2001 10:03 pm
Location: Someone's Heart
Contact:

Post by Kage Musha »

Bear wrote: Doh! That's because the CSS file doesn't know where that variable exists.

You would have to define the image in the CSS file.
Did you fill in the url in ACP when editing the theme?

for css file:

Code: Select all

BODY_BACKGROUND { background-image: url(images/background.jpg); } 
I can't test it since the server my board was on crashed >_<
https://www.rpggarden.com Development: Battle Mod
Released: PS2 Theme
Image Search b4 asking (less work for us :lol: )
Plz do not abuse my IM mediums or I'll have to block ya :evil:
User avatar
Techie-Micheal
Security Consultant
Posts: 19511
Joined: Sun Oct 14, 2001 12:11 am
Location: In your servers

Post by Techie-Micheal »

Ready wrote: hmmm... Still working on it. Sorry to be suck a rock...


I am beginning to think we are working on two different files.

I am editing overall_header.tpl & subSilver.css.


If I edit just the subSilver.css file with

background-image: url(images/background.jpg);

it's going to work?


Yes, that's correct. It's either or. I suggest changing your overall_header.tpl file as it's more dynamic. For example, if you change the file format, you will have to go in and change the css file. Then let's say you change the file name for whatever the reason. You will have to go back in and change the css file once more. But, overall_header.tpl picks that up automagically. :P
Proven Offensive Security Expertise. OSCP - GXPN
Ready
Registered User
Posts: 96
Joined: Thu May 23, 2002 6:44 am
Contact:

Post by Ready »

Ok... I have the background working now... And it is dynamic.


<body background="./templates/subSilver/images/{T_BODY_BACKGROUND}" bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">


This code was added to the <body> of the overall_header.tpl

background="./templates/subSilver/images/{T_BODY_BACKGROUND}"


I don't know why it is different than all of yours but... It works.
-Ready
greenteagod
Registered User
Posts: 3
Joined: Fri Jun 14, 2002 9:27 am

hmmmm

Post by greenteagod »

I cant get the background working at all
i have done everything they said here in the posts.
nothing is working
http://www.super-crush.com/nof/board

i edited the header to include my menu but the menu is nearly impossible to read without the background
User avatar
Techie-Micheal
Security Consultant
Posts: 19511
Joined: Sun Oct 14, 2001 12:11 am
Location: In your servers

Post by Techie-Micheal »

Are you absolutely positive your image is in the correct place you have have edited over_header.tpl for the call?
Proven Offensive Security Expertise. OSCP - GXPN
greenteagod
Registered User
Posts: 3
Joined: Fri Jun 14, 2002 9:27 am

yes

Post by greenteagod »

i did it exactally how it said to do it
User avatar
Techie-Micheal
Security Consultant
Posts: 19511
Joined: Sun Oct 14, 2001 12:11 am
Location: In your servers

Post by Techie-Micheal »

There seems to be some trouble with the server again, I don't know if this will get sent . . . What's the give me the stuff in the overall_header.tpl where it says body {
stuff
stuff
stuff
}
That's all I need.
Proven Offensive Security Expertise. OSCP - GXPN
greenteagod
Registered User
Posts: 3
Joined: Fri Jun 14, 2002 9:27 am

this is what it says

Post by greenteagod »

body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" topmargin="0" leftmargin="0" rightmargin="0" background-image: url(templates/subSilver/images/T_BODY_BACKGROUND});

i've also tried it like this

body bgcolor="{T_BODY_BGCOLOR}" text="{T_BODY_TEXT}" link="{T_BODY_LINK}" vlink="{T_BODY_VLINK}" topmargin="0" leftmargin="0" rightmargin="0" background="templates/subSilver/images/{T_BODY_BACKGROUND}"
and nothing

final edit
i tried this before it didnt work, for some reason its working now
i just set the background directly to
background="images/background.gif"
Ready
Registered User
Posts: 96
Joined: Thu May 23, 2002 6:44 am
Contact:

Post by Ready »

You forgot the period and slash. The reason it is like that is the index.php is in the phpBB2 folder. The background image you are calling has to be relative to the location of index.php. This drove me nuts for about a week until I figured it out.

The way your calling the image isn't going to work. the ./ will start it at the base of the directory tree which is where you want to go from.



mine
body background="./templates/subSilver/images/{T_BODY_BACKGROUND}"



yours
background="templates/subSilver/images/{T_BODY_BACKGROUND}"
-Ready
User avatar
janine
Registered User
Posts: 345
Joined: Sun Mar 24, 2002 6:38 pm
Location: Pa

Post by janine »

I cannot get this background in :( Ready, I tried everything that you said, and it just wont show up. It keeps coming up black. And yes, I have my image in subSilver/images.

Here's the lastest thing I tried. *sigh*

Code: Select all

body { 
	background-color: {T_BODY_BGCOLOR};
	scrollbar-face-color: {T_TR_COLOR2};
	scrollbar-highlight-color: {T_TD_COLOR2};
	scrollbar-shadow-color: {T_TR_COLOR2};
	scrollbar-3dlight-color: {T_TR_COLOR3};
	scrollbar-arrow-color:  {T_BODY_LINK};
	scrollbar-track-color: {T_TR_COLOR1};
	scrollbar-darkshadow-color: {T_TH_COLOR1};
               body background="./templates/subSilver/images/{T_BODY_BACKGROUND}" 
             

}
help...pretty please!
User avatar
Techie-Micheal
Security Consultant
Posts: 19511
Joined: Sun Oct 14, 2001 12:11 am
Location: In your servers

Post by Techie-Micheal »

janine: You have this:

Code: Select all

background="./templates/subSilver/images/{T_BODY_BACKGROUND}" 
When it should be this:

Code: Select all

background-image: url("images/{T_BODY_BACKGROUND}");
That goes at the top where the css definitions are. If you want to add it directly to the <body> tag, use this instead:

Code: Select all

background="images/{T_BODY_BACKGROUND}"
Does everybody see the difference?
<body background="images/{T_BODY_BACKGROUND">
as opposed to
body {
background-image: url("images/{T_BODY_BACKGROUND");
}
Proven Offensive Security Expertise. OSCP - GXPN
Locked

Return to “2.0.x Support Forum”