I got a "Forbidden - you don’t have permission to access this page" error when i tried to save this module. After a bit of research, it turns out my server is running the mod_security module for apache. It’s designed to stop hacking attempts, and it thinks the code in this module is a bit suspect(it’s not).
If you’re getting the same problem, you’ll have to edit menuindex.module.tpl.
Find the two sql statements UPDATE and SELECT and split the words into two parts, ie.
$sql = "UPDATE $tblContent set menuindex=".$item['order']." WHERE id=".$item['element'];
becomes
$sql = "UP"."DATE $tblContent set menuindex=".$item['order']." WHERE id=".$item['element'];
and
$query= "SELECT id , pagetitle , parent , menuindex FROM $tblContent WHERE parent = $id ORDER BY menuindex ASC";
becomes
$query= "SEL"."ECT id , pagetitle , parent , menuindex FROM $tblContent WHERE parent = $id ORDER BY menuindex ASC";
That foils the security filter.
Nice module once you get it running. Drag and drop functionality would be so much better in the main tree itself , course, or even just an up/down button.