I just started playing with BlackNova and the first thing I didn't like was the dropdown menu on the main admin page. so I did something about it!
Code added to admin.php:
function buttonmenu($options,$optionname="menu",$action=false)
{
global $swordfish;
if(!is_array($options))
{
echo 'Buttonmenu error: $options is not an array: '. $options;
return false;
}
if(!$action) $action=$_SERVER['PHP_SELF'];
echo "
buttonmenu(array(
'useredit' => '<img src="images/space261_md_blk.gif">User editor',
'univedit' => '<img src="images/space262_md_blk.gif">Universe editor',
'sectedit' => '<img src="images/space263_md_blk.gif ">Sector editor',
'planedit' => '<img src="images/space264_md_blk.gif">Planet editor',
'linkedit' => '<img src="images/space265_md_blk.gif">Link editor',
'zoneedit' => '<img src="images/space261_md_blk.gif">Zone editor',
'ipedit' => '<img src="images/space262_md_blk.gif">IP bans editor',
'logview' => '<img src="images/uspace.gif">Log Viewer'));
}
Code added to header.php:
.buttonmenu { list-style-type:none;}
.buttonmenu button {width:15em; background-color:#000; border-color:#0066FF; color:#FFFFFF; text-align:left;}
.buttonmenu button img {margin-right:2ex;}
I also too the css section outside of the php tags because that annoyed me. See the file if you don't understand what I mean.
//slightly related: I've used sf.net projects for a long time, but nevercontributed to them before this, so If I'm not doing something quite right, let me know. I intend to submit a good number of other little tweaks before I'm done with blacknova
-Nathan
nathan.friedly - gmail.com
updated admin.php + header.php
Logged In: YES
user_id=1677461
Originator: YES
"I also too the css section..." should read "I also took the css..." Damn my typing!