1
JohnCVermont
Reordering the User Menu items? How? (easy question)

Dear Xooperati --

I just can't remember (or find) how to change the order of the menu items in the User Menu block.

<total brain cramp...total putz mode...but I did find plenty of entries asking about how to add custom menu items to the main menu, I did this once already but the How? just slipped my mind....duh... It does not seem to be in the FAQ or Wiki...at least, I couldn't find it>

Apologies in Advance & Thanks in Advance,

2
JohnCVermont
Re: Reordering the User Menu items? How? (easy question)

Perhaps, this question is not as easy as I originally thought. While using the blocks' weight attribute to position themselves relatives to one another within a region (left, right, center-right, etc..), there doesn't appear to be a way (that I can find) to handily reorder the menu items with a block such as User Menu.

...More later...

3
Mithrandir
Re: Reordering the User Menu items? How? (easy question)

The only way is to edit the b_system_user_show() function in modules/system/blocks/system_blocks.php

4
Dave_L
Re: Reordering the User Menu items? How? (easy question)
  • 2004/6/11 18:22

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


If you only want to reorder the menu items, all you should have to change is the template modules/system/templates/blocks/system_block_user.html.

5
JohnCVermont
Re: Reordering the User Menu items? How? (easy question)

Hello Mithrandir & Dave_L -

Thank you for your help.

Yup...I hit the source while you both were writing your answers and successfully made the changes.

For completeness sake and future generations...
original XOOPS 2.0.6 code
modules/system/templates/blocks/system_block_user.html
<table cellspacing="0">
  <
tr>
    <
td id="usermenu">
      <
class="menuTop" href="<{$xoops_url}>/user.php"><{$block.lang_youraccount}></a>
      <
a href="<{$xoops_url}>/edituser.php"><{$block.lang_editaccount}></a>
      <
a href="<{$xoops_url}>/notifications.php"><{$block.lang_notifications}></a>
      <
a href="<{$xoops_url}>/user.php?op=logout"><{$block.lang_logout}></a>
      <{if 
$block.new_messages 0}>
        <
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}>

      <{if 
$xoops_isadmin}>
        <
a href="<{$xoops_url}>/admin.php"><{$block.lang_adminmenu}></a>
      <{/if}>
    </
td>
  </
tr>
</
table>


Change to move Administrative Menu item to top of User Menu Block
<table cellspacing="0">
  <
tr>
    <
td id="usermenu">

      <{if 
$xoops_isadmin}>
        <
class="menuTop" href="<{$xoops_url}>/admin.php"><{$block.lang_adminmenu}></a>
        <
a  href="<{$xoops_url}>/user.php"><{$block.lang_youraccount}></a>
      <{else}>
        <
a  class="menuTop" href="<{$xoops_url}>/user.php"><{$block.lang_youraccount}></a>
      <{/if}>      

      <
a href="<{$xoops_url}>/edituser.php"><{$block.lang_editaccount}></a>
      <
a href="<{$xoops_url}>/notifications.php"><{$block.lang_notifications}></a>
      <
a href="<{$xoops_url}>/user.php?op=logout"><{$block.lang_logout}></a>
      <{if 
$block.new_messages 0}>
        <
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}>

    </
td>
  </
tr>
</
table>


After saving the changes to the file,
Go to Adminstration Menu, Module Admin, Click on SysAdmin update icon to recompile the template and store into the database. View and celebrate the results of your work. What could be more fun than that.

Login

Who's Online

203 user(s) are online (156 user(s) are browsing Support Forums)


Members: 0


Guests: 203


more...

Donat-O-Meter

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

Latest GitHub Commits