cela coince quand on est en system et pas dans l'un des scripts... il indique toujours USER...
voici mon code qui marche mais qui est à la mesure de ma compréhension : crade crade !!!
<{php}>
$mod = $GLOBALS['xoopsModule'];
$dirname = (isset($mod) ? $mod->getVar('dirname') :'system');
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', $dirname );
<{/php}>
<{if ($xoops_cmod==system) and ($smarty.server.SERVER_NAME/$SCRIPT_NAME == $xoops_url/readpmsg.php or $smarty.server.SERVER_NAME/$SCRIPT_NAME == $xoops_url/viewpmsg.php or $smarty.server.SERVER_NAME/$SCRIPT_NAME == $xoops_url/user.php or $smarty.server.SERVER_NAME/$SCRIPT_NAME == $xoops_url/edituser.php or $smarty.server.SERVER_NAME/$SCRIPT_NAME == $xoops_url/userinfo.php or $smarty.server.SERVER_NAME/$SCRIPT_NAME == $xoops_url/register.php)}>
<{php}>
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', 'user' );
<{/php}>
<{/if}>
<{if ($xoops_cmod==user) and ($smarty.server.SERVER_NAME/$SCRIPT_NAME == $xoops_url/index.php)}>
<{php}>
$GLOBALS['xoopsTpl']->assign( 'xoops_cmod', 'system' );
<{/php}>
<{/if}>
LE CMOD
<{$xoops_cmod}>
on lit le module
si module = systeme alos on idendifie les scripts user
si module = user et script = index.php => module revient à system
tordu à souhait mais j'ai ce que je cherche...
je laisse aux puriste le soins de faire le ménage, moi, je prépare mon dossier...
MEGA MERCI Denis, TheCat et tout ceux (faut me poster vos noms) sans lesquels je serais chauve (et oui c'est pas encore le cas)
:banane: :merci: :banane: