PDA

View Full Version : Multiple vBadvance headers


attroll
27 Nov 2005, 01:19
I hope I put this hack in the right loaction.

I was looking around for something that provided multiple headers for vBadvance products. I wanted different headers when I switched between the three vBadvance products.

I could not find one so I added to one that I already had. At this time it switches between the following vBadvance products Links, CMPS and the former vB Gallery.

To install this hack open you header template:

Find:

<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]">
&nbsp;
</td>
</tr>
</table>

Replace with:

<!--Multiple Headers -->
<!--Links header -->
<if condition="THIS_SCRIPT == 'linksindex'">
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]">
&nbsp;
</td>
</tr>
</table>
<else />
<!--end Links header -->

<!--Gallery header -->
<if condition="THIS_SCRIPT == 'gallery_index'">
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[right]">
&nbsp;
</td>
</tr>
</table>
<else />
<!--end Gallery header -->

<!--CMPS header -->
<if condition="THIS_SCRIPT == 'adv_index'">
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[center]">
<FONT SIZE="6" COLOR="white" FACE="Times Roman"></A>Maine Sledder</FONT>
&nbsp;
</td>
</tr>
</table>
<else />
<!--end CMPS header -->

<!--forum header -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
<td align="$stylevar[center]">
<FONT SIZE="6" COLOR="white" FACE="Times Roman"></A>Maine Sledder Discussion Forums</FONT>
&nbsp;
</td>
</tr>
</table>
<!--end forum header -->
</if>
</if>
</if>
<!--end Multiple Headers -->

If you donít have one of the above mentioned hacks then delete the lines between the corresponding statements:

Find: (note the Name of Hack is the name of the hack you do not have installed)

<!--Name of hack header -->
<!--end Name of hack header -->

You will also have to delete one other line if you removed lines from the above mentioned hack that you do not have installed:

Find:

</if>
<!--end multiple headers -->

Remove:

</if>

(note the are three </if> but only remove one)

There will be three different instances of the following code in the code above. One for each header. You will have to edit this to make a different header for each vBadvance header (Links, CMPS, or forums).

Edit this coded three times to what you want it to display for each header:

<td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>

PennylessZ28
27 Nov 2005, 01:42
Wait, that whole statement makes no sense, I think you forgot some code.

attroll
27 Nov 2005, 01:52
Wait, that whole statement makes no sense, I think you forgot some code.

Oh Crap. You right. LOL. Thanks you for pointing that out. I will get right on it.

attroll
27 Nov 2005, 02:07
There. I hope that makes more sense now.

PennylessZ28
27 Nov 2005, 02:13
Yeaht thats alot better, I saw that and I was like?? </if> thats it??? LOL

Great, this is just what I was looking for.

attroll
27 Nov 2005, 02:16
Phew, I found another problem with a background color I stuck in there for testing. I hope I uploaded the fix before anyone has tried it out.

PennylessZ28
27 Nov 2005, 02:20
All I needed to know was this "<if condition="THIS_SCRIPT == 'linksindex'">"

I've seen that used before for the dynamic links

G-Force 199
27 Nov 2005, 02:39
Any screenshot, text or zip file available ?

attroll
27 Nov 2005, 07:40
Any screenshot, text or zip file available ?

I could make some screen shots if you really want me to. But all it is going to do is show a different header when you go between the vBadvance Links, CMPS, and forum area.

Snake
27 Nov 2005, 11:48
* Aftermath clicks on install