Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 07:00 am EDT

Geeklog Forums

Admin Block -> Dropdown Menu


Status: offline

sharon

Forum User
Junior
Registered: 11/28/04
Posts: 16
Location:Lafayette, Indiana USA
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:
Text Formatted Code
<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:
Text Formatted Code
<option value="">{option_label} ({option_count})</option>
 

and the adminoption.thtml file looks like this:
Text Formatted Code
<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:
Text Formatted Code
<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 :-)
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
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 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 and explained in more detail Here

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.
Geeklog components by PortalParts -- www.portalparts.com
 Quote

Status: offline

sharon

Forum User
Junior
Registered: 11/28/04
Posts: 16
Location:Lafayette, Indiana USA
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. Smile
 Quote

All times are EDT. The time is now 07:00 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