code to display link to inbox from home page?
-
Constant Pligger
code to display link to inbox from home page?
Hi - where or which template has the code to display 'INBOX' link which appears on home page sidebar?
I need to move this to header. I tried looking in all templates but could not find. Thanks for any help.
-
Constant Pligger
If you have the simple messaging module enabled you should be able to use the following:
{if $user_authenticated eq true}
<li><a href="{$my_base_url}{$my_pligg_base}/user">Your Profile</a></li>
<li><a href="{$URL_simple_messaging_inbox}">Messages {if $msg_new_count gt 0}({$msg_new_count} New){/if}</a></li>
{/if}
You should be able to simply add that to your header.tpl template and it should work. You may need to remove the <li> </li> tags to work correctly with your template.
What this does is:
//Check if the user is logged in (If they are not logged in than they can't have a message).
{if $user_authenticated eq true}
//User is logged in. Display a list (<li>) that includes a link to the users profile
<li><a href="{$my_base_url}{$my_pligg_base}/user">Your Profile</a></li>
//User is logged in. DIpslay a list that includes a link to their messages.
<li><a href="{$URL_simple_messaging_inbox}">Messages
//Display message count. if count is zero display 0, otherwise display message count
{if $msg_new_count gt 0}({$msg_new_count} New){/if}</a></li>
//End auth check.
{/if}
Similar Threads
-
By Toon in forum Questions & Comments
Replies: 2
Last Post: 01-11-2011, 08:00 AM
-
By sabmeh in forum Questions & Comments
Replies: 2
Last Post: 06-02-2009, 01:32 PM
-
By plectori in forum Questions & Comments
Replies: 0
Last Post: 02-23-2009, 03:00 AM
-
By betagirl in forum Questions & Comments
Replies: 1
Last Post: 07-19-2007, 02:06 PM
-
By noid in forum Questions & Comments
Replies: 1
Last Post: 10-26-2006, 01:34 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules