<?php
// this file and the functions in it are used for menu groups where a "custom" type was selected
// for a menu group in menu management
// ***** it is recommended that you know at least a LITTLE php to use these custom menu templates
// to create a new template function, use the Enigma menu template below as a guide
// - function name has to have template_Menus_{tagname}, which means the function name HAS to have your menugroup tagname in it
// - the $menu_group, $menu_item variables HAVE to be in the parenthesis so that you have
// something to display in the template
// variables that you can use in your template
// Group variables first...
// $menu_group['itemsep'] - this is the item separator entered for this menu group, it COULD be blank
// $menu_group['tagname'] - this is the tagname of the current menu
// $menu_group['css'] - if you entered a class name for the css field, here it is
// Item variables
// $menu_item['is_special'] - this will equal 'custsep' for custom separators entered as a menu item
// this can be set to other things for special links that need a variable added to the url
// $menu_item['target'] - did you enter a target for this url?
// $menu_item['url'] - the url field, don't forget... did you enter http://something?
// If not, you might want to add $scripturl to the global and you link, see the Enigma menu for example
// $menu_item['alt'] - alt text/name field, if you're using an image, put this as the alt for the image
// otherwise this is the text for your link
// ***Note: $menu_item['alt'] is used to display a custom separator when $menu_item['is_special'] equals 'custsep'
// $menu_item['imgfolder'] - did you select a custom location for an image link? here's your folder, be sure to add
// any necessary prefixes (eg. $boardurl, $settings['images_url'])
// $menu_item['image'] - the image filename you entered
// $menu_item['border'] - image border size, you could enter your own directly OR use this variable if you entered it
// in menu management
// $menu_item['width'] - image width, only if you entered it
// $menu_item['height'] - image height, only if you entered it
// $menu_item['imgloc'] - this will be '0' for a default image location or '1' for a custom set location
// **remember, if you replace any variable name with HARD text, it will repeat for EVERY menu_item in the menu.
function template_Menus_Enigma ($menu_group, $menu_item)
{
global $boardurl;
if ($menu_item['is_special'] == 'custsep')
{
echo '
<tr>
<td align="left" width="100%">' . $menu_item['alt'] . '</td>
</tr>';
}
else
{
$menuid = 'E2Menu_' . $menu_item['id'];
echo '
<tr>
<td align="left" width="100%" id="' . $menuid . '" class="enigmamenu" onmouseover="SwapClass(\'' . $menuid . '\',\'menuover\');" onmouseout="SwapClass(\'' . $menuid . '\',\'menuout\');" onclick="SwapClass(\'' . $menuid . '\',\'menuclick\');">
<span style="width: 100% !important; height: 100%; font-size: 12px; font-weight: bold;">
» <a href="' . $menu_item['url'] . '" ' . $menu_item['target'] . '>' . $menu_item['alt'] . '</a>
</span>
</td>
</tr>';
unset($menuid);
}
}
?>