1
alien624
Display login name
  • 2007/6/9 9:05

  • alien624

  • Just popping in

  • Posts: 1

  • Since: 2007/6/9 8


I want to display a string "Hi, abc" on the theme front page after logon where abc is the username, where and how can I edit it, the theme or block...... I find a function in user.php like XOOPS $thisUser->getVar('uname'), but how can I call it inside the theme.html phase.....Thx

2
abraxas
Re: Display login name
  • 2007/6/9 10:16

  • abraxas

  • Just popping in

  • Posts: 45

  • Since: 2004/6/18


in the Dreamy theme they give this solution

Archive Usernav.html
<div id="xo-userbar">
        <{if !
$xoops_isuser}>
            <!-- 
menu en mode anonyme -->
            <
form method="post" action="<{xoAppUrl /user.php op=login}>">
                <{
$smarty.const._LOGIN}>&nbsp;
                <
input name="uname" type="text" />&nbsp;&nbsp;<input name="pass" type="password" />
                <
input type="hidden" name="xoops_redirect" value="<{$smarty.server.REQUEST_URI}>" />
                <
button type="submit"><img src="<{xoImgUrl /img/home.png}>" alt="<{$smarty.const._LOGIN}>" /></button>
            </
form>
            <
a href="<{xoAppUrl /register.php}>" class="register">Registro</a>
        <{else}>
        <!-- 
menu en mode enregistré -->
        
Hola&nbsp;<a href="<{xoAppUrl /user.php}>" alt="Menú de Usuario" title="Usuarios"><span id="xo-uname"><{$xoops_uname}></span></a>
<!--, 
nous sommes le <{$smarty.now|date_format:"%d %B %Y"}> si vous voulez afficher la date du jour il faut décommenter la ligne -->&nbsp;: 
            <{
xoInboxCount assign=pmcount}>
            <
a href="<{xoAppUrl www/viewpmsg.php}>">
            <!-- 
pour ma messagerie -->
            <{if 
$pmcount}><!-- si j'ai des messages --><img src="<{xoImgUrl img/inbox-full.png}>" alt="(<{$pmcount}>) Mensajes" title="Tienes <{$pmcount}> mensajes sin leer" />
            <{else}>
            <!-- si je n'
ai pas de message -->
            <
img src="<{xoImgUrl img/inbox.png}>" alt="Mensajes a otros usuarios" title="Mensajeria interna" /><{/if}></a>
            <!-- 
fin de ma messagerie -->
            <
a href="<{xoAppUrl /notifications.php}>"><img src="<{xoImgUrl img/note_view.png}>" alt="Notificaciones" title="Tus notificaciones" /></a>
            <
a href="<{xoAppUrl /user.php}>"><img src="<{xoImgUrl img/profile.png}>" alt="Modificar mi perfil" title="Tu perfil" /></a>
            <
a href="<{xoAppUrl /search.php}>"><img src="<{xoImgUrl img/find.png}>" alt="Buscar en el sitio" title="Buscador Interno" /></a>
            <{if 
$xoops_isadmin}>
            <!-- 
lien supplémentaire si j'ai des droits d'administration de module -->
            <
a href="<{xoAppUrl /admin.php}>"><img src="<{xoImgUrl img/configuration.png}>" alt="Administración" title="Administración del Sitio" /></a>
            <!-- 
fin du lien supplémentaire -->
            <{/if}>
            <
a href="<{xoAppUrl /user.php op=logout}>"><img src="<{xoImgUrl img/exit.png}>" alt="Desconectar" title="Haz click aqui para cerrar tu sesión" /></a>
        <{/if}>
        </
div>
--------------------------------------------
Ignacio Lledó

Login

Who's Online

225 user(s) are online (171 user(s) are browsing Support Forums)


Members: 0


Guests: 225


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits