Welcome, Guest. Please Login or Register.
May 01, 2025, 12:01:13 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  Development  |  Graphics and Templates  |  various header templates « previous next »
Pages: [1] Reply Ignore Print
Author Topic: various header templates  (Read 1508 times)
maok
Noobie
*
Posts: 31


Asteroid do not concern me admiral

various header templates
« on: January 07, 2003, 11:18:33 PM »
Reply with quote

hi there

I would like to have a different header on each of my forums
I attempted to add php code into the templates.php file:

if($board==3)
{
echo"<img src=............>";
}

but it seems you can't read the current board in $board
does anybody knows where to read the number of the current board ?

thx.
Logged
Dude
Guest
Re:various header templates
« Reply #1 on: January 08, 2003, 08:59:56 AM »
Reply with quote

The way I would do it is to create a function in subs.php called yypagehead that consists of the code you are using now.

example

function yypagehead
{
 if($board==3)
 {
 echo"<img src=............>";
 }
}

then in your template where you want the logo put in
<yabb pagehead>

I think that would work.
Logged
maok
Noobie
*
Posts: 31


Asteroid do not concern me admiral

Re:various header templates
« Reply #2 on: January 08, 2003, 01:25:18 PM »
Reply with quote

ah oooookkkk, now i see how it works thx  :-*

a thought <yabb xxxxx> were variable and not function
Logged
maok
Noobie
*
Posts: 31


Asteroid do not concern me admiral

Re:various header templates
« Reply #3 on: January 08, 2003, 02:10:08 PM »
Reply with quote

it still doesn't work >:( , in fact i think i can't access any $xxxx
when i do
if($board>7)
{
    action_to_do;
}
else
{
    echo "test $board";
}

it prints test
so i think i can't acces $board
i've done
global $maok;
$maok = $board;

and had the function with $maok inside instead of $board, and i've got the same reaction

Logged
maok
Noobie
*
Posts: 31


Asteroid do not concern me admiral

Re:various header templates
« Reply #4 on: January 08, 2003, 03:07:33 PM »
Reply with quote

probleme (at last) solved  8)

i simply forgot to write
global $currentboard;
in the core of my function

thx again
Logged
Dude
Guest
Re:various header templates
« Reply #5 on: January 08, 2003, 05:26:44 PM »
Reply with quote

Quote from: maok on January 08, 2003, 03:07:33 PMprobleme (at last) solved  8)

i simply forgot to write
global $currentboard;
in the core of my function

thx again

Oops forgot about that. :-[ Glad it works for you, that technique comes in handy. :)
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Graphics and Templates  |  various header templates « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.167 seconds with 21 queries.