embedTags($title_tmp); $html = $stats->embedTags($html); } /* * Restore Current GEDCOM */ $GEDCOM = WT_GEDCOM; /* * Start Of Output */ $id=$this->getName().$block_id; $class=$this->getName().'_block'; $title=''; if ($ctype=='gedcom' && WT_USER_GEDCOM_ADMIN || $ctype=='user' && WT_USER_ID) { $title .= "" ."\"".WT_I18N::translate('Configure').'"'; } $title.=$title_tmp; $content = $html; if (get_block_setting($block_id, 'show_timestamp', false)) { $content.='
'.format_timestamp(get_block_setting($block_id, 'timestamp', time())); } if ($template) { if (get_block_setting($block_id, 'block', false)) { require WT_THEME_DIR.'templates/block_small_temp.php'; } else { require WT_THEME_DIR.'templates/block_main_temp.php'; } } else { return $content; } } // Implement class WT_Module_Block public function loadAjax() { return false; } // 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, 'gedcom', safe_POST('gedcom')); set_block_setting($block_id, 'title', $_POST['title']); set_block_setting($block_id, 'html', $_POST['html']); set_block_setting($block_id, 'show_timestamp', safe_POST_bool('show_timestamp')); set_block_setting($block_id, 'timestamp', safe_POST('timestamp')); $languages=array(); foreach (WT_I18N::installed_languages() as $code=>$name) { if (safe_POST_bool('lang_'.$code)) { $languages[]=$code; } } 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'; $templates=array( WT_I18N::translate('Keyword examples')=> '#getAllTagsTable#', WT_I18N::translate('Narrative description')=> /* I18N: do not translate the #keywords# */ WT_I18N::translate('This GEDCOM (family tree) 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#.'), WT_I18N::translate('GEDCOM statistics')=> '
#gedcomTitle#
'.WT_I18N::translate('This GEDCOM was created using %1$s on %2$s.', '#gedcomCreatedSoftware#', '#gedcomDate#').'
'.WT_I18N::translate('Individuals').' #totalIndividuals#
'.WT_I18N::translate('Males').' #totalSexMales#
#totalSexMalesPercentage#
'.WT_I18N::translate('Females').' #totalSexFemales#
#totalSexFemalesPercentage#
'.WT_I18N::translate('Total surnames').' #totalSurnames#
'. WT_I18N::translate('Families').' #totalFamilies#
'.WT_I18N::translate('Sources').' #totalSources#
'.WT_I18N::translate('Media objects').' #totalMedia#
'.WT_I18N::translate('Repositories').' #totalRepositories#
'.WT_I18N::translate('Other records').' #totalOtherRecords#
'.WT_I18N::translate('Total events').' #totalEvents#
'.WT_I18N::translate('Total users').' #totalUsers#

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

'.WT_I18N::translate('Most Common Surnames').'
#commonSurnames#
' ); $title=get_block_setting($block_id, 'title'); $html=get_block_setting($block_id, 'html'); // title echo '', WT_Gedcom_Tag::getLabel('TITL'), ''; // templates echo '', WT_I18N::translate('Templates'), help_link('block_html_template', $this->getName()), '' ; if (array_key_exists('ckeditor', WT_Module::getActiveModules())) { echo WT_JS_START, 'function loadTemplate(html) {', ' var oEditor = CKEDITOR.instances["html"];', ' oEditor.setData(html);', '}', WT_JS_END, ''; } echo ''; foreach ($templates as $title=>$template) { echo ''; } echo ''; // 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 = '';} echo '', WT_I18N::translate('Family tree'), '', ''; } // html echo '', WT_I18N::translate('Content'), help_link('block_html_content', $this->getName()), '

', ''; if (array_key_exists('ckeditor', WT_Module::getActiveModules())) { // use CKeditor module require_once WT_ROOT.WT_MODULES_DIR.'ckeditor/ckeditor.php'; $oCKeditor = new CKEditor(); $oCKeditor->basePath = WT_MODULES_DIR.'ckeditor/'; $oCKeditor->config['width'] = 700; $oCKeditor->config['height'] = 400; $oCKeditor->config['AutoDetectLanguage'] = false ; $oCKeditor->config['DefaultLanguage'] = 'en'; $oCKeditor->editor('html', $html); } else { //use standard textarea echo ''; } echo ''; $show_timestamp=get_block_setting($block_id, 'show_timestamp', false); echo ''; echo WT_I18N::translate('Show the date and time of update'); echo ''; echo edit_field_yes_no('show_timestamp', $show_timestamp); echo ''; echo ''; $languages=get_block_setting($block_id, 'languages'); echo ''; echo WT_I18N::translate('Show this block for which languages?'); echo ''; echo edit_language_checkboxes('lang_', $languages); echo ''; } }