Hi folks.
I've read through the FAQ about adding links/buttons to the menu... I've tried to decipher the instructions, but I've failed. It seems to require more understanding of coding than I have... or I'm just not grasping the instructions.
What I'm trying to do is add an extra button on the upper system menu.
I understand the use of the Custom Link option in the config, but that isn't what I need.
I've managed to get the button/link created, but to do so, the only way I could make sense of, was to edit the themes.inc.php file.
I just added a line:
addbutton($sys_menu_buttons,'Forum','SI Forum','http://www.othersi.com/index.php?action=forum','custom1',$template_sys_menu_spacer);
in the midst of that files "// HTML template for template sys_menu buttons" section.
It is working... but in my search for the method to do this, I've read a lot of advice to NOT edit the themes.inc.php file.
So... wanting to do things the right way, I went back to editing the rainy_day/theme.php file.
But, in this theme, the theme.php file doesn't include the "// HTML template for template sys_menu buttons section" ... well... it does, but it doesn't contain the 'addbutton' code.... just a small block which says:
EOT;
// HTML template for template sys_menu buttons
$template_sys_menu_button = <<<EOT
<!-- BEGIN {BLOCK_ID} -->
<td><img src="images/spacer.gif" width="5" height="25" border="0" alt="" /></td>
<td><img src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" alt="" /></td>
<td style="background-image:url(themes/rainy_day/images/button1_r1_c2.gif)">
<a href="{HREF_TGT}" title="{HREF_TITLE}">{HREF_LNK}</a>
</td>
<td><img src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" alt="" /></td>
<!-- END {BLOCK_ID} -->
EOT;
I tried copying the sys_menu button "addbutton($sys_menu_buttons....." stuff from the sample theme.php file into the rainy_day theme.php button... but I got parse errors.
I tried opening another themes (hardwired) theme.php file, and saw it was coded in a different way again, with <!-- BEGIN home -->, <!-- END home -->, <!-- BEGIN my_gallery -->, <!-- END my_gallery -->, etc coded.
I copied THAT and pasted it into the rainy_day theme.php file, editing the urls to the proper theme images, and it made didn't give me parse errors, but instead created somewhat broken buttons, and many, many copies of them... there was rows and rows of duplicate buttons.
I read in the FAQ that a plugin would be the best way to go, but then gave an example of coding that alters the admin menu... which isn't what I'm after.
So... I'm stumped.
If someone could show me the proper coding to put into the rainy_day theme.php file, that'd be great.
All I want is the standard buttons in the upper system menu, but with an extra, custom button just to the right of the home button.
You can see the result I'm looking for here:
http://www.othersi.com/gallery/This was achieved by editing the themes.inc.php file... which, again, I understand is a bad idea... so want to know how to do it "properly"
Thanks in advance.