%name:Admin Secondary Processes% %version:13.0.0.3% %description:
  1. Uses the TNG Tree cookie so that the tree cookie doesn't have to be selected for each Secondary Process
  2. Displays the tree menu immediately below the secondary process results so the user doesn't have to click a link to go to a separate Secondary Process menu page after each process.
% %wikipage:Admin Secondary Processes% %author:Robin Richmond:https://tng.lythgoes.net/wiki/index.php?title=User:Robinrichm% ********************************************** *** Revision History *** v3 1 Feb 2021 * Added the secondary process for the Republican Dates mod v2 23 Jan 2021 * Added the secondary process from the Media Living and Private Flags mod * Added the secondary process from the Alternate Spellings mod v13.0.0.1 28 Sep 2020 * No changes in upgrading from v12 * Added buttons from the Burial Website Media and Create Sitemap mods v0c 17 Jul 2020 * The Rebuild Branches and Short Placenames buttons now pass two querystring parameters to the target program. They are the tree ID, and a flag that causes the target program to add a link (which, right now is a new tab) back to the Secondary Processes. * The message "This buttons opens the target page in a new window" pops up from my new-window entity (☍) that is placed after the Rebuild Branches and/or Short Placenames buttons. v0b - 13 Jun 2020 * If Admin Branches Queue has been installed, adds a "Rebuild Branches" button next to "Relabel Branches" button with an information icon beween them. ** The Relabel Branches information icon winds up between the two buttons. ** The information Icon shows different text depending on whether Admin Branches Queue is installed v0a - 2 May 2020 - Added a popup warning from an information icon next to the Relabel Branches process - admin_secondmenu.php now just redirects to admin_secondary.php, which does ALL of the work. v0 - 13 Mar 2019 ******************************************************************** ******************************************************************** %target:admin_secondary.php% %location:% include("$mylanguage/admintext.php"); %end:% %insert:after% ##### admin_secondary.php, modified by ###Admin Secondary Processes, by Robin Richmond # Pulls the secondary menu out of admin_secondmenu.php, which now just redirects to this program $tngModNames['Admin Secondary Processes']['admin_secondary.php'] = '3'; # Load custom language strings from a mod subfolder $modfolder = "admin_secondary_processes_v13.0.0.3"; include("$modspath/$modfolder/languages/English_custtext.php"); if ($mylanguage != "languages/English" && file_exists("$modspath/$modfolder/{$mylanguage}_custtext.php")) include("$modspath/$modfolder/{$mylanguage}_custtext.php"); ################################################################### #Use or set the tree cookie if it is present #$tree is an input parameter from the Secondary Process Menu #If no secondary process is specified, make sure we have a good tree id if (empty($secaction)) { $secaction = ''; if (empty($assignedtree)) $assignedtree = ''; if (empty($tree)) { if ($assignedtree) $tree=$assignedtree; elseif (!empty($_COOKIE['tng_tree'])) $tree = $_COOKIE['tng_tree']; if (empty($tree)) $tree = $defaulttree; #TNG configuration variable #It is ok for us to leave $tree empty; The user will be prompted for a tree } } else { #If a secondary process has no tree, it just processes all trees. if (empty($tree)) $tree = '--all--'; if ($tree != '--all--') setcookie("tng_tree", $tree, 0); } ###################################################### ###Admin Secondary Processes Location 1: End of insertion %end:% *********** admin_secondary.php Location 2 - Add a heading to the Refresh Living process results %location:% elseif( $secaction == $admtext['refreshliving'] ) { %end:% %insert:after% echo "
{$admtext['refreshliving']}
\n"; ###Admin Secondary Processes Location 2: Heading above the Refresh Living results %end:% *********** admin_secondary.php Location 3 - Add a heading to the Make Private process %location:% elseif( $secaction == $admtext['makeprivate'] ) { %end:% %insert:after% echo "
{$admtext['makeprivate']}
\n"; ###Admin Secondary Processes Location 3 Add a heading when processing "Make Private" %end:% *********** admin_secondary.php Location 4 - Rebuild from scratch the secondary process menu that was in admin_secondmenu %location:%

»

