Posted on: 01/15/05 07:14pm
By: sharon
I'm currently working on tweaking the COM_adminMenu() in lib-common.php and would love a little help... My goal is to change the Admin list into an Admin Dropdown menu by simply tweaking the template pages along with the lib-common.php code. What I have so far:
In the header.thtml above the </HEAD> line:
<script language="javascript">
<!--
function surfto(form) {
var myindex=form.dest.selectedIndex
var passed = form.dest.options[myindex].value
var acomma = passed.indexOf(",")
var chars = passed.length
var filename = passed.substring(0,acomma)
var where = passed.substring(acomma+1,chars)
if(filename != "") {window.open(filename, target=where)};
}
//-->
</script>
The adminoption_off.thtml looks like this:
<option value="">{option_label} ({option_count})</option>
and the adminoption.thtml file looks like this:
<option value="{option_url},_self">{option_label} ({option_count})</option>
What I'm not understanding is where to put the opening and closing of the form within the COM_adminMenu() are within the lib-common.php page:
<SELECT NAME=dest onChange="surfto(this.form);">
<option>Select One</option>
</SELECT>
</FORM>
Every time I add this as $retval = "blahblahblah"; I get a weird reaction and the page doesn't show correctly, or it shows correctly and the dropdown doesn't appear. I'm sure I just need to find a place to insert this as a $retval value, but I don't know where.
Any suggestions? Thanks :-)
Admin Block -> Dropdown Menu
Posted on: 01/15/05 08:47pm
By: Blaine
I spent many many hours integrating a dynamic Javascript menu that would work smoothly with the geeklog themes. It's not just enough to hack the menu functions and templates as you will want to be able to administrate the menu easily and most of all - have it supported with GL upgrades and not have to re-hack the code.
The glMenu plugin integrates the
Milonic[*1] DHTML menu component and it took me many hours to figure out a way to make it work seamlessly with GL functions and templates.
You should look at glMenu - as shown on
my site[*2] and explained in more detail
Here[*3]
For what glMenu costs it will pay you back for all the time it will save you (now and future) and additional online admin benefits.
Admin Block -> Dropdown Menu
Posted on: 01/16/05 12:58am
By: sharon
thank you for the post. however, this is for my own personal site. i'd prefer something very simple, easy to use, and hacking the geeklog lib-common.php file would be good enough for me.... i know enough to be able to pull out my altered code before updating, was just hoping for a little advice about tweaking.
again, thanks for the post. looking for something simpler.