PDA

View Full Version : Request: Custom Forum Headers?


Amiga-uk
01-14-2004, 09:52 PM
Hah.. Another request. Thanks loads to the people who've already helped me, btw :)

Okay, this one is for each individual forum to have a custom header file.. Im guessing it'd be an IF statement in the headerfile directing towards different templates for different forumid's, but a) im not sure if thats right, and b) i have no idea how to go about it.

So.. any help? Pretty please with sugar on top? :)

Kentaurus
01-15-2004, 01:53 AM
Hah.. Another request. Thanks loads to the people who've already helped me, btw :)

Okay, this one is for each individual forum to have a custom header file.. Im guessing it'd be an IF statement in the headerfile directing towards different templates for different forumid's, but a) im not sure if thats right, and b) i have no idea how to go about it.

So.. any help? Pretty please with sugar on top? :)I haven't tested it, but I think you can easily do this with conditionals:

<if condition="$_GET[forumid]==1">
yourheaderhere
</if>

<if condition="$_GET[forumid]==2">
yourheaderhere
</if>

<if condition="$_GET[forumid]==3">
yourheaderhere
</if>

heynurse
01-15-2004, 07:02 AM
I'm looking for the same thing, actually, I am just looking to have specific advertising banner code to be in specific forums for targeting reasons, I don't not necessarily the entire header.

Any suggestions for that? I'm new to this whole conditional thing?

Amiga-uk
01-15-2004, 11:48 AM
Thats what i thought it'd be like Kentaurus, i just dont know php very well.. heh..

Anyway, i'll test that and get back to ya. :) Thanks.

EDIT: Works perfectly, thanks mate.

^Heynurse, this works for that too..

Just put the if condition in a certain part of the header itself. Then it'll show the header in every forum, but only whats in the if conditions in the forum specified (hope you understood that)

Kentaurus
01-15-2004, 02:04 PM
I'm looking for the same thing, actually, I am just looking to have specific advertising banner code to be in specific forums for targeting reasons, I don't not necessarily the entire header.

Any suggestions for that? I'm new to this whole conditional thing?
Every forum has a forumid, you can check that in the admincp or when you enter the forum in the url, the conditional:

<if condition="$_GET[forumid]==1">
yourheaderhere
</if>

compares the forumid and in this case if the id is '1' whatever you have in "yourheaderhere" (html code probably) will appear only when you enter the forum 1. You can put as many conditions as you want only changing the forumid for different headers.

oldengine
11-08-2004, 11:25 AM
I haven't tested it, but I think you can easily do this with conditionals:

<if condition="$_GET[forumid]==1">
yourheaderhere
</if>

<if condition="$_GET[forumid]==2">
yourheaderhere
</if>

<if condition="$_GET[forumid]==3">
yourheaderhere
</if>
How would you apply an ELSE to this code so that if none of the above conditions are met, a common banner is shown?

oldengine
11-26-2004, 12:38 PM
<if condition="$forumid == 6">

do

<else />
<if condition="$forumid == 1">

do

<else />
<if condition="$forumid == 7">

do

<else />
<if condition="$forumid == 9">

do

<else />
<if condition="$forumid == 20">

do

<else />
<if condition="$forumid == 21">

do

<else />
<if condition="$forumid == 22">

do

<else />

do the main thing

</if></if></if></if></if></if></if><br />

There are probably six different ways to do this, but I'm a hacker and I got it done.

SaN-DeeP
11-26-2004, 04:21 PM
Check for Forum Home Annoucment hack from Logician one of his posts carries a good solution about same

Regards,