2007-03-16, 08:52 PM
Hi everybody,
I change my ex-PunBB forum for a MyBB and I have only a problem with templates :
PHP don't work in my header. This the php code :
I saw that to put PHP on template, you have to put your script between {}
But how I can do with my If{} ?
Thx a lot
I change my ex-PunBB forum for a MyBB and I have only a problem with templates :
PHP don't work in my header. This the php code :
<?php
$id = $mybb->user['uid'];
$gid = $mybb->user['usergroup'];
$username = $mybb->user['username'];
if ($gid== "1") // Si pas loggé, affichage du choix de login
{
$loginbox='<a href="register.php">Créer un compte</a> | <a href="http://www.acoustik.fr/login">Identification</a><span> | <a href="login.php?action=forget">Mot de passe oublié</a>';
$forumbox='<a href="">Forum</a> | <a href="userlist.php">Liste des Membres</a> | <a href="misc.php?action=rules">Règles</a> | <a href="search.php">Recherche</a> | <a href="register.php">Inscription</a>';
}
else // sinon ok
{
$loginbox='Bienvenue, <strong>'.$username.'</strong> | <a href="profile.php?id='.$id.'">Votre Profil</a> | <a href="pms_list.php">MP</a> | <a href="login.php?action=out&id='.$id.'">Deconnexion</a>';
$forumbox='<a href="http://www.acoustik.fr/forum">Forum</a> | <a href="userlist.php">Liste des Membres</a> | <a href="misc.php?action=rules">Règles</a> | <a href="search.php">Recherche</a>';
if ($gid =="4" OR $gid =="12" OR $gid =="13")
{
$loginbox.= ' | <a href="http://www.acoustik.fr/admin.php">Rédacteurs</a>';
}
if ($gid=="4")
{
$forumbox.= ' | <a href="admin_index.php">Administration Forum</a>';
}
}
?>
Sorry it's in french but you can understand I think. If you want me to translate, no problem...I saw that to put PHP on template, you have to put your script between {}
But how I can do with my If{} ?
Thx a lot
