PDA


View Full Version : different header


craiovaforum
11-21-2005, 12:49 PM
If I want a different header for my CMPS, not the one of the forum, how can I do that?


I edited the adv_portal template, modified the code:
$headinclude

</head>
<body>

$header

$navbar to this:

$headinclude

</head>
<body>

$adv_header
$navbar

and created a new template called adv_header where I copy/paste all the code from the forum header but with the change of the logo that I use on the forums but nothing is displayed. The header doesn't load anymore...


what am I doing wrong?

KW802
11-21-2005, 01:00 PM
what am I doing wrong?Without knowing/seeing how much of a custom style you're using the simplest thing would be to change your "header" template so that your header graphic is inside of a conditional.....


<if condition="THIS_SCRIPT != 'adv_index'">
{code for the normal logo}
<else />
{code for the CMPS page logo}
</if>

craiovaforum
11-21-2005, 01:04 PM
hmm, I'm trying that now, wat forr the result :P

craiovaforum
11-21-2005, 01:09 PM
hmmm
it's not working
something's wrong because on the CMPS page I get the header that I want but on the forum page I get 2 headers, on top, the forum header and below the CMPS header

KW802
11-21-2005, 01:12 PM
Please post exactly which templates you've modified and what those changes have been. The only template that should've been modified is the "header" template.

craiovaforum
11-21-2005, 01:17 PM
ok, my header template looks like this after the modification you suggest:

<if condition="THIS_SCRIPT != 'adv_index'">
<!-- logo -->

<head>
<meta http-equiv="Content-Language" content="en-us">
</head>

<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="left"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="http://klass.rdscv.ro/forum2/images/misc/logo.jpg" border="0" alt="$vboptions[bbtitle]" /></a></td>

<td align="right">
<if condition="$foruminfo['banner'] AND $foruminfo['bannerlink']"><right><a href="$foruminfo[bannerlink]" target="_blank"><img src="$foruminfo[banner]" alt="$foruminfo[banneralt]" border="0" /></a></right><br />
<else />
<if condition="$foruminfo['banner']"><right><img src="$foruminfo[banner]" alt="$foruminfo[banneralt]" border="0" /></right><br />
<else />
<if condition="$foruminfo['bannercode']"><right>$foruminfo[bannercode]</right><br />
<else /> <object border="0" width="600" height="100">
<embed src="magic2.swf" width="600" height="100" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" /></object>

</if>
</if>
</if>
</if>
</td>

</tr>
</table>
<!-- /logo -->

<else />

<!-- logo -->

<head>
<meta http-equiv="Content-Language" content="en-us">
</head>

<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
<td align="left"><a href="$vboptions[forumhome].php?$session[sessionurl]"><img src="http://klass.rdscv.ro/forum2/images/misc/logo.jpg" border="0" alt="$vboptions[bbtitle]" /></a></td>

<td align="right"><img src="http://klass.rdscv.ro/forum2/attachment.php?attachmentid=578&d=1132589474">
</tr>
</table>
<!-- /logo -->
</if>

<!-- content table -->
$spacer_open

$_phpinclude_output


note that I'm just trying to add a different banner now (so a hack would do) but if in the future I would want to modify the logo and/or add other information to the CMPS header...

KW802
11-21-2005, 01:24 PM
I may be counting wrong (hey, it's still too early in the day :p ) but in this section...</if>
</if>
</if>
</if>
</td>
... I think you have an extra </if> tag in there that doesn't belong.

craiovaforum
11-21-2005, 01:30 PM
ok, I solved the problem by enforcing the conition in the else part of the code by adding this:
<else />
<if condition="THIS_SCRIPT == 'adv_index'">
and closing the second if at the end...

craiovaforum
11-21-2005, 01:32 PM
I'll try your version too... :D

and guess what it worked, thanks! :D


Now I'm going to fix what I messed up by fixing this :D

thanks a lot!

KW802
11-21-2005, 01:45 PM
No problem, glad you got it working. :)