Customevents Mod Maker

From TNG_Wiki
Jump to: navigation, search

In TNGv12 and beyond, this mod uses the new guidelines for TNG v12+ cust_text.php files
If you are using TNGv12+, and any cust_text.php file in this mod is marked with a Bad Target error, you need to update your cust_text.php files before you can install this mod. [Show instructions]

If you upgraded to TNGv12+, and did not update your cust_text.php files as instructed in the upgrade readme script, then you must use the TNG Mod Manager to update them. To do so:

  1. Go to Mod Manager, and select its "Recommended Updates" tab.
    (If the "Recommended Updates" tab is not visible, then go to the Mod Manager Options tab, select "Display Settings", and turn on the "Recommended Updates" tab.)
  2. Click the "Update" button in the "Recommended Updates" tab.
    Installed mods do not interfere with the update, and if you already have (or think you may have) run this update, it will not hurt for you to run it again.

[See details in the TNGv12 Change Impacts Article][Hide the instructions]

Restricted Downloads of Customevents Mod Maker are restricted to logged in users. If you do not have a user account on the TNG Wiki use the Request Account link to request a user account Restricted

Customevents Mod Maker
Summary Makes a tool for creating mods.
Validation The mod is XHTML compliant.Valid-xhtml10.png
Mod Updated 6 Jan 2019
Download link for
TNG 12.0
Download stats Click for stats
Author(s) Erik Hoppe
Homepage Customevents_Mod_Maker (this page)
Mod Support My Mod Support
Contact Developer My Mod Support
Latest Mod for TNG v12.0.1 and above
Min TNG V 12.0.1
Max TNG V 12.x
Files modified
Related Mods
Author of TNG Colouring Book
Mods by me: At my user page.

Purpose of the mod

Makes a tool available for generating mods from an input form.
The mod is created in a minute and requires no programming at all! All you have to do is to install.
All your site's languages can be supported in the generated mod/page.

The generated mod creates a page that lists people having a selected Custom Event (like Residence, Occupation, Will...) with an attched Note - here:

One mod/page can be created for each Custom event.

The page can be attached to any dropdown menu (also your custom) and will signal "!" when there is a new or updated Note since the user visited that page the last time.

See below for an example of a page listing Wills and how to create it.

I have tested the generated mods on a localhost database with 11,000+ rows in tng_xnotes table and 30,000+ people.
The "News" are checked in tng_xnotes, once for each event/page/mod, each and every pageopening where there is a dropdown menubar.
Three events/pages/mods in the Find menu performs fine. For larger databases I don't know.


This mod was developed by Erik Hoppe
All my mods are listed at my user page


TNG 12.0
  • A working TNG installation.
  • A backup of all affected files (see the list below)
  • An installed current version of the Mod Manager (is already included in TNG)

Custom menu

If you want to add pages to your Custom menu, it must be declared... your customconfig.php file like this:
$custmenu['title_index'] = "mymenu";   <== NOTE title_index your languages / yourlanguage / cust_text.php file(s) like this:

$text['mymenu'] = "My menu heading";

Replace mymenu and My menu heading with your own words.

After installation you must enter mymenu (your substitution) in Modmanager Edit options.

(Read more about the Custom menu at the Wiki page Custom Menu Hook)

Before Installation


The complete first time installation affects your database and it should be backed-up before installing the mod.


  1. Click on the download link, shown in the summary in the upper right corner of the page.
  2. Un-zip the file you receive and you will find a folder called Customevents_Mod_Maker_v12.0.1.2. Open it.
  3. Move/copy/FTP the file customevent_mod_maker_v12.0.1.2.cfg and the TWO included folders customeventsMM.2 and customevenetsPages to the mods folder of your TNG system.
  4. Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the mod.

After installation

  1. When you install for the first time (not update), click the button Create and Modify Database tables. Your screen will turn white for a moment - don't panic!
    It may take a while, depending on the amount of rows you have in the tng_xnotes table (the mod is adding a column with a default value).
  2. If you want to use your Custom menu: Open Edit options to add your $text['index'] (mymenu in the above example)
  3. Done! You can start using the Tool; click the button Create a new Mod

In the event of a problem


No known conflicts - yet.

The "How-to" Use the Tool


When you launch the tool, a form is opened.
A page for WILLs (f.ex), placed in the histories folder (f.ex) and attached to the Find menu (f.ex), is created in minutes w/o any programming at all:


