Hello à tous !
Alors, je vous éxplique en fait j'ai une navbar dans mon thème avec marquer forum.. etc... et je voudrais rajouter le bouton 'Admin' mais visible que par les Admins...
J'ai donc essayer d'utiliser <{if $xoops_isadmin}> mais je ne sait pas ou le placer...
Je vous donne le template de mon thème:
<?php /* Smarty version 2.6.5-dev, created on 2006-08-18 14:35:28
compiled from C:/wamp/www/nunux-world/themes/blue_ipb/theme.html */ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $this->_tpl_vars['xoops_langcode']; ?>
" lang="<?php echo $this->_tpl_vars['xoops_langcode']; ?>
">
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $this->_tpl_vars['xoops_charset']; ?>
" />
<meta http-equiv="content-language" content="<?php echo $this->_tpl_vars['xoops_langcode']; ?>
" />
<meta name="robots" content="<?php echo $this->_tpl_vars['xoops_meta_robots']; ?>
" />
<meta name="keywords" content="<?php echo $this->_tpl_vars['xoops_meta_keywords']; ?>
" />
<meta name="description" content="<?php echo $this->_tpl_vars['xoops_meta_description']; ?>
" />
<meta name="rating" content="<?php echo $this->_tpl_vars['xoops_meta_rating']; ?>
" />
<meta name="author" content="<?php echo $this->_tpl_vars['xoops_meta_author']; ?>
" />
<meta name="copyright" content="<?php echo $this->_tpl_vars['xoops_meta_copyright']; ?>
" />
<meta name="generator" content="" />
<title><?php echo $this->_tpl_vars['xoops_sitename']; ?>
- <?php echo $this->_tpl_vars['xoops_pagetitle']; ?>
</title>
<link href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/favicon.ico" rel="SHORTCUT ICON" />
<link rel="stylesheet" type="text/css" media="all" href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/xoops.css" />
<link rel="stylesheet" type="text/css" media="all" href="<?php echo $this->_tpl_vars['xoops_themecss']; ?>
" />
<script type="text/javascript">
<!--
<?php echo $this->_tpl_vars['xoops_js']; ?>
//-->
</script>
<script type="text/javascript">
<!--
var getById = (typeof document.getElementById != "undefined");
function toggleDisplay(obj,display1,display2){
if(!getById) return;
obj = getRef(obj);
if(obj.style.display == display2)
obj.style.display = display1;
else
obj.style.display = display2;
repaintFix();
}
function getRef(obj){
if(getById)
return(typeof obj == "string") ? document.getElementById(obj) : obj;
}
function repaintFix(obj){
if("undefined" == typeof document.body
|| "undefined" == typeof document.body.style) return;
if(obj == null)
obj == document.body;
else obj = getRef(obj);
document.body.style.visibility = "hidden";
document.body.style.visibility = "visible";
}
//-->
</script>
</head>
<body>
<table cellspacing="0" cellpadding="0" class="bg">
<tr><td>
<table cellspacing="0" cellpadding="0" class="bg1" border="0" >
<tr><td class="header">
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
"/>
<img src="<?php echo $this->_tpl_vars['xoops_url']; ?>
/themes/<?php echo $this->_tpl_vars['xoops_theme']; ?>
/images/logo.jpg"></a> </a>
</td>
<td class="banner"><?php echo $this->_tpl_vars['xoops_banner']; ?>
</td>
</tr></table><br>
</td>
</tr>
<tr>
<td>
<!-- Start Headerbar -->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="10">
<img src="<?php echo $this->_tpl_vars['xoops_imageurl']; ?>
images/hbar_left.gif" width="10" height="25" alt="" />
</td>
<td>
<img src="<?php echo $this->_tpl_vars['xoops_imageurl']; ?>
images/swich.gif" width="25" height="25" alt="block control" class="pointer" onclick="toggleDisplay('left','block','none')" />
</td>
<td width="100%" class="topnav">
<!-- navibar set -->
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/">Accueil</a>
•
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/modules/news/">News</a>
•
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/modules/ipboard/">Forum</a>
•
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/modules/mydownloads/">Telechargement</a>
•
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/search.php">Recherche</a>
•
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/user.php">Profil/Se Connecter</a>
•
[size=x-large]C'est ici que je voudrais mettre le truc admin[/size]
<a href="<?php echo $this->_tpl_vars['xoops_url']; ?>
/admin.php">Admin</a>
</td>
<td>
<?php if ($this->_tpl_vars['xoops_showrblock'] == 1): ?>
<img src="<?php echo $this->_tpl_vars['xoops_imageurl']; ?>
images/swich.gif" width="25" height="25" alt="block control" class="pointer" onclick="toggleDisplay('right','block','none')" />
<?php endif; ?>
<?php if ($this->_tpl_vars['xoops_showrblock'] == 0): ?>
<img src="<?php echo $this->_tpl_vars['xoops_imageurl']; ?>
images/swi_off.gif" width="25" height="25" alt="open and close right-block" alt="block control" />
<?php endif; ?>
</td>
<td width="10">
<img src="<?php echo $this->_tpl_vars['xoops_imageurl']; ?>
images/hbar_right.gif" width="10" height="25" alt="" />
</td>
</tr>
</table>
<!-- End Headerbar -->
</td></tr>
<tr><td><br>
<table cellspacing="2" cellpadding="2"><tr><td id="left" width=170>
<!-- Start left blocks loop -->
<?php if (count($_from = (array)$this->_tpl_vars['xoops_lblocks'])):
foreach ($_from as $this->_tpl_vars['block']):
?>
<table class="outline"><tr><td>
<table cellspacing="0" cellpadding="2">
<tr><td class="blockTitle2"> <?php echo $this->_tpl_vars['block']['title']; ?>
</td></tr>
<tr><td class="blockContent"><?php echo $this->_tpl_vars['block']['content']; ?>
</td></tr></table>
</td></tr></table><br>
<?php endforeach; unset($_from); endif; ?>
<!-- End left blocks loop -->
</td>
<td style="padding: 0px 5px 0px;">
<!-- Display center blocks if any -->
<?php if ($this->_tpl_vars['xoops_showcblock'] == 1): ?>
<table cellspacing="0">
<tr><td width="100%" colspan="2">
<!-- Start center-center blocks loop -->
<?php if (count($_from = (array)$this->_tpl_vars['xoops_ccblocks'])):
foreach ($_from as $this->_tpl_vars['block']):
?>
<table class="outline"><tr><td>
<table cellspacing="1" cellpadding="5">
<tr><td class="blockTitle"> <?php echo $this->_tpl_vars['block']['title']; ?>
</td></tr>
<tr><td class="blockContent"><?php echo $this->_tpl_vars['block']['content']; ?>
</td></tr></table>
</td></tr></table><br />
<?php endforeach; unset($_from); endif; ?>
<!-- End center-center blocks loop -->
</td></tr>
<tr><td width="50%">
<!-- Start center-left blocks loop -->
<?php if (count($_from = (array)$this->_tpl_vars['xoops_clblocks'])):
foreach ($_from as $this->_tpl_vars['block']):
?>
<table class="outline"><tr><td>
<table cellspacing="1" cellpadding="5">
<tr> <td class="blockTitle"> <?php echo $this->_tpl_vars['block']['title']; ?>
</td></tr>
<tr><td class="blockContent"><?php echo $this->_tpl_vars['block']['content']; ?>
</td></tr></table>
</td></tr></table><br />
<?php endforeach; unset($_from); endif; ?>
<!-- End center-left blocks loop -->
</td><td width="50%">
<!-- Start center-right blocks loop -->
<?php if (count($_from = (array)$this->_tpl_vars['xoops_crblocks'])):
foreach ($_from as $this->_tpl_vars['block']):
?>
<table class="outline"><tr><td>
<table cellspacing="1" cellpadding="5">
<tr> <td class="blockTitle"> <?php echo $this->_tpl_vars['block']['title']; ?>
</td></tr>
<tr><td class="blockContent"><?php echo $this->_tpl_vars['block']['content']; ?>
</td></tr></table>
</td></tr></table><br />
<?php endforeach; unset($_from); endif; ?>
<!-- End center-right blocks loop -->
</td></tr></table>
<?php endif; ?>
<!-- End display center blocks -->
<div id="content"><?php echo $this->_tpl_vars['xoops_contents']; ?>
</div></td>
<?php if ($this->_tpl_vars['xoops_showrblock'] == 1): ?>
<td id="right" width=170 align=center>
<!-- Start right blocks loop -->
<?php if (count($_from = (array)$this->_tpl_vars['xoops_rblocks'])):
foreach ($_from as $this->_tpl_vars['block']):
?>
<table class="outline"><tr><td id="right">
<table cellspacing="0" cellpadding="2">
<tr><td class="blockTitle2"> <?php echo $this->_tpl_vars['block']['title']; ?>
</td></tr>
<tr><td class="blockContent"><?php echo $this->_tpl_vars['block']['content']; ?>
</td></tr></table>
</td></tr></table><br>
<?php endforeach; unset($_from); endif; ?>
<!-- End right blocks loop -->
<?php endif; ?></td></tr></table>
</td></tr>
</table>
</td></tr>
</table>
</body>
</html>