Results 1 to 2 of 2
  1. #1
    Constant Pligger PurpleCow's Avatar
    Joined
    Oct 2006
    Posts
    191

    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.

  2. #2
    Constant Pligger urbn's Avatar
    Joined
    Oct 2010
    Posts
    107
    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

  1. Home page link only
    By Toon in forum Questions & Comments
    Replies: 2
    Last Post: 01-11-2011, 08:00 AM
  2. top 5 news link to home page
    By sabmeh in forum Questions & Comments
    Replies: 2
    Last Post: 06-02-2009, 01:32 PM
  3. RSS Link Home Page
    By plectori in forum Questions & Comments
    Replies: 0
    Last Post: 02-23-2009, 03:00 AM
  4. Trouble getting user 'inbox' to display on new pages
    By betagirl in forum Questions & Comments
    Replies: 1
    Last Post: 07-19-2007, 02:06 PM
  5. Wrong link/url to home page
    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
  •  
Pligg Modules and Pligg Templates from Pligg Pro Donate to Pligg CMS Dreamhost Web Hosting Host Gator Web Hosting