(Site default language is Swedish, multiple languages used - hence the "English copy" reminder.)

>>> To read the Complete Tool Instructions; click on the [Expand] link on the right or [Collapse] to hide the section again.

1. The first thing you do is to select a custom event TAG.
The drop-down list should contain all your Individs custom event tags:


2. If you don't use the default TNG menubar (no dropdown menus), you should tick this box:

NOTE that you have to manually link to the final pages!

3. Select the dropdown menu you want to add your page to.
If you choosed to NOT use the menubar, this part is not displayed.


4. Enter the menulink text in your Site Default Language (Swedish in this case).
If you use more than one language and your default language is not English, there is a reminder to add an English text also.
It is important if language-switching is activated:


When you have entered your text, select another language (English) and click Go to add a new inputfield:

Add as many languages as you like the same way.

5. Shall the page be restricted in any way?
The page can be public (always displayed for all visitors), only available for logged-in users or only available for Administrators.


The menu link will not be visible and the page will not be executable for other than the selected.

6. If you want your page in an already existing folder, you enter the (path and) foldername.
Do NOT enter the TNG root or a preceeding slash (" / ").
If you want the page in the histories folder, you enter "histories" (w/o quotes):


7. Add a headline for your page.
Use the same languages as above:


8. Select an icon for your page.
If you don't use the menubar this is optional, otherwise not.
The icon (max 20x20px) must be found in the (TNG root/)img folder.
Click an icon to select it or enter the name. Don't enter any path - only the imagename.
An icon is already selected for you:


9. Add a Subheading for your page.
It is displayed in a smaller size than the headline and can maybe explain something or...
The subheading is not mandatory:


Use the same languages as above if you use it.

10. Do you want date-of-birth and -death to be displayed along with the names?
Like this: John Smith (2 Jul 1835 - 28 Dec 1910)
Select one or both by ticking the box(es):


11. ALL DONE! Simply click the Generate mod button:


In a few seconds this message will appear at the top of your page:

12. After a reload of the Modmanager page, your mod is found very close to the Customevent Mod Maker mod, ready to be installed:


When the generated mod is installed, the page is found in the selected dropdown menu,
signalling ( ! ) new or updated Notes both in the menu heading and in the menu link:


The generated WILL page looks like this:


There are no News if the user has never been to this page before (everything is new).
When an event's Note is added or updated it is signalled in the menu and at the page.
If the page is public, guests do NOT get a news signal.

The signal will disappear when the user lefts the first page. If there are news also at a following page, they are signalled until that page is left.

Uninstalling the mod

  1. Unistall ALL your generated customeventXXXXpage.cfg mods first!
  2. Click the Uninstall button
  3. If you want to completely Delete this mod and all its tables, you should also
    click the Remove Database Changes button

Language Support

Supported languages, if present, other than English:

Note: Your generated mods/pages support any language you decide, that is installed in your TNG system.

Custom Text Additions

The config file includes the English language custom text.
There is a Swedish translation if that language is present in your TNG system.
For other languages you can modify the config file to add the custom text or manually add to whatever language you like.
Your generated mods/pages need no custom texts.

>>> To read the English Custom texts; click on the [Expand] link on the right or [Collapse] to hide the section again.

(English custom text for reference)

$text['eventsNewChar'] = "&nbsp;!&nbsp;"; // News signal char. betw. spaces
$admtext['eventpagevisits'] = "Visittimes for CustEventXpages";
$text['ceventPageperslink'] = "Name (link, new window)";
$text['ceventPagenews'] = "New/Upd";
$text['ceventButtremove'] = "Will remove any News/Upd mark from this page";
$text['ceventButtremoveall'] = "Will remove any News/Upd mark from all pages";
$text['ceventSortdate'] = "Sort by Date added/upd";
$text['ceventSortname'] = "Sort by Name";

