1
kymseen
usermenu modify (show w/avatar and banners)
  • 2006/10/3 18:18

  • kymseen

  • Just popping in

  • Posts: 23

  • Since: 2006/9/11


hello, I wanted to modify the usermenu so that it shows the user avatar.

I made a block that shows the user avatar (successful) and user menu, but the
function that displays "(1)" and highlights the mailbox does not function neither in php or html mode...

anyone had this problem?? any clue?


I figured out that in row 8 of
xoops/modules/system/templates/blocks/system_block_user.html-org

there is this code...

<{if $block.new_messages > 0}>
<a 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}>


this is the function for highlighting and notifing new messages in the mail box. this I suppose is HTML and has smarty codes inside...(am I right?)

when I put this code in the blocks I made, it doesn't work. PHP or HTML mode.

I wonder why this function only works inside the user menu???

Anyone???
Please fill me in.

2
wizanda
Re: usermenu modify (show w/avatar and banners)
  • 2006/10/3 18:46

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


How do I make a smarty-template for user-avatars? FAQ's


Hope it helps...google searching smarty tags with almost code works wonder to find things quick...

3
iHackCode
Re: usermenu modify (show w/avatar and banners)

Quote:

I wonder why this function only works inside the user menu???

Anyone???
Please fill me in.


the reason is that a function is called. 'function b_system_user_show'. for that block when it is displayed.
function b_system_user_show()
{
    global 
$xoopsUser;
    if (
is_object($xoopsUser)) {
        
$pm_handler =& xoops_gethandler('privmessage');
        
$block = array();
        
$block['lang_youraccount'] = _MB_SYSTEM_VACNT;
        
$block['lang_editaccount'] = _MB_SYSTEM_EACNT;
        
$block['lang_notifications'] = _MB_SYSTEM_NOTIF;
        
$block['uid'] = $xoopsUser->getVar('uid');
        
$block['lang_logout'] = _MB_SYSTEM_LOUT;
        
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
        
$criteria->add(new Criteria('to_userid'$xoopsUser->getVar('uid')));
        
$block['new_messages'] = $pm_handler->getCount($criteria);
        
$block['lang_inbox'] = _MB_SYSTEM_INBOX;
        
$block['lang_adminmenu'] = _MB_SYSTEM_ADMENU;
        return 
$block;
    }
    return 
false;
}


and that function specifies what values are in the $block array. i can only tell you why it doesnt work.. i havent tried making it work outside of the block yet. . Good Luck.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
kymseen
Re: usermenu modify (show w/avatar and banners)
  • 2006/10/4 20:45

  • kymseen

  • Just popping in

  • Posts: 23

  • Since: 2006/9/11


I got what I needed!
instead of showing it in a custom block, I had it show up on the user menu block. ha!

this threadhelped me out.

however, as I posted in the thread, user avatars show up in the user menu block only if users have uploaded their own image. Meaning the blank.gif (default avatar) does not respond or show up!!

anyone know how to fix this?

please see this thread

Thanks!!

Login

Who's Online

210 user(s) are online (146 user(s) are browsing Support Forums)


Members: 0


Guests: 210


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