%end:% %replace:% "; $query = "SELECT gedcom, treename FROM $trees_table ORDER BY treename"; $result = tng_query($query); $allow_export = 1; if( !$allow_ged && $tree ) { $query = "SELECT disallowgedcreate FROM $trees_table WHERE gedcom = \"$tree\""; $disresult = tng_query($query); $row = tng_fetch_assoc( $disresult ); if($row['disallowgedcreate']) $allow_export = 0; tng_free_result($disresult); } echo "
\n"; if (tng_num_rows($result)>1) { echo "{$admtext['tree']}:
\n"; } else { $row = tng_fetch_assoc($result); echo "
{$admtext['tree']}: {$row['treename']}
\n"; } ### Start the row of submit buttons ### ?> \n"; ################# #Wrap the (possibly) two buttons that label or rebuild branches in a span border, #And always put an info icon after the native "Relabel Branches" button. #The info text depends on whether Admin Branches Queue has been installed echo " \n"; if (file_exists("rrbranchesqueue.php")) echo "\n"; echo "\n"; ################# Native buttons ########### ?> \n"; ################# #Add the Create Sitemap process if the Create Sitemap mod is installed if (!empty($admtext['createsitemap'])) echo "\n"; ################# #Add the Short Placenames secondary process if the mod is installed. if (!empty($admtext['rrpsn-secondary'])) { echo " \n"; } ################# #Add the Media Living&Private Flags process if the mod is installed. if (file_exists('rrmedialivingflag_populate.php')) { echo "\n"; echo "
"; if (empty($admtext['rrmlf-inprogressdims'])) echo "350,120"; else echo $admtext['rrmlf-inprogressdims']; echo "
{$admtext['rrmlf-inprogress']}|The process you just launched to set the Media table living and private flags can take several minutes.
There isn't an effective way to track its progress or to interrupt it other than to stop the MySQL service.

So you'll just have to be patient.

\n"; ?> \n"; ################### #Add the Republican Dates mod if it is installed if (!empty($dates['<'])) echo "\n"; ############# End of the row of submit buttons ########## ?>

:
» GenDex Network
» FamilyTreeSeeker.com

\n"; echo "
"; if (file_exists('rrbranchesqueue.php')) echo str_replace("YYY", $admtext['rrasp-rebuildbranches'], str_replace('XXX', $admtext['relabelbranches'], "{$admtext['rrasp-warning2']} {$admtext['rrasp-issue']} {$admtext['rrasp-rebuilding']}")) . "\n"; else echo str_replace('XXX', $admtext['relabelbranches'], "{$admtext['rrasp-warning1']}
{$admtext['rrasp-issue']}{$admtext['rrasp-labeling']}") . "\n"; echo "
\n"; echo "
{$admtext['rrasp-newwindowmessage']}
\n"; echo "\n"; ?> \n"; if (file_exists('rrshowmodnames_include.php')) include_once('rrshowmodnames_include.php'); ###Admin Secondary Processes Location 4: End of replacement text ?> %end:% ******************************************************************** ******************************************************************** %target:admin_secondmenu.php% %location:% include("begin.php"); %end:% %insert:before% ##### admin_secondmenu.php, modified by ###Admin Secondary Processes, by Robin Richmond # Now does nothing more than redirect to admin_secondary.php, which takes some code from this program $tngModNames['Admin Secondary Processes']['admin_secondmenu.php'] = '3'; header ("location:admin_secondary.php"); exit; ############################################################################# %end:% ******************************************************************** ******************************************************************** %target:admin_gedimport.php% %location:% include("begin.php"); %end:% %insert:after% ##### admin_gedimport.php, modified by ###Admin Secondary Processes, by Robin Richmond # Saves the tree cookie $tngModNames['Admin Secondary Processes']['admin_gedimport.php'] = '3'; #Register the mod ############################################################################# %end:% *********** admin_gedimport.php Location 2 - Set the tree cookie %location:% $tree = $tree1; //selected %end:% %insert:after% setcookie("tng_tree", $tree, 0); ###Admin Secondary Processes Location 2: Set the tree cookie %end:% *************** admin_gedimport.php Location 3 - Show mod names %location:% echo "\n"; %end:% %insert:after% ###Admin Secondary Processes Location 3: Show mod names if (file_exists('rrshowmodnames_include.php')) include_once ('rrshowmodnames_include.php'); %end:% *********************************************************************** *********************************************************************** *** The language folder inside the mod's subfolder contains language string files.