11
snow77
Re: copying "inbox" w/ new indicator
  • 2007/11/7 20:16

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


This is an example of how I use it, including the Inbox indicator when there is unread messages.

<div id="user-bar">
<{if !
$xoops_isuser}>
              <
div id="user-bar-login">
            <
form method="post"  style="margin: 0px; "action="<{xoAppUrl /user.php op=login xoops_redirect=$smarty.server.REQUEST_URI}>" >
                <!--<{
$smarty.const._LOGIN}>-->
                <
input name="uname" type="text"  size="16" value="username" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" /> <input name="pass" type="password" size="16" value="password" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" />
                <
input  class="loginBut" type="submit"   value="ENTER"  alt="login"   />  
            </
form>
                </
div>
        <{else}>
              <
div id="user-bar-menu">
            <{
xoInboxCount assign=pmcount}>
<
a href="<{xoAppUrl www/viewpmsg.php}>">
            <{if 
$pmcount}>
                
Inbox (<{$pmcount}>) | 
            <{else}>
                
Inbox
            
<{/if}>    </a> |                 
            <
a href="<{xoAppUrl /user.php}>">My profile</a> | 
            <
a href="<{xoAppUrl /notifications.php}>">Bookmarks</a> | 
            <{if 
$xoops_isadmin}>
            <
a href="<{xoAppUrl /admin.php}>">Admin</a> | 
            <{/if}>
            <
a href="<{xoAppUrl /user.php op=logout}>">Logout</a>
            </
div>
        <{/if}>
                    
    </
div>


where it says Inbox, you can close that in a span tag and add a class with the style you want to highlight it.

an example with icons instead is like this:
<div class="userBar">
                <{if !
$xoops_isuser}>
            <
form method="post"  style="margin: 0px; display:inline;"action="<{xoAppUrl /user.php op=login xoops_redirect=$smarty.server.REQUEST_URI}>" >
                <!--<{
$smarty.const._LOGIN}>-->
                <
input name="uname" type="text"  size="16" value="<{$smarty.const._USERNAME}>" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" /> <input name="pass" type="text" size="16" value="<{$smarty.const._PASSWORD}>" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" />
                <
input  class="loginBut" type="submit"   value="login"  alt="login"   />  
            </
form>
            <
a href="<{xoAppUrl /register.php}>" class="register">register</a>   <a href="<{xoAppUrl /user.php#lost}>" class="register">| remember password</a>
            
        <{else}>
            <{
xoInboxCount assign=pmcount}>
            <
a href="<{xoAppUrl www/viewpmsg.php}>">
            <{if 
$pmcount}>
                <
img src="<{xoImgUrl img/inbox-full.png}>" alt="Inbox (<{$pmcount}>)" title="You have <{$pmcount}> unread messages" />
            <{else}>
                <
img src="<{xoImgUrl img/inbox.png}>" alt="Inbox" title="Show your inbox content" />
            <{/if}>            </
a>                
            <
a href="<{xoAppUrl /user.php}>"><img src="<{xoImgUrl img/profile.png}>" alt="My profile" title="View your profile" /></a>
            <
a href="<{xoAppUrl /notifications.php}>"><img src="<{xoImgUrl img/bookmarks.png}>" alt="Notifications" title="View bookmarks" /></a>
            <{if 
$xoops_isadmin}>
            <
a href="<{xoAppUrl /admin.php}>"><img src="<{xoImgUrl img/configuration.png}>" alt="Admin" title="Display site administration" /></a>
            <{/if}>
            <
a href="<{xoAppUrl /user.php op=logout}>"><img src="<{xoImgUrl img/logout.png}>" alt="Logout" title="Click to logout" /></a>
        <{/if}></
div>
www.polymorphee.com
www.xoopsdesign.com

12
DjMikeWatt
Re: copying "inbox" w/ new indicator
  • 2007/11/8 4:00

  • DjMikeWatt

  • Just popping in

  • Posts: 41

  • Since: 2007/4/7 2


slightly unrelated, but I can't send PMs anymore... there is a script error whenever I click the PM button in a user's profile...

Anyone have any ideas? What code can I provide you guys that would help you see what's going on? Is that the pmlite.php file?

Login

Who's Online

169 user(s) are online (92 user(s) are browsing Support Forums)


Members: 0


Guests: 169


more...

Donat-O-Meter

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

Latest GitHub Commits