PDA


View Full Version : Changing the header image from navbar


FamilyCorner
11-25-2005, 11:33 AM
Ok I KNOW I had the option to change this during the installation process, but I didn't have the idea at that time :(

What I would like to do is change the header image that pulls from the navbar template, but I only want to change it for the links directory, not for the whole forum. For example, on the forum I have an image that says "FamilyCorner Community Forums" and in the links directory I want it to be a different image.

Is there an easy solution to this?

Should I just create a new template by copying the navbar template, then replace the image in the new template?

Or is there another way?

(annoyed with myself)

Brian
11-30-2005, 05:39 PM
The easiest way would probably be to edit your header template and add an if condition around the header image, something like this:

<if condition="VBA_SCRIPT == 'links_directory'">
<img src="/path/to/links/header/image" border="0" alt="$vboptions[bbtitle]" />
<else />
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
</if>

FamilyCorner
12-01-2005, 11:57 AM
The easiest way would probably be to edit your header template and add an if condition around the header image, something like this:

<if condition="VBA_SCRIPT == 'links_directory'">
<img src="/path/to/links/header/image" border="0" alt="$vboptions[bbtitle]" />
<else />
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
</if>

Ok I tried this, but I have a feeling Idid something wrong. Where it says:

<if condition="VBA_SCRIPT == 'links_directory'">

do I need to change the words 'links_directory'? If so, and excuse my ignorance on this, what would this be changed to? Here's my links database:
http://www.familycorner.com/forums/links/

and here are my forums
http://www.familycorner.com/forums/

Thank you for your patience with me :)

Brian
12-01-2005, 05:09 PM
No, nothing in the code should need to be changed, except for the path to those images in the <img> tag. Can you post the exact code you used and elaborate a little on how exactly it didn't work?

FamilyCorner
12-01-2005, 05:28 PM
No, nothing in the code should need to be changed, except for the path to those images in the <img> tag. Can you post the exact code you used and elaborate a little on how exactly it didn't work?

Sure :)

First of all, I removed the image tag from my forums header file ages ago and built it into the navbar template instead. I also have the full path to the header image instead of the $stylevar[titleimage].

This is what I inserted into my navbar template:

<td bgcolor=ffffff>
<if condition="VBA_SCRIPT == 'links_directory'">
<img src="http://www.familycorner.com/forums/images/funbooka.gif" border="0" alt="$vboptions[bbtitle]" />
<else />
<a href=http://www.familycorner.com/forums/index.php3?s=><img src=http://www.familycorner.com/forums/images/forumsheader.jpg border=0></a>

</if></td>


Does it mess up the if statement by using the full paths?

Brian
12-01-2005, 06:18 PM
Nope, using the full paths should not affect anything. I'm wondering if perhaps the fact that you're not using the quotation marks in your tags could be what's affecting it. Try using the code below instead. If that doesn't work, please let me know what the result looks like or how it's not working as intended.

<td bgcolor="ffffff">
<if condition="VBA_SCRIPT == 'links_directory'">
<img src="http://www.familycorner.com/forums/images/funbooka.gif" border="0" alt="$vboptions[bbtitle]" />
<else />
<a href="http://www.familycorner.com/forums/index.php3"><img src="http://www.familycorner.com/forums/images/forumsheader.jpg" border="0"></a>

</if></td>

FamilyCorner
12-01-2005, 07:00 PM
Nope, using the full paths should not affect anything. I'm wondering if perhaps the fact that you're not using the quotation marks in your tags could be what's affecting it. Try using the code below instead. If that doesn't work, please let me know what the result looks like or how it's not working as intended.


Ok, I figured out the problem. I switched styles, I only have 2. It seems it was working my "original style", which is the parent style. But for some reason it wasn't working in the child style. That I don't understand because I thought if you made a change to the parent style template it made that change in the child style also? :confused: Anyway, I just went in and changed the template in the child style and now it works.

I have another question though, since I have my navbar pulling over, the links that are there are pulling in the "links" directory. For example:

New Posts should be
http://www.familycorner.com/forums/search.php3?do=getnew

but in the links section they are showing up as
http://www.familycorner.com/forums/links/search.php3?do=getnew

Would this require an if statement also since I am using the same navbar template for the forums and for the links database?

FamilyCorner
12-01-2005, 07:01 PM
Anyway, I just went in and changed the template in the child style and now it works.

OOPS!!! How rude of me....

Thank you!!!