1
kizun4
inbox link ??
  • 2007/2/11 15:15

  • kizun4

  • Just popping in

  • Posts: 49

  • Since: 2006/9/11


May i ask how to make "inbox" link menu like in user menu blocks??

I want to add the link on the header menu..
so the link will same like in "user menu" blocks which indicate how many unread message like this for example :

Inbox (4)

How can i make the link like that?
Thanks before :)

2
skenow
Re: inbox link ??
  • 2007/2/11 15:58

  • skenow

  • Home away from home

  • Posts: 993

  • Since: 2004/11/17


You can just copy it out of the User Menu block

<{if $block.new_messages 0}>
        <
class="highlight" href="<{$xoops_url}>/viewpmsg.php"><{$block.lang_inbox}> (<span style="color:#ff0000; font-weight: bold;"><{$block.new_messages}></span>)</a>
      <{else}>
        <
a href="<{$xoops_url}>/viewpmsg.php"><{$block.lang_inbox}></a>
      <{/if}>


but the $block variable won't work. Using the new smarty variables in 2.0.14+

<{if !$xoops_isuser}>
        <
a href="<{xoAppUrl /user.php}>" class="user" title="Login for <{$xoops_sitename}>">Login</a
        <
a href="<{xoAppUrl /register.php}>" class="register" title="Get a personal login for <{$xoops_sitename}>">Register</a>
    <{else}>
      <{
xoInboxCount assign=pmcount}>
            <
a href="<{xoAppUrl /viewpmsg.php}>" title="Show your inbox content" >Inbox<{if $pmcount}> (<{$pmcount}>)<{/if}></a>
            <
a href="<{xoAppUrl /user.php}>" title="View your profile" >My profile</a>
            <{if 
$xoops_isadmin}>
            <
a href="<{xoAppUrl /admin.php}>" title="Display site administration">Admin</a>
            <{/if}>
            <
a href="<{xoAppUrl /user.php op=logout}>" title="Click to logout">Logout</a>
    <{/if}>


Take a look at some of the new themes - morphogenesis and zeta reticuli use this

Login

Who's Online

164 user(s) are online (109 user(s) are browsing Support Forums)


Members: 0


Guests: 164


more...

Donat-O-Meter

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

Latest GitHub Commits