gedcomCreatedSoftware(); $CREATED_VERSION = $stats->gedcomCreatedVersion(); $CREATED_DATE = $stats->gedcomDate(); /* * First Pass. * Handle embedded language, fact, global, etc. references * This needs to be done first because the language variables could themselves * contain embedded keywords. */ // Title $title_tmp=embed_globals(get_block_setting($block_id, 'title')); $html =embed_globals(get_block_setting($block_id, 'html')); /* * Second Pass. */ list($new_tags, $new_values) = $stats->getTags("{$title_tmp} {$html}"); // Title if (strstr($title_tmp, '#')){$title_tmp = str_replace($new_tags, $new_values, $title_tmp);} // Content $html = str_replace($new_tags, $new_values, $html); /* * Restore Current GEDCOM */ $GEDCOM = WT_GEDCOM; /* * Start Of Output */ $id=$this->getName().$block_id; $title=''; if ($ctype=="gedcom" && WT_USER_GEDCOM_ADMIN || $ctype=="user" && WT_USER_ID) { if ($ctype=="gedcom") { $name = WT_GEDCOM; } else { $name = WT_USER_NAME; } $title .= "" ."\"".i18n::translate('Configure').'"'; ; } if (WT_USER_GEDCOM_ADMIN) { $title .= help_link('index_htmlplus_a'); } else { $title .= help_link('index_htmlplus'); } $title.=$title_tmp; $content = $html; $block=get_block_setting($block_id, 'block', false); if ($block) { require $THEME_DIR.'templates/block_small_temp.php'; } else { require $THEME_DIR.'templates/block_main_temp.php'; } } // Implement class WT_Module_Block public function loadAjax() { return true; } // Implement class WT_Module_Block public function isUserBlock() { return true; } // Implement class WT_Module_Block public function isGedcomBlock() { return true; } // Implement class WT_Module_Block public function configureBlock($block_id) { if (safe_POST_bool('save')) { set_block_setting($block_id, 'compat', safe_POST_bool('compat')); set_block_setting($block_id, 'ui', safe_POST_bool('ui')); set_block_setting($block_id, 'gedcom', safe_POST('gedcom')); set_block_setting($block_id, 'title', $_POST['title']); set_block_setting($block_id, 'html', $_POST['html']); $languages=array(); foreach (i18n::installed_languages() as $code=>$name) { if (safe_POST_bool('lang_'.$code)) { $languages[]=$code; } } if (!$languages) { $languages[]=WT_LOCALE; } set_block_setting($block_id, 'languages', implode(',', $languages)); echo WT_JS_START, 'window.opener.location.href=window.opener.location.href;window.close();', WT_JS_END; exit; } require_once WT_ROOT.'includes/functions/functions_edit.php'; $useFCK = file_exists(WT_ROOT.'modules/FCKeditor/fckeditor.php'); if($useFCK){ require WT_ROOT.'modules/FCKeditor/fckeditor.php'; } $templates=array( i18n::translate('Keyword examples')=> ' #getAllTagsTable#
'.i18n::translate('Embedded variable').' '.i18n::translate('Resulting value').'
', i18n::translate('Narrative description')=>/* I18N: do not translate the #keywords# */ i18n::translate('This site was last updated on #gedcomUpdated#. There are #totalSurnames# surnames in this family tree. The earliest recorded event is the #firstEventType# of #firstEventName# in #firstEventYear#. The most recent event is the #lastEventType# of #lastEventName# in #lastEventYear#.

