Cust Menu Extension

From TNG_Wiki
Revision as of 00:44, 10 August 2018 by Kazooter (talk | contribs) (Created page with "== 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 si...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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:

$LINKTYPE['link_nr]['user'] = true;

Where $LINKTYPE is one of the following, depending on which menu should contain the item:

$custommenulinks  /*custom menu defined by webmaster*/
$findmenulinks    /*Find menu*/
$mediamenulinks   /*Media menu*/
$informenulinks   /*Info menu*/

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.

1 $link_nr = 0;
2 $infomenulinks[$link_nr]['target'] = "fgw/index.php";
3 $infomenulinks[$link_nr]['sprite'] = "";
4 $infomenulinks[$link_nr]['icon'] = "fgw/img/families.gif";
5 $infomenulinks[$link_nr]['label_text'] = "Submit Family";
6 $infomenulinks[$link_nr]['user'] = true;

Compatibility

Mod Tested With Following TNG Versions
Ver 1011 - 1201
10.1.1.0

*green: compatible   red: not compatible   white: not tested

See Multisite Testbed for information on how this mod is tested and managed.

Installation

  1. Download the mod file from the top of the page
  2. Unzip the file and place it in your /mods folder.
  3. Click on Mod Manager in the Admin panel and install it.
  4. There are no options to set