Author: Nicholas B. Flint, http://www.flintfamilyhistory.com/
The newest version of TNG Integrated Login will always be available at
http://www.flintfamilyhistory.com/download.php.
The Next Generation 5, TNG, is a commercially available php script for the
presentation of genealogical information. It is the sole property of Darrin
Lythgoe. It can be purchased from
http://www.lythgoes.net/genealogy/software.php
License
Description of TNG Integrated
Login
Support
Requirements
Installation
Option Integration Steps
If you use any version of tngIL please create a link on your site to http://www.flintfamilyhistory.com.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option)
any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, Boston, MA 02111-1307 USA
TNG Integrated Login - e107 provides a means of integrating TNG 6 with e107
v.7. If a tngIL user is already in your TNG database they will be logged into
TNG. If a tngIL user is not already in your database they will be added and then
logged in. You can select which TNG security options to assign by default to all
TNG users created using tngIL. Currently only one set of TNG security options is
available for all users by default. Future versions will include multiple TNG
security options depending on e107 user classes.
Features:
Support is not available via e-mail. For all support related questions please visit the support forums at http://www.tngforum.us.
e107 v.7, TNG 6.x
<?php $istngfile = "yes"; require_once("../../class2.php"); if($tngprint == "1") { //if it's a print formatted page don't add the e107 stuff //dont load the e107 stuff } else { require_once(HEADERF); if(file_exists(e_PLUGIN."plugTNG/language/".e_LANGUAGE.".php")){ require_once(e_PLUGIN."tngIL_menu/language/".e_LANGUAGE.".php"); } } //end if eregi include("config.php"); ?> |
<? //include the footer require_once(FOOTERF); ?> |
// Destroy! (if we need to) if($register_globals == true){ while (list($global) = each($GLOBALS)) { if (!preg_match('/^(_POST|_GET|_COOKIE|_SERVER|_FILES|GLOBALS|HTTP.*|_REQUEST|retrieve_prefs|eplug_admin)$/', $global)) { unset($$global); } } unset($global); } |
Change it to:
if(!isset($istngfile)){$istngfile="no";} if($istngfile != "yes"){ // Destroy! (if we need to) if($register_globals == true){ while (list($global) = each($GLOBALS)) { if (!preg_match('/^(_POST|_GET|_COOKIE|_SERVER|_FILES|GLOBALS|HTTP.*|_REQUEST|retrieve_prefs|eplug_admin)$/', $global)) { unset($$global); } } unset($global); } } //end if |
e107 Menu Visibility
To integrate the TNG admin section
To display TNG with only
one e107 Menu bar
These options are useful when used with the Links Menu and the Admin Links Menu.
To hide or show a menu when TNG public files are access enter the following
code in the visibility section of that
menu:
tngIL/
To hide or show a menu when TNG admin files are access enter the following
code in the visibility section of that
menu:
tngIL/admin/
Back to Optional Integration Steps
include("../globallib.php"); |
and add before that line:
$istngfile="yes"; require_once("../../../class2.php"); if(eregi(e_PAGE, "findpersonform.php") || eregi(e_PAGE, "findperson.php") || eregi(e_PAGE, "findfamilyform.php") || eregi(e_PAGE, "findfamily2.php") || eregi(e_PAGE, "findsourceform.php") || eregi(e_PAGE, "findsource2.php") || eregi(e_PAGE, "findplaceform.php") || eregi(e_PAGE, "findplace2.php") || eregi(e_PAGE, "newentity.php") || eregi(e_PAGE, "addentity.php") || eregi(e_PAGE, "newevent.php") || eregi(e_PAGE, "notes.php") || eregi(e_PAGE, "filepicker.php") ){ //dont load the e107 stuff } else { require_once(HEADERF); if(file_exists(e_PLUGIN."plugTNG/language/".e_LANGUAGE.".php")){ require_once(e_PLUGIN."tngIL_menu/language/".e_LANGUAGE.".php"); } } //end if eregi |
<?php header("location: $e107_dir/e107_plugins/tngIL/admin/main.php"); exit; ?> |
Note: this will only add the e107 site header to admin pages, currently adding a footer would require editing each admin page and inserting the following code at the bottom:
<? //include the footer require_once(FOOTERF); ?> |
Back to Optional Integration Steps
This requires editing the e107 theme.php file in use on your site. There are several ways to do this. I will only list the way I use. Check out $CUSTOMHEADER, $CUSTOMFOOTER, and $CUSTOMPAGES on e107.org for more information.
$HEADER = "The code for the e107 header"; $FOOTER = "The code for the e107 footer"; |
and change it to this:
if(isset($istngfile) && $istngfile == "yes" || eregi(e_PAGE, "forum.php") //this line is used to add other pages to the same layout; just repeat it as many times as need and change the file name; delete this line if you don't need it ){ $HEADER = "Your edited code for the e107 header"; $FOOTER = "Your edited code for the e107 footer"; } else { $HEADER = "The code for the normal e107 header"; $FOOTER = "The code for the normal e107 footer"; } |
Back to Optional Integration Steps