1
ziwman
Include usermenu block function anywhere
  • 2013/11/22 17:01

  • ziwman

  • Just popping in

  • Posts: 16

  • Since: 2008/11/28


Hello !
I'm building my own xoops theme.

I want to integrate the user menu (Login + logged-in user) in the a menu bar.

i want to call and include functions of the block,
When i copy/past Language variants (messages ... ) it doesn't work !

I've added a new page : navbar.html

code :

<nav class="navbar navbar-default" role="navigation">
    
    <
div class="navbar-header">
        <
button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
            <
span class="sr-only">Toggle navigationspan>
            <
span class="icon-bar">span>
            <
span class="icon-bar">span>
            <
span class="icon-bar">span>
        button>
        <
class="navbar-brand" href="#">Menua>
    div>
    
    <
div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
        <
ul class="nav navbar-nav">
            <
li class="divider-vertical">li>
            <
li>
                <
a href="http://www.tafraout.net/">Accueila>
            li>
            <
li class="divider-vertical">li>
            <
li>
                <
a href="http://www.tafraout.net/modules/newbb">Forumsa>
            li>
            <
li class="divider-vertical">li>
            <
li>
                <
a href="http://www.tafraout.net/modules/contact">Contacta>
            li>
            <
li class="divider-vertical">li>
        ul>
        <
ul class="nav navbar-nav navbar-right">


            <{if 
$xoops_isuser}>
                <
li class="dropdown">
                    <
a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <
class="glyphicon glyphicon-user">iEspace Membre
                        
<{if $block.new_messages>0}>
                            <
span class="badge">
                                <{
$block.new_messages}>
                            span>
                            <{else}>
                                <{/if}>
                                    <
class="caret">b>
                    a>
                    <
ul class="dropdown-menu">
                        <{if 
$xoops_isadmin}>
                            <
li>
                                <
a href="<{xoAppUrl admin.php}>" title="<{$block.lang_adminmenu}>">
                                    <
class="glyphicon glyphicon-wrench">i>
                                    <{
$block.lang_adminmenu}>
                                a>
                            li>
                            <
li class="divider">li>
                            <
li>
                                <
a href="<{xoAppUrl user.php}>" title="<{$block.lang_youraccount}>">
                                    <
class="glyphicon glyphicon-user">i>
                                    <{
$block.lang_youraccount}>
                                a>
                            li>
                            <
li class="divider">li>
                            <{else}>
                                <
li>
                                    <
a href="<{xoAppUrl user.php}>" title="<{$block.lang_youraccount}>">
                                        <
class="glyphicon glyphicon-user">i>
                                        <{
$block.lang_youraccount}>
                                    a>
                                li>
                                <
li class="divider">li>
                                <{/if}>
                                    <
li>
                                        <
a href="<{xoAppUrl edituser.php}>" title="<{$block.lang_editaccount}>">
                                            <
class="glyphicon glyphicon-edit">i>
                                            <{
$block.lang_editaccount}>
                                        a>
                                    li>
                                    <
li class="divider">li>
                                    <
li>
                                        <
a href="<{xoAppUrl notifications.php}>" title="<{$block.lang_notifications}>">
                                            <
class="glyphicon glyphicon-bell">i>
                                            <{
$block.lang_notifications}>
                                        a>
                                    li>
                                    <
li class="divider">li>
                                    <{if 
$block.new_messages>0}>
                                        <
li>
                                            <
audio autoplay>
                                                <
source src="<{xoImgUrl sound/sound.ogg}>" type="audio/ogg">
                                                    <
source src="<{xoImgUrl sound/sound.mp3}>" type="audio/mpeg">
                                            audio>
                                            <
class="highlight" href="<{xoAppUrl viewpmsg.php}>" title="<{$block.lang_inbox}>">
                                                <
class="glyphicon glyphicon-envelope">i>
                                                <{
$block.lang_inbox}>(
                                                    <
strong class="red">
                                                        <{
$block.new_messages}>
                                                    strong>)a>
                                        li>
                                        <
li class="divider">li>
                                        <{else}>
                                            <
li>
                                                <
a href="<{xoAppUrl viewpmsg.php}>" title="<{$block.lang_inbox}>">
                                                    <
class="glyphicon glyphicon-envelope">i>
                                                    <{
$block.lang_inbox}>
                                                a>
                                            li>
                                            <
li class="divider">li>
                                            <{/if}>
                                                <
li>
                                                    <
a href="<{xoAppUrl user.php?op=logout}>" title="<{$block.lang_logout}>">
                                                        <
class="glyphicon glyphicon-off">i>
                                                        <{
$block.lang_logout}>
                                                    a>
                                                li>
                    ul>
                li>
                <{else}>
                    <
li class="divider-vertical">li>
                    <
li>
                        <
a href="http://www.tafraout.net/">
                            <
class="glyphicon glyphicon-plus">i>  S'inscrire
                    
                    

  •                         
                                  Se Connecter
                        

  •                     <{/if}>
            
        

        

    <{if $xoops_isuser}>
        <{else}>
            
                
                    
                        
                            ×
                            Se connecter
                        

                        
                            
                            " method="post">
                                
                                    " class="form-control" placeholder="Identifiant" required autofocus />
                                

                                
                                    
                                

                                " />
                                
                                
                                    Se rappeler de moi
                                
                                    $(function() {
                                        $('button[data-loading-text]').click(function () {
                                            var btn = $(this);
                                            btn.button('
    loading');
                                        });
                                    });
                                
                                Se connecter
                            
                                display: block;" href="<{xoAppUrl user.php#lost}>" title="<{$block.lang_lostpass}>">Mot de passe perdu ?
                        

                        
                            Nouveau ?
                        

                        
                            " title="<{$block.lang_registernow}>" class="btn btn-info btn-block"> S'inscrire maintenant !a>
                        div>
                    div>
                    
                div>
            div>
            
            div>
            
            div>
            <{/if}>


    Login

    Who's Online

    425 user(s) are online (336 user(s) are browsing Support Forums)


    Members: 0


    Guests: 425


    more...

    Donat-O-Meter

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

    Latest GitHub Commits