PEAK XOOPS - Re: your menu in englishin japanese

Re: your menu

List posts in the topic

normal Re: your menu

msg# 1.1
depth:
1
Previous post - Next post | Parent - Children.1 .2 | Posted on 2003/12/17 15:27
GIJOE  ÀèǤ·³Áâ   Posts: 4110
hi Luxus.

This is not a hack but a theme.
I inserted these codes into theme.html of imago05
<{php}>
global $xoopsModule , $xoopsUser ;
$xoops_url = XOOPS_URL ;
$submenu_str = "" ;
$mainmenu_str = "
  <tr> 
    <td class='head_menu_left' width='15'> </td>
    <td class='head_menu'>
      <a href='$xoops_url/'>HOME</a> |
      <a href='$xoops_url/modules/news/'>NEWS</a> |
      <a href='$xoops_url/modules/mydownloads/'>DOWNLOADS</a> |
      <a href='$xoops_url/modules/xhnewbb/'>FORUMS</a> |
      <a href='$xoops_url/modules/piCal/'>piCal</a> |
      <a href='$xoops_url/modules/myalbum/'>myAlbum-P</a> |
    </td>
    <td class='head_menu_right'></td>
  </tr>\n" ;

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 ) > 0 ) {
		$submenu_str .= "  <tr>\n    <td class='sub_menu_left' width='15'> </td>\n    <td class='sub_menu'>\n     " ;
		foreach( $sublinks as $sublink ) {
			$submenu_str .= "<a href='$xoops_url/modules/$dirname/{$sublink['url']}'>{$sublink['name']}</a> |\n";
		}
		$submenu_str .= "    </td>\n    <td class='sub_menu_right'></td>\n  </tr>\n" ;
	}
} else {
	$mainmenu_str = str_replace( "'>HOME</a>" , "' style='background: #C0CCD9;'>HOME</a>" , $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 = "<a href='$xoops_url/admin.php' target='_blank'>Admin</a>" ;
		if( $new_messages > 0 ) {
			$pm_str = "<span style='color:#ff0000; font-weight: bold;'> ($new_messages)</span>" ;
			$pm_class = "class='highlight'" ;
		} else {
			$pm_str = '' ;
			$pm_class = '' ;
		}
		$submenu_str .= "
		<tr>
		  <td class='sub_menu_left' width='15'> </td>
		  <td class='sub_menu'>     
		    <a href='$xoops_url/user.php'>View Account</a> |
		    <a href='$xoops_url/edituser.php'>Edit Account</a> |
		    <a href='$xoops_url/notifications.php'>Notifications</a> |
		    <a href='$xoops_url/viewpmsg.php' $pm_class>Inbox$pm_str</a> |
		    $admin_link
		  </td>
		  <td class='sub_menu_right'></td>
		</tr>\n" ;
	}
}

echo $mainmenu_str ;
echo $submenu_str ;
<{/php}>
Votes:16 Average:4.38

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!