Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 10:04 am EDT

Geeklog Forums

Alpha order for admin block - How?


Status: offline

bobtreu

Forum User
Newbie
Registered: 03/13/02
Posts: 9
Can someone tell me where the code is that generates the Admins Only block? I want to add a sort so that the items come out in order. I also want to add a couple of other links special to my site to this block.

I have grepped files for every keyword I can think of, but I can't find the code. Please Help!

Please don't suggest I upgrade right now, I don't have time to port all my mods to the newest version right now.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
COM_adminMenu() in lib-common.php

bye, Dirk
 Quote

Status: offline

bobtreu

Forum User
Newbie
Registered: 03/13/02
Posts: 9
Thanks!

I recoded this function by adding a link_array variable, then sorted the array by label, and added them to '$retval' so the items are sorted. It will work for all languages.

I would be happy to send you the code if you think this is a good idea for the Base geeklog.

Text Formatted Code
   
2373   $menu_item =  $adminmenu->parse( 'item', ( $thisUrl == $url ) ? 'current' : 'option' );
2374   $link_array[$LANG01[11]]= $menu_item;
2375 //$retval .= $adminmenu->parse( 'item', ( $thisUrl == $url ) ? 'current' : 'option' );

 


Text Formatted Code
 
2536  ksort($link_array);
2537  reset($link_array);
2538  while (list($key, $val) = each($link_array)) {
2540  
2541   $retval .= "$val\n";
2542  }


 


 Quote

All times are EDT. The time is now 10:04 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content