1
mrphilong
What's this menu?

Anyone know what menu system is on http://xoops.peak.ne.jp/

2
pod
Re: What's this menu?
  • 2007/9/5 0:10

  • pod

  • Quite a regular

  • Posts: 301

  • Since: 2003/4/19


Menu with dynamic sublinks as found at peak.ne.jp:

<{php}> 
global 
$xoopsModule $xoopsUser ;
$xoops_url XOOPS_URL ;
$submenu_str "" ;
$mainmenu_str "
   
     
    
      $xoops_url/'>HOME |
      $xoops_url/modules/news/'>NEWS |
      $xoops_url/modules/mydownloads/'>DOWNLOADS |
      $xoops_url/modules/xhnewbb/'>FORUMS |
      $xoops_url/modules/piCal/'>piCal |
      $xoops_url/modules/myalbum/'>myAlbum-P |
    
    
  
;
if( isset( 
$xoopsModule ) && is_object$xoopsModule ) ) {
    
$dirname $xoopsModule->getVar'dirname' ) ;
    
$mainmenu_str str_replace"/modules/$dirname/'" "/modules/$dirname/' style='background: #C0CCD9;'" $mainmenu_str ) ;
    
$sublinks =& $xoopsModule->subLink();
    if( 
count$sublinks ) > ) {
        
$submenu_str .= "  
     
    
     " 
;
        foreach( 
$sublinks as $sublink ) {
            
$submenu_str .= "$xoops_url/modules/$dirname/{$sublink['url']}'>{$sublink['name']} |
"
;
        }
        
$submenu_str .= "    
    
  
;
    }
} else {
    
$mainmenu_str str_replace"'>HOME" "' style='background: #C0CCD9;'>HOME" $mainmenu_str ) ;
    if( 
$xoopsUser ) {
        
$pm_handler =& xoops_gethandler('privmessage');
        
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
        
$criteria->add(new Criteria('to_userid'$xoopsUser->getVar('uid')));
        
$new_messages $pm_handler->getCount($criteria);
        if( 
$xoopsUser->isadmin() ) $admin_link "$xoops_url/admin.php' target='_blank'>Admin" ;
        if( 
$new_messages ) {
            
$pm_str " ($new_messages)
;
            
$pm_class "class='highlight'" ;
        } else {
            
$pm_str '' ;
            
$pm_class '' ;
        }
        
$submenu_str .= "
        
           
               
            $xoops_url/user.php'>View Account |
            $xoops_url/edituser.php'>Edit Account |
            $xoops_url/notifications.php'>Notifications |
            $xoops_url/viewpmsg.php' $pm_class>Inbox$pm_str |
            
$admin_link
          
          
        
;
    }
}
echo 
$mainmenu_str ;
echo 
$submenu_str ;
<{/
php}>


This code is also included in MyXoopsExtensions 1.0.4 and better.

Hope this helps!
whttp://www.myxoops.com - MyXoops Is Your XOOPS!

Login

Who's Online

419 user(s) are online (304 user(s) are browsing Support Forums)


Members: 0


Guests: 419


more...

Donat-O-Meter

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

Latest GitHub Commits