Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 05:36 pm EST
Geeklog Forums
Putting menu_elements in a block?
klync
Dirk
Anonymous
Thanks for pointing me in the right direction, guys. I checked out the menu plugin, and it didn't do exactly what I had in mind. I meditated on your comment, Dirk..... And, finally, it came to me.
I mentioned that I had made a new phpblock in lib-custom by ripping out the code from lib-common. Well, since that's my own custom function, I found it easy to change the menu items by adding, removing and modifying the four line stanzas. So, for example my "Get Published" link appears thanks to this code:
$adminmenu->set_var( 'option_url', $_CONF['site_url'] . '/submit.php?type=story' );
$adminmenu->set_var( 'option_label', $LANG01[71] );
$adminmenu->set_var( 'option_count', '' );
$retval .= $adminmenu->parse( 'item', 'option' );
Now I get a bit better of an idea how the templates work, since they're set up a the beginning of the function to draw the "User Functions" block.
- 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