xoops forums

alain01

Quite a regular
Posted on: 12/13 12:10
alain01
alain01 (Show more)
Quite a regular
Posts: 395
Since: 2003/6/20
#1

Icon for new pm in the main navbar, not only on the dropdown "User Menu" list

Hi,
i had a PM im my inbox, but i missed them more than 1 week cause i dont clic often on the "User Menu", so i cant see the "inbox" line with badge.

I can see this badge "(number of unread PM") only if i click on the "User Menu" link.

It will be very usefull to add this badge too close the user Menu, not only on the "inbox" line.

Like that : "User Menu (2) v"

goffy

Just can't stay away
Posted on: 12/13 14:14
goffy
goffy (Show more)
Just can't stay away
Posts: 421
Since: 2010/12/27
#2

Re: Icon for new pm in the main navbar, not only on the dropdown "User Menu" list

Hi

yes, I am the same opinion.

I have implemented this in myxoops.org and in the skiclub theme
but I have no access to theme of xoops.org

code is
<a data-toggle="dropdown" class="dropdown-toggle" href="javascript:;"><{$smarty.const.THEME_ACCOUNT}><{xoInboxCount assign="unreadCount"}> <{if $unreadCount 0}><span class="badge"><{$unreadCount}></span><{/if}><class="caret"></b></a>

alain01

Quite a regular
Posted on: 12/13 14:47
alain01
alain01 (Show more)
Quite a regular
Posts: 395
Since: 2003/6/20
#3

Re: Icon for new pm in the main navbar, not only on the dropdown "User Menu" list

yes, and yet write in another topic, for me :

Resized Image


Boostrap 4
<{xoInboxCount assign="unread_count" total='inbox_total'}>
        <
li class="nav-item">
            <
class="nav-link" href="<{$xoops_url}>/viewpmsg.php">
            <{if 
$unread_count}> 
                <
span style="font-size: 20px;" class="mx-auto xoopsinactive-color fas fa-envelope"></span> <span class="badge badge-pill badge-danger align-text-top"><{$unread_count}></span>
            <{/if}>
                <
span style="font-size: 20px;" class="mx-auto xoopsinactive-color fas fa-envelope-open"></span> <span class="badge badge-pill badge-secondary align-text-top"><{$inbox_total-$unread_count}></span>
            </
a>
        </
li>

alain01

Quite a regular
Posted on: 1/4 13:47
alain01
alain01 (Show more)
Quite a regular
Posts: 395
Since: 2003/6/20
#4

Re: Icon for new pm in the main navbar, not only on the dropdown "User Menu" list

to preserve space on the navbar, i changed the code :
<{xoInboxCount assign="unread_count" total='inbox_total'}>
    <
li class="nav-item">
        <
class="nav-link" href="<{$xoops_url}>/viewpmsg.php">
                <{if 
$unread_count}> 
                        <
span class="mx-auto xoopsweb-color fas fa-envelope fa-lg"></span> <span class="badge badge-pill badge-danger align-text-top"><{$unread_count}></span>
                <{else}>
                    <
span class="mx-auto xoopsweb-color fas fa-envelope-open fa-lg"></span> <span class="badge badge-pill badge-secondary align-text-top"><{$inbox_total-$unread_count}></span>
                <{/if}>
        </
a>
    </
li>