2,038 bytes added
, 19:44, 9 August 2018
== Description ==
Mod updates the TNG custom menu with a additional flag -- users-- which restricts a menu item to logged in users, not showing it to casual visitors to the site.
The flag is used as part of the menu item definitions in the site's customconfig.php file. See [[Custom_Menu_Hook]] for complete details on how to define menu items.
The syntax to flag a menu item for logged in users only is as follows:
<pre>$LINKTYPE['link_nr]['user'] = true;</pre>
Where $LINKTYPE is one of the following, depending on which menu should contain the item:
<pre>
$custommenulinks /*custom menu defined by webmaster*/
$findmenulinks /*Find menu*/
$mediamenulinks /*Media menu*/
$informenulinks /*Info menu*/
</pre>
== Example ==
The following definition in '''customconfig.php''' will insert an item into the TNG Info drop down menu -- in this case, "Submit Family" -- which when clicked will open an empty Family Group Worksheet for the registered user to submit family information.
<syntaxhighlight lang="php" line='5'>
$link_nr = 0;
$infomenulinks[$link_nr]['target'] = "fgw/index.php";
$infomenulinks[$link_nr]['sprite'] = "";
$infomenulinks[$link_nr]['icon'] = "fgw/img/families.gif";
$infomenulinks[$link_nr]['label_text'] = "Submit Family";
$infomenulinks[$link_nr]['user'] = true;
</syntaxhighlight>
== Compatibility ==
{| class="wikitable"
|+ Mod Tested With Following TNG Versions
! Ver !! 1011 - 1201
|-
| 10.1.1.0
| style="background-color:green;" |
|}
<nowiki>*</nowiki><small>green: compatible red: not compatible white: not tested</small>
See [[Multisite Testbed]] for information on how this mod is tested and managed.
== Installation ==
# Download the mod file from the top of the page
# Unzip the file and place it in your /mods folder.
# Click on Mod Manager in the Admin panel and install it.
# There are no options to set
[[Category:Mods for TNG v12]]
[[Category:Mods for TNG v11]]
[[Category:Mods for TNG v10]]
[[Category:genlib.php mods]]