if ($textpart == "ceventmod") {
/* Don't touch the above line! */

$text['cevbldPgtitle'] = "Build Customevent page";
$text['cevbldTranslremind'] = "Remember a copy in English!";
$text['cevbldSeltag'] = "Select Tag";
$text['cevbldModready'] = "Your Mod is created";
$text['cevbldModreadyname'] = "The name is";
$text['cevbldModreadyfound'] = "and is found in <b>Modmanager</b> after a reload of the MM-page";
$text['cevbldModreadyclose'] = "You can now create a new page or close this window/tab";
$text['cevbldfrmFormtitle'] = "Customevent Page Modbuilder Form";
$text['cevbldfrmQtagname'] = "What is the name of the Customevent Tag";
$text['cevbldfrmQbarremove'] = "Do you want the TNG dropdown-menu bar <i>removed</i> from the page";
$text['cevbldfrmNmanlink'] = "NOTE! You have to manually create a link to the page";
$text['cevbldfrmQwhichmenu'] = "To which dropdown-menu do you want to add this page";
$text['cevbldfrmLcustommenu'] = "Custom";
$text['cevbldfrmNcustommenu'] = "<b>Note!</b> The Custom menu must exist <b>before</b> the generated mod is installed";
$text['cevbldfrmLsellang'] = "Select Language";
$text['cevbldfrmWsellang'] = "Warning: English is not supported!";
$text['cevbldfrmQlinktxt'] = "What's the Menulink text";
$text['cevbldfrmQprestrict'] = "Is the page restricted";
$text['cevbldfrmLnorestrict'] = "NO restriction";
$text['cevbldfrmLusers'] = "Only Logged-in users";
$text['cevbldfrmLadmin'] = "Only Admins";
$text['cevbldfrmQdir'] = "Do you want the page in a folder";
$text['cevbldfrmNdir'] = "The folder must exist. Enter path - <b>exclude " <i>TNGroot /</i> "</b> - and foldername";
$text['cevbldfrmPHdir'] = "Folder";
$text['cevbldfrmQheadl'] = "What is your page Headline";
$text['cevbldfrmQicon'] = "Do you want an icon for your";
$text['cevbldfrmQCAicon'] = "Menu-link and";
$text['cevbldfrmQEicon'] = "Headline";
$text['cevbldfrmLselicon'] = "Select an icon";
$text['cevbldfrmNicon'] = "Or enter name of (max 20x20px) image in <b><i>TNGroot / img</i></b> (Suggested / default =";
$text['cevbldfrmQsubheadl'] = "Do you want a Subheading";
$text['cevbldfrmQdob'] = "Show Date-of-Birth</b></big> along with the person's name";
$text['cevbldfrmQdod'] = "Show Date-of-Death</b></big> along with the person's name";
$text['cevbldfrmLyes'] = "Yes";
$text['cevbldfrmGenerate'] = "Generate mod";
$text['cevbldfrmJSnotag'] = "No TAG selected";
$text['cevbldfrmJSnomenu'] = "No MENU selected";
$text['cevbldfrmJSnolink'] = "No MENULINK named";
$text['cevbldfrmJSnorestrict'] = "No RESTRICTION selected";
$text['cevbldfrmJSnoheadl'] = "No HEADLINE named";
$text['cevbldfrmJSnoicon'] = "No ICON named";

/* Don't touch the above line! */

Revision History

Version Date Description
v12.0.1.2a 6 Jan 2019 German translation kindly provided by JPB.
v12.0.1.2 6 Nov 2018 Some trouble for sites that require log in has been solved.
v12.0.1.1 20 Oct 2018 Mistakes and errors corrected. Added optional sort of output.
v12.0.1.0 16 Oct 2018 Introduction.

Sites using this mod

Support this mod by adding your TNG site to the table below:

URL User Note Mod-Version TNG-Version User-language
Andersson, Hoppe, Sahlin, Thorell Erik Hoppe Mod author (Not this mod yet) 11.1.2 SE, GB, DE
Custom Event mod for Obituaries Paul Turner Erik Hoppe 12.0.2 en
Our Acadian Family Randal Suire Useful mod 12.0.3 EN, FR

TNG Modules Impacted

The following TNG Modules are modified, and should be backed up prior to installing this mod:

  • genlib.php
  • customconfig.php
  • admin_genconfig.php
  • admin_utilities.php
  • admin_backup.php
  • admin_optimize.php
  • admin_restore.php
  • English/cust_text.php
  • English-UTF8/cust_text.php
  • German/cust_text.php (if present)
  • German-UTF8/cust_text.php (if present)
  • Swedish/cust_text.php (if present)
  • Swedish-UTF8/cust_text.php (if present)
  • customeventsMM.2a/ceventmodpage.php (mod's own)

The generated mods modify these files:

  • genlib.php
  • The languagefiles you use