If you have any comments or feedback please contact #contactWebmaster#.'), i18n::translate('GEDCOM statistics')=>'
#gedcomTitle#
'.i18n::translate('This GEDCOM was created using %1$s on %2$s.', '#gedcomCreatedSoftware#', '#gedcomDate#').'
'.i18n::translate('Individuals').'  #totalIndividuals#
'.i18n::translate('Total surnames').'  #totalSurnames#
'. i18n::translate('Families').'  #totalFamilies#
'.i18n::translate('Sources').'  #totalSources#
'.i18n::translate('Media objects').'  #totalMedia#
'.i18n::translate('Other records').'  #totalOtherRecords#
'.i18n::translate('Total events').'  #totalEvents#
'.i18n::translate('Males').'  #totalSexMales# [#totalSexMalesPercentage#%]
'.i18n::translate('Females').'  #totalSexFemales# [#totalSexFemalesPercentage#%]
'.i18n::translate('Total users').'  #totalUsers#

'.i18n::translate('Earliest birth year').'  #firstBirthYear#  #firstBirth#
'.i18n::translate('Latest birth year').'  #lastBirthYear#  #lastBirth#
'.i18n::translate('Earliest death year').'  #firstDeathYear#  #firstDeath#
'.i18n::translate('Latest death year').'  #lastDeathYear#  #lastDeath#
'.i18n::translate('Person who lived the longest').'  #longestLifeAge#  #longestLife#
'.i18n::translate('Average age at death').'  #averageLifespan# 
'.i18n::translate('Family with the most children').'  #largestFamilySize#  #largestFamily#
'.i18n::translate('Average number of children per family').'  #averageChildren#

'.i18n::translate('Most Common Surnames').'
#commonSurnames#
' ); $title=get_block_setting($block_id, 'title'); $html=get_block_setting($block_id, 'html'); // title print "" .translate_fact('TITL') .help_link('index_htmlplus_title') ."" ; // templates print "" .i18n::translate('Templates') .help_link('index_htmlplus_template') ."" ; if($useFCK) { print "\t\t\t\n" ."\t\t\t\n"; } print "\t\t\t\t\n"; foreach($templates as $title=>$template) { print "\t\t\t\t\n"; } print "\t\t\t\n" ."\t\t\n\t\n" ; // gedcom $gedcoms = get_all_gedcoms(); $gedcom=get_block_setting($block_id, 'gedcom'); if(count($gedcoms) > 1) { if($gedcom == '__current__'){$sel_current = ' selected="selected"';}else{$sel_current = '';} if($gedcom == '__default__'){$sel_default = ' selected="selected"';}else{$sel_default = '';} print "\t\n\t\t" .i18n::translate('Family Tree') .help_link('index_htmlplus_gedcom') ."\n" ."\t\t\t\n" ."\t\t\n\t\n" ; } // html print "\t\n\t\t\n" .i18n::translate('Content') .help_link('index_htmlplus_content') ."

" ."" ; if($useFCK) { // use FCKeditor module require_once WT_ROOT.'modules/FCKeditor/fckeditor.php'; $oFCKeditor = new FCKeditor('html') ; $oFCKeditor->BasePath = './modules/FCKeditor/'; $oFCKeditor->Value = $html; $oFCKeditor->Width = 700; $oFCKeditor->Height = 250; $oFCKeditor->Config['AutoDetectLanguage'] = false ; $oFCKeditor->Config['DefaultLanguage'] = WT_LOCALE; $oFCKeditor->Create() ; } else { //use standard textarea print ""; } print "\n\t\t\n\t\n"; // compatibility mode $compat=get_block_setting($block_id, 'compat', false); if($compat == 1){$compat = ' checked="checked"';}else{$compat = '';} print "\t\n\t\t" .i18n::translate('Compatibility Mode') .help_link('index_htmlplus_compat') ."\n\n" ."\t\n" ; // extended features $ui=get_block_setting($block_id, 'ui', false); if ($ui == 1) { $ui = ' checked="checked"'; } else { $ui = ''; } print "\t\n\t\t" .i18n::translate('Extended Interface') .help_link('index_htmlplus_ui') ."\n" ."\t\n" ; $languages=get_block_setting($block_id, 'languages', WT_LOCALE); echo ''; echo i18n::translate('Show this block for which languages?'); echo ''; echo edit_language_checkboxes('lang_', $languages); echo ''; } }