public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'show_other', WT_Filter::postBool('show_other')); set_block_setting($block_id, 'show_unassigned', WT_Filter::postBool('show_unassigned')); set_block_setting($block_id, 'show_future', WT_Filter::postBool('show_future')); set_block_setting($block_id, 'block', WT_Filter::postBool('block')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $show_other = get_block_setting($block_id, 'show_other', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show research tasks that are assigned to other users'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('show_other', $show_other); echo '</td></tr>'; $show_unassigned = get_block_setting($block_id, 'show_unassigned', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show research tasks that are not assigned to any user'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('show_unassigned', $show_unassigned); echo '</td></tr>'; $show_future = get_block_setting($block_id, 'show_future', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show research tasks that have a date in the future'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('show_future', $show_future); echo '</td></tr>'; $block = get_block_setting($block_id, 'block', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'block', WT_Filter::postBool('block')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $block = get_block_setting($block_id, 'block', false); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; }
public function configureBlock($block_id) { global $ctype, $controller; $PEDIGREE_ROOT_ID = get_gedcom_setting(WT_GED_ID, 'PEDIGREE_ROOT_ID'); if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'details', WT_Filter::postBool('details')); set_block_setting($block_id, 'type', WT_Filter::post('type', 'pedigree|descendants|hourglass|treenav', 'pedigree')); set_block_setting($block_id, 'pid', WT_Filter::post('pid', WT_REGEX_XREF)); exit; } $details = get_block_setting($block_id, 'details', false); $type = get_block_setting($block_id, 'type', 'pedigree'); $pid = get_block_setting($block_id, 'pid', WT_USER_ID ? WT_USER_GEDCOM_ID ? WT_USER_GEDCOM_ID : $PEDIGREE_ROOT_ID : $PEDIGREE_ROOT_ID); $controller->addExternalJavascript(WT_STATIC_URL . 'js/autocomplete.js')->addInlineJavascript('autocomplete();'); ?> <tr><td class="descriptionbox wrap width33"><?php echo WT_I18N::translate('Chart type'); ?> </td> <td class="optionbox"> <select name="type"> <option value="pedigree"<?php if ($type == "pedigree") { echo " selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Pedigree'); ?> </option> <option value="descendants"<?php if ($type == "descendants") { echo " selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Descendants'); ?> </option> <option value="hourglass"<?php if ($type == "hourglass") { echo " selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Hourglass chart'); ?> </option> <option value="treenav"<?php if ($type == "treenav") { echo " selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Interactive tree'); ?> </option> </select> </td></tr> <tr> <td class="descriptionbox wrap width33"><?php echo WT_I18N::translate('Show details'); ?> </td> <td class="optionbox"> <select name="details"> <option value="no" <?php if (!$details) { echo " selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('no'); ?> </option> <option value="yes" <?php if ($details) { echo " selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('yes'); ?> </option> </select> </td> </tr> <tr> <td class="descriptionbox wrap width33"><?php echo WT_I18N::translate('Individual'); ?> </td> <td class="optionbox"> <input data-autocomplete-type="INDI" type="text" name="pid" id="pid" value="<?php echo $pid; ?> " size="5"> <?php echo print_findindi_link('pid'); $root = WT_Individual::getInstance($pid); if ($root) { echo ' <span class="list_item">', $root->getFullName(), $root->format_first_major_fact(WT_EVENTS_BIRT, 1), '</span>'; } ?> </td> </tr> <?php require_once WT_ROOT . 'includes/functions/functions_edit.php'; $block = get_block_setting($block_id, 'block', false); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'days', WT_Filter::postInteger('days', 1, 30, 7)); set_block_setting($block_id, 'filter', WT_Filter::postBool('filter')); set_block_setting($block_id, 'onlyBDM', WT_Filter::postBool('onlyBDM')); set_block_setting($block_id, 'infoStyle', WT_Filter::post('infoStyle', 'list|table', 'table')); set_block_setting($block_id, 'sortStyle', WT_Filter::post('sortStyle', 'alpha|anniv', 'alpha')); set_block_setting($block_id, 'block', WT_Filter::postBool('block')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $days = get_block_setting($block_id, 'days', 7); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Number of days to show'); echo '</td><td class="optionbox">'; echo '<input type="text" name="days" size="2" value="', $days, '">'; echo ' <em>', WT_I18N::plural('maximum %d day', 'maximum %d days', 30, 30), '</em>'; echo '</td></tr>'; $filter = get_block_setting($block_id, 'filter', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show only events of living individuals?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('filter', $filter); echo '</td></tr>'; $onlyBDM = get_block_setting($block_id, 'onlyBDM', false); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show only births, deaths, and marriages?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('onlyBDM', $onlyBDM); echo '</td></tr>'; $infoStyle = get_block_setting($block_id, 'infoStyle', 'table'); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Presentation style'); echo '</td><td class="optionbox">'; echo select_edit_control('infoStyle', array('list' => WT_I18N::translate('list'), 'table' => WT_I18N::translate('table')), null, $infoStyle, ''); echo '</td></tr>'; $sortStyle = get_block_setting($block_id, 'sortStyle', 'alpha'); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Sort order'); echo '</td><td class="optionbox">'; echo select_edit_control('sortStyle', array('alpha' => WT_I18N::translate('sort by name'), 'anniv' => WT_I18N::translate('sort by date')), null, $sortStyle, ''); echo '</td></tr>'; $block = get_block_setting($block_id, 'block', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'days', WT_Filter::postInteger('days', 1, self::MAX_DAYS, self::DEFAULT_DAYS)); set_block_setting($block_id, 'infoStyle', WT_Filter::post('infoStyle', 'list|table', 'table')); set_block_setting($block_id, 'sortStyle', WT_Filter::post('sortStyle', 'name|date_asc|date_desc', 'date_desc')); set_block_setting($block_id, 'hide_empty', WT_Filter::postBool('hide_empty')); set_block_setting($block_id, 'block', WT_Filter::postBool('block')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $days = get_block_setting($block_id, 'days', self::DEFAULT_DAYS); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Number of days to show'); echo '</td><td class="optionbox">'; echo '<input type="text" name="days" size="2" value="', $days, '">'; echo ' <em>', WT_I18N::plural('maximum %d day', 'maximum %d days', self::MAX_DAYS, self::MAX_DAYS), '</em>'; echo '</td></tr>'; $infoStyle = get_block_setting($block_id, 'infoStyle', 'table'); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Presentation style'); echo '</td><td class="optionbox">'; echo select_edit_control('infoStyle', array('list' => WT_I18N::translate('list'), 'table' => WT_I18N::translate('table')), null, $infoStyle, ''); echo '</td></tr>'; $sortStyle = get_block_setting($block_id, 'sortStyle', 'date'); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Sort order'); echo '</td><td class="optionbox">'; echo select_edit_control('sortStyle', array('name' => WT_I18N::translate('sort by name'), 'date_asc' => WT_I18N::translate('sort by date, oldest first'), 'date_desc' => WT_I18N::translate('sort by date, newest first')), null, $sortStyle, ''); echo '</td></tr>'; $block = get_block_setting($block_id, 'block', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; $hide_empty = get_block_setting($block_id, 'hide_empty', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Should this block be hidden when it is empty?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('hide_empty', $hide_empty); echo '</td></tr>'; echo '<tr><td colspan="2" class="optionbox wrap">'; echo '<span class="error">', WT_I18N::translate('If you hide an empty block, you will not be able to change its configuration until it becomes visible by no longer being empty.'), '</span>'; echo '</td></tr>'; }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'filter', WT_Filter::post('filter', 'indi|event|all', 'all')); set_block_setting($block_id, 'controls', WT_Filter::postBool('controls')); set_block_setting($block_id, 'start', WT_Filter::postBool('start')); set_block_setting($block_id, 'filter_avi', WT_Filter::postBool('filter_avi')); set_block_setting($block_id, 'filter_bmp', WT_Filter::postBool('filter_bmp')); set_block_setting($block_id, 'filter_gif', WT_Filter::postBool('filter_gif')); set_block_setting($block_id, 'filter_jpeg', WT_Filter::postBool('filter_jpeg')); set_block_setting($block_id, 'filter_mp3', WT_Filter::postBool('filter_mp3')); set_block_setting($block_id, 'filter_ole', WT_Filter::postBool('filter_ole')); set_block_setting($block_id, 'filter_pcx', WT_Filter::postBool('filter_pcx')); set_block_setting($block_id, 'filter_pdf', WT_Filter::postBool('filter_pdf')); set_block_setting($block_id, 'filter_png', WT_Filter::postBool('filter_png')); set_block_setting($block_id, 'filter_tiff', WT_Filter::postBool('filter_tiff')); set_block_setting($block_id, 'filter_wav', WT_Filter::postBool('filter_wav')); set_block_setting($block_id, 'filter_audio', WT_Filter::postBool('filter_audio')); set_block_setting($block_id, 'filter_book', WT_Filter::postBool('filter_book')); set_block_setting($block_id, 'filter_card', WT_Filter::postBool('filter_card')); set_block_setting($block_id, 'filter_certificate', WT_Filter::postBool('filter_certificate')); set_block_setting($block_id, 'filter_coat', WT_Filter::postBool('filter_coat')); set_block_setting($block_id, 'filter_document', WT_Filter::postBool('filter_document')); set_block_setting($block_id, 'filter_electronic', WT_Filter::postBool('filter_electronic')); set_block_setting($block_id, 'filter_fiche', WT_Filter::postBool('filter_fiche')); set_block_setting($block_id, 'filter_film', WT_Filter::postBool('filter_film')); set_block_setting($block_id, 'filter_magazine', WT_Filter::postBool('filter_magazine')); set_block_setting($block_id, 'filter_manuscript', WT_Filter::postBool('filter_manuscript')); set_block_setting($block_id, 'filter_map', WT_Filter::postBool('filter_map')); set_block_setting($block_id, 'filter_newspaper', WT_Filter::postBool('filter_newspaper')); set_block_setting($block_id, 'filter_other', WT_Filter::postBool('filter_other')); set_block_setting($block_id, 'filter_painting', WT_Filter::postBool('filter_painting')); set_block_setting($block_id, 'filter_photo', WT_Filter::postBool('filter_photo')); set_block_setting($block_id, 'filter_tombstone', WT_Filter::postBool('filter_tombstone')); set_block_setting($block_id, 'filter_video', WT_Filter::postBool('filter_video')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $filter = get_block_setting($block_id, 'filter', 'all'); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show only individuals, events, or all?'); echo '</td><td class="optionbox">'; echo select_edit_control('filter', array('indi' => WT_I18N::translate('Individuals'), 'event' => WT_I18N::translate('Facts and events'), 'all' => WT_I18N::translate('All')), null, $filter, ''); echo '</td></tr>'; $filters = array('avi' => get_block_setting($block_id, 'filter_avi', false), 'bmp' => get_block_setting($block_id, 'filter_bmp', true), 'gif' => get_block_setting($block_id, 'filter_gif', true), 'jpeg' => get_block_setting($block_id, 'filter_jpeg', true), 'mp3' => get_block_setting($block_id, 'filter_mp3', false), 'ole' => get_block_setting($block_id, 'filter_ole', true), 'pcx' => get_block_setting($block_id, 'filter_pcx', true), 'pdf' => get_block_setting($block_id, 'filter_pdf', false), 'png' => get_block_setting($block_id, 'filter_png', true), 'tiff' => get_block_setting($block_id, 'filter_tiff', true), 'wav' => get_block_setting($block_id, 'filter_wav', false), 'audio' => get_block_setting($block_id, 'filter_audio', false), 'book' => get_block_setting($block_id, 'filter_book', true), 'card' => get_block_setting($block_id, 'filter_card', true), 'certificate' => get_block_setting($block_id, 'filter_certificate', true), 'coat' => get_block_setting($block_id, 'filter_coat', true), 'document' => get_block_setting($block_id, 'filter_document', true), 'electronic' => get_block_setting($block_id, 'filter_electronic', true), 'fiche' => get_block_setting($block_id, 'filter_fiche', true), 'film' => get_block_setting($block_id, 'filter_film', true), 'magazine' => get_block_setting($block_id, 'filter_magazine', true), 'manuscript' => get_block_setting($block_id, 'filter_manuscript', true), 'map' => get_block_setting($block_id, 'filter_map', true), 'newspaper' => get_block_setting($block_id, 'filter_newspaper', true), 'other' => get_block_setting($block_id, 'filter_other', true), 'painting' => get_block_setting($block_id, 'filter_painting', true), 'photo' => get_block_setting($block_id, 'filter_photo', true), 'tombstone' => get_block_setting($block_id, 'filter_tombstone', true), 'video' => get_block_setting($block_id, 'filter_video', false)); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Filter'); ?> </td> <td class="optionbox"> <center><b><?php echo WT_Gedcom_Tag::getLabel('FORM'); ?> </b></center> <table class="width100"> <tr> <td class="width33"><input type="checkbox" value="yes" name="filter_avi" <?php if ($filters['avi']) { echo " checked=\"checked\""; } ?> > avi </td> <td class="width33"><input type="checkbox" value="yes" name="filter_bmp" <?php if ($filters['bmp']) { echo " checked=\"checked\""; } ?> > bmp </td> <td class="width33"><input type="checkbox" value="yes" name="filter_gif" <?php if ($filters['gif']) { echo " checked=\"checked\""; } ?> > gif </td> </tr> <tr> <td class="width33"><input type="checkbox" value="yes" name="filter_jpeg" <?php if ($filters['jpeg']) { echo " checked=\"checked\""; } ?> > jpeg </td> <td class="width33"><input type="checkbox" value="yes" name="filter_mp3" <?php if ($filters['mp3']) { echo " checked=\"checked\""; } ?> > mp3 </td> <td class="width33"><input type="checkbox" value="yes" name="filter_ole" <?php if ($filters['ole']) { echo " checked=\"checked\""; } ?> > ole </td> </tr> <tr> <td class="width33"><input type="checkbox" value="yes" name="filter_pcx" <?php if ($filters['pcx']) { echo " checked=\"checked\""; } ?> > pcx </td> <td class="width33"><input type="checkbox" value="yes" name="filter_pdf" <?php if ($filters['pdf']) { echo " checked=\"checked\""; } ?> > pdf </td> <td class="width33"><input type="checkbox" value="yes" name="filter_png" <?php if ($filters['png']) { echo " checked=\"checked\""; } ?> > png </td> </tr> <tr> <td class="width33"><input type="checkbox" value="yes" name="filter_tiff" <?php if ($filters['tiff']) { echo " checked=\"checked\""; } ?> > tiff </td> <td class="width33"><input type="checkbox" value="yes" name="filter_wav" <?php if ($filters['wav']) { echo " checked=\"checked\""; } ?> > wav </td> <td class="width33"> </td> <td class="width33"> </td> </tr> </table> <br> <center><b><?php echo WT_Gedcom_Tag::getLabel('TYPE'); ?> </b></center> <table class="width100"> <tr> <?php //-- Build the list of checkboxes $i = 0; foreach (WT_Gedcom_Tag::getFileFormTypes() as $typeName => $typeValue) { $i++; if ($i > 3) { $i = 1; echo "</tr><tr>"; } echo "<td class=\"width33\"><input type=\"checkbox\" value=\"yes\" name=\"filter_" . $typeName . "\""; if ($filters[$typeName]) { echo " checked=\"checked\""; } echo "> " . $typeValue . " </td>"; } ?> </tr> </table> </td> </tr> <?php $controls = get_block_setting($block_id, 'controls', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show slide show controls?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('controls', $controls); echo '</td></tr>'; $start = get_block_setting($block_id, 'start', false); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Start slide show on page load?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('start', $start); echo '</td></tr>'; }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'days', WT_Filter::postInteger('num', 1, 180, 7)); set_block_setting($block_id, 'sendmail', WT_Filter::postBool('sendmail')); set_block_setting($block_id, 'block', WT_Filter::postBool('block')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $sendmail = get_block_setting($block_id, 'sendmail', true); $days = get_block_setting($block_id, 'days', 7); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Send out reminder emails?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('sendmail', $sendmail); echo '<br>'; echo WT_I18N::translate('Reminder email frequency (days)') . " <input type='text' name='days' value='" . $days . "' size='2'>"; echo '</td></tr>'; $block = get_block_setting($block_id, 'block', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'gedcom', WT_Filter::post('gedcom')); set_block_setting($block_id, 'title', WT_Filter::post('title')); set_block_setting($block_id, 'html', WT_Filter::post('html')); set_block_setting($block_id, 'show_timestamp', WT_Filter::postBool('show_timestamp')); set_block_setting($block_id, 'timestamp', WT_Filter::post('timestamp')); $languages = array(); foreach (WT_I18N::installed_languages() as $code => $name) { if (WT_Filter::postBool('lang_' . $code)) { $languages[] = $code; } } set_block_setting($block_id, 'languages', implode(',', $languages)); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $templates = array(WT_I18N::translate('Keyword examples') => '#getAllTagsTable#', WT_I18N::translate('Narrative description') => 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#.<br><br>If you have any comments or feedback please contact #contactWebmaster#.'), WT_I18N::translate('Statistics') => '<div class="gedcom_stats"> <span style="font-weight: bold"><a href="index.php?command=gedcom">#gedcomTitle#</a></span><br> ' . WT_I18N::translate('This family tree was last updated on %s.', '#gedcomUpdated#') . ' <table id="keywords"> <tr> <td valign="top" class="width20"> <table cellspacing="1" cellpadding="0"> <tr> <td class="facts_label">' . WT_I18N::translate('Individuals') . '</td> <td class="facts_value" align="right"><a href="indilist.php?surname_sublist=no">#totalIndividuals#</a></td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Males') . '</td> <td class="facts_value" align="right">#totalSexMales#<br>#totalSexMalesPercentage#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Females') . '</td> <td class="facts_value" align="right">#totalSexFemales#<br>#totalSexFemalesPercentage#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Total surnames') . '</td> <td class="facts_value" align="right"><a href="indilist.php?show_all=yes&surname_sublist=yes&ged=' . WT_GEDURL . '">#totalSurnames#</a></td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Families') . '</td> <td class="facts_value" align="right"><a href="famlist.php?ged=' . WT_GEDURL . '">#totalFamilies#</a></td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Sources') . '</td> <td class="facts_value" align="right"><a href="sourcelist.php?ged=' . WT_GEDURL . '">#totalSources#</a></td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Media objects') . '</td> <td class="facts_value" align="right"><a href="medialist.php?ged=' . WT_GEDURL . '">#totalMedia#</a></td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Repositories') . '</td> <td class="facts_value" align="right"><a href="repolist.php?ged=' . WT_GEDURL . '">#totalRepositories#</a></td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Total events') . '</td> <td class="facts_value" align="right">#totalEvents#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Total users') . '</td> <td class="facts_value" align="right">#totalUsers#</td> </tr> </table> </td> <td><br></td> <td valign="top"> <table cellspacing="1" cellpadding="0" border="0"> <tr> <td class="facts_label">' . WT_I18N::translate('Earliest birth year') . '</td> <td class="facts_value" align="right">#firstBirthYear#</td> <td class="facts_value">#firstBirth#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Latest birth year') . '</td> <td class="facts_value" align="right">#lastBirthYear#</td> <td class="facts_value">#lastBirth#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Earliest death year') . '</td> <td class="facts_value" align="right">#firstDeathYear#</td> <td class="facts_value">#firstDeath#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Latest death year') . '</td> <td class="facts_value" align="right">#lastDeathYear#</td> <td class="facts_value">#lastDeath#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Individual who lived the longest') . '</td> <td class="facts_value" align="right">#longestLifeAge#</td> <td class="facts_value">#longestLife#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Average age at death') . '</td> <td class="facts_value" align="right">#averageLifespan#</td> <td class="facts_value"></td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Family with the most children') . '</td> <td class="facts_value" align="right">#largestFamilySize#</td> <td class="facts_value">#largestFamily#</td> </tr> <tr> <td class="facts_label">' . WT_I18N::translate('Average number of children per family') . '</td> <td class="facts_value" align="right">#averageChildren#</td> <td class="facts_value"></td> </tr> </table> </td> </tr> </table><br> <span style="font-weight: bold">' . WT_I18N::translate('Most common surnames') . '</span><br> #commonSurnames# </div>'); $title = get_block_setting($block_id, 'title'); $html = get_block_setting($block_id, 'html'); // title echo '<tr><td class="descriptionbox wrap">', WT_Gedcom_Tag::getLabel('TITL'), '</td><td class="optionbox"><input type="text" name="title" size="30" value="', WT_Filter::escapeHtml($title), '"></td></tr>'; // templates echo '<tr><td class="descriptionbox wrap">', WT_I18N::translate('Templates'), help_link('block_html_template', $this->getName()), '</td><td class="optionbox">'; // The CK editor needs lots of help to load/save data :-( if (array_key_exists('ckeditor', WT_Module::getActiveModules())) { $ckeditor_onchange = 'CKEDITOR.instances.html.setData(document.block.html.value);'; } else { $ckeditor_onchange = ''; } echo '<select name="template" onchange="document.block.html.value=document.block.template.options[document.block.template.selectedIndex].value;', $ckeditor_onchange, '">'; echo '<option value="', WT_Filter::escapeHtml($html), '">', WT_I18N::translate('Custom'), '</option>'; foreach ($templates as $title => $template) { echo '<option value="', WT_Filter::escapeHtml($template), '">', $title, '</option>'; } echo '</select></td></tr>'; // gedcom $gedcom = get_block_setting($block_id, 'gedcom'); if (count(WT_Tree::getAll()) > 1) { if ($gedcom == '__current__') { $sel_current = ' selected="selected"'; } else { $sel_current = ''; } if ($gedcom == '__default__') { $sel_default = ' selected="selected"'; } else { $sel_default = ''; } echo '<tr><td class="descriptionbox wrap">', WT_I18N::translate('Family tree'), '</td><td class="optionbox">', '<select name="gedcom">', '<option value="__current__"', $sel_current, '>', WT_I18N::translate('Current'), '</option>', '<option value="__default__"', $sel_default, '>', WT_I18N::translate('Default'), '</option>'; foreach (WT_Tree::getAll() as $tree) { if ($tree->tree_name == $gedcom) { $sel = ' selected="selected"'; } else { $sel = ''; } echo '<option value="', $tree->tree_name, '"', $sel, ' dir="auto">', $tree->tree_title_html, '</option>'; } echo '</select></td></tr>'; } // html echo '<tr><td colspan="2" class="descriptionbox">', WT_I18N::translate('Content'), help_link('block_html_content', $this->getName()), '</td></tr><tr>', '<td colspan="2" class="optionbox">'; echo '<textarea name="html" class="html-edit" rows="10" style="width:98%;">', WT_Filter::escapeHtml($html), '</textarea>'; echo '</td></tr>'; $show_timestamp = get_block_setting($block_id, 'show_timestamp', false); echo '<tr><td class="descriptionbox wrap">'; echo WT_I18N::translate('Show the date and time of update'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('show_timestamp', $show_timestamp); echo '<input type="hidden" name="timestamp" value="', WT_TIMESTAMP, '">'; echo '</td></tr>'; $languages = get_block_setting($block_id, 'languages'); echo '<tr><td class="descriptionbox wrap">'; echo WT_I18N::translate('Show this block for which languages?'); echo '</td><td class="optionbox">'; echo edit_language_checkboxes('lang_', $languages); echo '</td></tr>'; }
private function config() { require WT_ROOT . 'includes/functions/functions_edit.php'; $action = WT_Filter::post('action'); $controller = new WT_Controller_Page(); $controller->restrictAccess(Auth::isAdmin())->setPageTitle(WT_I18N::translate('Google Maps™'))->pageHeader()->addInlineJavascript('jQuery("#tabs").tabs();'); if ($action == 'update') { $this->setSetting('GM_MAP_TYPE', WT_Filter::post('NEW_GM_MAP_TYPE')); $this->setSetting('GM_USE_STREETVIEW', WT_Filter::post('NEW_GM_USE_STREETVIEW')); $this->setSetting('GM_MIN_ZOOM', WT_Filter::post('NEW_GM_MIN_ZOOM')); $this->setSetting('GM_MAX_ZOOM', WT_Filter::post('NEW_GM_MAX_ZOOM')); $this->setSetting('GM_XSIZE', WT_Filter::post('NEW_GM_XSIZE')); $this->setSetting('GM_YSIZE', WT_Filter::post('NEW_GM_YSIZE')); $this->setSetting('GM_PRECISION_0', WT_Filter::post('NEW_GM_PRECISION_0')); $this->setSetting('GM_PRECISION_1', WT_Filter::post('NEW_GM_PRECISION_1')); $this->setSetting('GM_PRECISION_2', WT_Filter::post('NEW_GM_PRECISION_2')); $this->setSetting('GM_PRECISION_3', WT_Filter::post('NEW_GM_PRECISION_3')); $this->setSetting('GM_PRECISION_4', WT_Filter::post('NEW_GM_PRECISION_4')); $this->setSetting('GM_PRECISION_5', WT_Filter::post('NEW_GM_PRECISION_5')); $this->setSetting('GM_COORD', WT_Filter::post('NEW_GM_COORD')); $this->setSetting('GM_PLACE_HIERARCHY', WT_Filter::post('NEW_GM_PLACE_HIERARCHY')); $this->setSetting('GM_PH_XSIZE', WT_Filter::post('NEW_GM_PH_XSIZE')); $this->setSetting('GM_PH_YSIZE', WT_Filter::post('NEW_GM_PH_YSIZE')); $this->setSetting('GM_PH_MARKER', WT_Filter::post('NEW_GM_PH_MARKER')); $this->setSetting('GM_DISP_SHORT_PLACE', WT_Filter::post('NEW_GM_DISP_SHORT_PLACE')); for ($i = 1; $i <= 9; $i++) { $this->setSetting('GM_PREFIX_' . $i, WT_Filter::post('NEW_GM_PREFIX_' . $i)); $this->setSetting('GM_POSTFIX_' . $i, WT_Filter::post('NEW_GM_POSTFIX_' . $i)); } Log::addConfigurationLog('Googlemap config updated'); } ?> <table id="gm_config"> <tr> <th> <a class="current" href="module.php?mod=googlemap&mod_action=admin_config"> <?php echo WT_I18N::translate('Google Maps™ preferences'); ?> </a> </th> <th> <a href="module.php?mod=googlemap&mod_action=admin_places"> <?php echo WT_I18N::translate('Geographic data'); ?> </a> </th> <th> <a href="module.php?mod=googlemap&mod_action=admin_placecheck"> <?php echo WT_I18N::translate('Place check'); ?> </a> </th> </tr> </table> <form method="post" name="configform" action="module.php?mod=googlemap&mod_action=admin_config"> <input type="hidden" name="action" value="update"> <div id="tabs"> <ul> <li><a href="#gm_basic"><span><?php echo WT_I18N::translate('Basic'); ?> </span></a></li> <li><a href="#gm_advanced"><span><?php echo WT_I18N::translate('Advanced'); ?> </span></a></li> <li><a href="#gm_ph"><span><?php echo WT_I18N::translate('Place hierarchy'); ?> </span></a></li> </ul> <div id="gm_basic"> <table class="gm_edit_config"> <tr> <th><?php echo WT_I18N::translate('Default map type'); ?> </th> <td> <select name="NEW_GM_MAP_TYPE"> <option value="ROADMAP" <?php if ($this->getSetting('GM_MAP_TYPE') == 'ROADMAP') { echo "selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Map'); ?> </option> <option value="SATELLITE" <?php if ($this->getSetting('GM_MAP_TYPE') == 'SATELLITE') { echo "selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Satellite'); ?> </option> <option value="HYBRID" <?php if ($this->getSetting('GM_MAP_TYPE') == 'HYBRID') { echo "selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Hybrid'); ?> </option> <option value="TERRAIN" <?php if ($this->getSetting('GM_MAP_TYPE') == 'TERRAIN') { echo "selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Terrain'); ?> </option> </select> </td> </tr> <tr> <th><?php echo WT_I18N::translate('Google Street View™'); ?> </th> <td><?php echo radio_buttons('NEW_GM_USE_STREETVIEW', array(false => WT_I18N::translate('hide'), true => WT_I18N::translate('show')), $this->getSetting('GM_USE_STREETVIEW')); ?> </td> </tr> <tr> <th><?php echo WT_I18N::translate('Size of map (in pixels)'); ?> </th> <td> <?php echo WT_I18N::translate('Width'); ?> <input type="text" name="NEW_GM_XSIZE" value="<?php echo $this->getSetting('GM_XSIZE'); ?> " size="10"> <?php echo WT_I18N::translate('Height'); ?> <input type="text" name="NEW_GM_YSIZE" value="<?php echo $this->getSetting('GM_YSIZE'); ?> " size="10"> </td> </tr> <tr> <th><?php echo WT_I18N::translate('Zoom level of map'), help_link('GM_MAP_ZOOM', 'googlemap'); ?> </th> <td> <?php echo WT_I18N::translate('minimum'); ?> : <select name="NEW_GM_MIN_ZOOM"> <?php for ($j = 1; $j < 15; $j++) { ?> <option value="<?php echo $j, "\""; if ($this->getSetting('GM_MIN_ZOOM') == $j) { echo " selected=\"selected\""; } echo ">", $j; ?> </option> <?php } ?> </select> <?php echo WT_I18N::translate('maximum'); ?> : <select name="NEW_GM_MAX_ZOOM"> <?php for ($j = 1; $j < 21; $j++) { ?> <option value="<?php echo $j, "\""; if ($this->getSetting('GM_MAX_ZOOM') == $j) { echo " selected=\"selected\""; } echo ">", $j; ?> </option> <?php } ?> </select> </td> </tr> </table> </div> <div id="gm_advanced"> <table class="gm_edit_config"> <tr> <th colspan="2"><?php echo WT_I18N::translate('Precision of the latitude and longitude'), help_link('GM_PRECISION', 'googlemap'); ?> </th> <td> <table> <tr> <td><?php echo WT_I18N::translate('Country'); ?> </td> <td><select name="NEW_GM_PRECISION_0"> <?php for ($j = 0; $j < 10; $j++) { ?> <option value="<?php echo $j; ?> "<?php if ($this->getSetting('GM_PRECISION_0') == $j) { echo " selected=\"selected\""; } echo ">", $j; ?> </option> <?php } ?> </select> <?php echo WT_I18N::translate('digits'); ?> </td> </tr> <tr> <td><?php echo WT_I18N::translate('State'); ?> </td> <td><select name="NEW_GM_PRECISION_1"> <?php for ($j = 0; $j < 10; $j++) { ?> <option value="<?php echo $j; ?> "<?php if ($this->getSetting('GM_PRECISION_1') == $j) { echo " selected=\"selected\""; } echo ">", $j; ?> </option> <?php } ?> </select> <?php echo WT_I18N::translate('digits'); ?> </td> </tr> <tr> <td><?php echo WT_I18N::translate('City'); ?> </td> <td><select name="NEW_GM_PRECISION_2"> <?php for ($j = 0; $j < 10; $j++) { ?> <option value="<?php echo $j; ?> "<?php if ($this->getSetting('GM_PRECISION_2') == $j) { echo " selected=\"selected\""; } echo ">", $j; ?> </option> <?php } ?> </select> <?php echo WT_I18N::translate('digits'); ?> </td> </tr> <tr><td><?php echo WT_I18N::translate('Neighborhood'); ?> </td> <td><select name="NEW_GM_PRECISION_3"> <?php for ($j = 0; $j < 10; $j++) { ?> <option value="<?php echo $j; ?> "<?php if ($this->getSetting('GM_PRECISION_3') == $j) { echo " selected=\"selected\""; } echo ">", $j; ?> </option> <?php } ?> </select> <?php echo WT_I18N::translate('digits'); ?> </td> </tr> <tr><td><?php echo WT_I18N::translate('House'); ?> </td> <td><select name="NEW_GM_PRECISION_4"> <?php for ($j = 0; $j < 10; $j++) { ?> <option value="<?php echo $j; ?> "<?php if ($this->getSetting('GM_PRECISION_4') == $j) { echo " selected=\"selected\""; } echo ">", $j; ?> </option> <?php } ?> </select> <?php echo WT_I18N::translate('digits'); ?> </td> </tr> <tr><td><?php echo WT_I18N::translate('Max'); ?> </td> <td><select name="NEW_GM_PRECISION_5"> <?php for ($j = 0; $j < 10; $j++) { ?> <option value="<?php echo $j; ?> "<?php if ($this->getSetting('GM_PRECISION_5') == $j) { echo " selected=\"selected\""; } echo ">", $j; ?> </option> <?php } ?> </select> <?php echo WT_I18N::translate('digits'); ?> </td> </tr> </table> </td> <td> </td> </tr> <th class="gm_prefix" colspan="3"><?php echo WT_I18N::translate('Optional prefixes and suffixes'), help_link('GM_NAME_PREFIX_SUFFIX', 'googlemap'); ?> </th> </tr> <tr id="gm_level_titles"> <th> </th> <th><?php echo WT_I18N::translate('Prefixes'); ?> </th> <th><?php echo WT_I18N::translate('Suffixes'); ?> </th> <?php for ($level = 1; $level < 10; $level++) { ?> <tr class="gm_levels"> <th> <?php if ($level == 1) { echo WT_I18N::translate('Country'); } else { echo WT_I18N::translate('Level'), " ", $level; } ?> </th> <td><input type="text" size="30" name="NEW_GM_PREFIX_<?php echo $level; ?> " value="<?php echo $this->getSetting('GM_PREFIX_' . $level); ?> "></td> <td><input type="text" size="30" name="NEW_GM_POSTFIX_<?php echo $level; ?> " value="<?php echo $this->getSetting('GM_POSTFIX_' . $level); ?> "></td> </tr> <?php } ?> </table> </div> <div id="gm_ph"> <table class="gm_edit_config"> <tr> <th><?php echo WT_I18N::translate('Use Google Maps™ for the place hierarchy'); ?> </th> <td><?php echo edit_field_yes_no('NEW_GM_PLACE_HIERARCHY', $this->getSetting('GM_PLACE_HIERARCHY')); ?> </td> </tr> <tr> <th><?php echo WT_I18N::translate('Size of map (in pixels)'); ?> </th> <td> <?php echo WT_I18N::translate('Width'); ?> <input type="text" name="NEW_GM_PH_XSIZE" value="<?php echo $this->getSetting('GM_PH_XSIZE'); ?> " size="10"> <?php echo WT_I18N::translate('Height'); ?> <input type="text" name="NEW_GM_PH_YSIZE" value="<?php echo $this->getSetting('GM_PH_YSIZE'); ?> " size="10"> </td> </tr> <tr> <th><?php echo WT_I18N::translate('Type of place markers in Place Hierarchy'); ?> </th> <td> <select name="NEW_GM_PH_MARKER"> <option value="G_DEFAULT_ICON" <?php if ($this->getSetting('GM_PH_MARKER') == "G_DEFAULT_ICON") { echo "selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Standard'); ?> </option> <option value="G_FLAG" <?php if ($this->getSetting('GM_PH_MARKER') == "G_FLAG") { echo "selected=\"selected\""; } ?> ><?php echo WT_I18N::translate('Flag'); ?> </option> </select> </td> </tr> <tr> <th><?php echo WT_I18N::translate('Display short placenames'), help_link('GM_DISP_SHORT_PLACE', 'googlemap'); ?> </th> <td><?php echo edit_field_yes_no('NEW_GM_DISP_SHORT_PLACE', $this->getSetting('GM_DISP_SHORT_PLACE')); ?> </td> </tr> <tr> <th><?php echo WT_I18N::translate('Display map coordinates'), help_link('GM_COORD', 'googlemap'); ?> </th> <td><?php echo edit_field_yes_no('NEW_GM_COORD', $this->getSetting('GM_COORD')); ?> </td> </tr> </table> </div> </div> <p> <input type="submit" value="<?php echo WT_I18N::translate('save'); ?> "> </p> </form> <?php }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'num', WT_Filter::postInteger('num', 1, 10000, 10)); set_block_setting($block_id, 'infoStyle', WT_Filter::post('infoStyle', 'list|array|table|tagcloud', 'table')); set_block_setting($block_id, 'block', WT_Filter::postBool('block')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $num = get_block_setting($block_id, 'num', 10); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Number of items to show'); echo '</td><td class="optionbox">'; echo '<input type="text" name="num" size="2" value="', $num, '">'; echo '</td></tr>'; $infoStyle = get_block_setting($block_id, 'infoStyle', 'table'); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Presentation style'); echo '</td><td class="optionbox">'; echo select_edit_control('infoStyle', array('list' => WT_I18N::translate('bullet list'), 'array' => WT_I18N::translate('compact list'), 'table' => WT_I18N::translate('table'), 'tagcloud' => WT_I18N::translate('tag cloud')), null, $infoStyle, ''); echo '</td></tr>'; $block = get_block_setting($block_id, 'block', false); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'show_last_update', WT_Filter::postBool('show_last_update')); set_block_setting($block_id, 'show_common_surnames', WT_Filter::postBool('show_common_surnames')); set_block_setting($block_id, 'stat_indi', WT_Filter::postBool('stat_indi')); set_block_setting($block_id, 'stat_fam', WT_Filter::postBool('stat_fam')); set_block_setting($block_id, 'stat_sour', WT_Filter::postBool('stat_sour')); set_block_setting($block_id, 'stat_other', WT_Filter::postBool('stat_other')); set_block_setting($block_id, 'stat_media', WT_Filter::postBool('stat_media')); set_block_setting($block_id, 'stat_repo', WT_Filter::postBool('stat_repo')); set_block_setting($block_id, 'stat_surname', WT_Filter::postBool('stat_surname')); set_block_setting($block_id, 'stat_events', WT_Filter::postBool('stat_events')); set_block_setting($block_id, 'stat_users', WT_Filter::postBool('stat_users')); set_block_setting($block_id, 'stat_first_birth', WT_Filter::postBool('stat_first_birth')); set_block_setting($block_id, 'stat_last_birth', WT_Filter::postBool('stat_last_birth')); set_block_setting($block_id, 'stat_first_death', WT_Filter::postBool('stat_first_death')); set_block_setting($block_id, 'stat_last_death', WT_Filter::postBool('stat_last_death')); set_block_setting($block_id, 'stat_long_life', WT_Filter::postBool('stat_long_life')); set_block_setting($block_id, 'stat_avg_life', WT_Filter::postBool('stat_avg_life')); set_block_setting($block_id, 'stat_most_chil', WT_Filter::postBool('stat_most_chil')); set_block_setting($block_id, 'stat_avg_chil', WT_Filter::postBool('stat_avg_chil')); set_block_setting($block_id, 'stat_link', WT_Filter::postBool('stat_link')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $show_last_update = get_block_setting($block_id, 'show_last_update', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show date of last update?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('show_last_update', $show_last_update); echo '</td></tr>'; $show_common_surnames = get_block_setting($block_id, 'show_common_surnames', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show common surnames?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('show_common_surnames', $show_common_surnames); echo '</td></tr>'; $stat_indi = get_block_setting($block_id, 'stat_indi', true); $stat_fam = get_block_setting($block_id, 'stat_fam', true); $stat_sour = get_block_setting($block_id, 'stat_sour', true); $stat_other = get_block_setting($block_id, 'stat_other', true); $stat_media = get_block_setting($block_id, 'stat_media', true); $stat_repo = get_block_setting($block_id, 'stat_repo', true); $stat_surname = get_block_setting($block_id, 'stat_surname', true); $stat_events = get_block_setting($block_id, 'stat_events', true); $stat_users = get_block_setting($block_id, 'stat_users', true); $stat_first_birth = get_block_setting($block_id, 'stat_first_birth', true); $stat_last_birth = get_block_setting($block_id, 'stat_last_birth', true); $stat_first_death = get_block_setting($block_id, 'stat_first_death', true); $stat_last_death = get_block_setting($block_id, 'stat_last_death', true); $stat_long_life = get_block_setting($block_id, 'stat_long_life', true); $stat_avg_life = get_block_setting($block_id, 'stat_avg_life', true); $stat_most_chil = get_block_setting($block_id, 'stat_most_chil', true); $stat_avg_chil = get_block_setting($block_id, 'stat_avg_chil', true); $stat_link = get_block_setting($block_id, 'stat_link', true); ?> <tr> <td class="descriptionbox wrap width33"><?php echo WT_I18N::translate('Select the stats to show in this block'); ?> </td> <td class="optionbox"> <table> <tr> <td><input type="checkbox" value="yes" name="stat_indi" <?php if ($stat_indi) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Individuals'); ?> </td> <td><input type="checkbox" value="yes" name="stat_first_birth" <?php if ($stat_first_birth) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Earliest birth year'); ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_surname" <?php if ($stat_surname) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Total surnames'); ?> </td> <td><input type="checkbox" value="yes" name="stat_last_birth" <?php if ($stat_last_birth) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Latest birth year'); ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_fam" <?php if ($stat_fam) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Families'); ?> </td> <td><input type="checkbox" value="yes" name="stat_first_death" <?php if ($stat_first_death) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Earliest death year'); ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_sour" <?php if ($stat_sour) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Sources'); ?> </td> <td><input type="checkbox" value="yes" name="stat_last_death" <?php if ($stat_last_death) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Latest death year'); ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_media" <?php if ($stat_media) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Media objects'); ?> </td> <td><input type="checkbox" value="yes" name="stat_long_life" <?php if ($stat_long_life) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Individual who lived the longest'); ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_repo" <?php if ($stat_repo) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Repositories'); ?> </td> <td><input type="checkbox" value="yes" name="stat_avg_life" <?php if ($stat_avg_life) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Average age at death'); ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_other" <?php if ($stat_other) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Other records'); ?> </td> <td><input type="checkbox" value="yes" name="stat_most_chil" <?php if ($stat_most_chil) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Family with the most children'); ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_events" <?php if ($stat_events) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Total events'); ?> </td> <td><input type="checkbox" value="yes" name="stat_avg_chil" <?php if ($stat_avg_chil) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Average number of children per family'); ?> </td> </tr> <tr> <td><input type="checkbox" value="yes" name="stat_users" <?php if ($stat_users) { echo ' checked="checked"'; } ?> > <?php echo WT_I18N::translate('Total users'); ?> </td> <td> </td> </tr> </table> </td> </tr> <?php $stat_link = get_block_setting($block_id, 'stat_link', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Show link to Statistics charts?'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('stat_link', $stat_link); echo '</td></tr>'; }
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'days', WT_Filter::postInteger('days', 1, 30, 7)); set_block_setting($block_id, 'infoStyle', WT_Filter::post('infoStyle', 'list|table', 'table')); set_block_setting($block_id, 'calendar', WT_Filter::post('calendar', 'jewish|gregorian', 'jewish')); set_block_setting($block_id, 'block', WT_Filter::postBool('block')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $days = get_block_setting($block_id, 'days', 7); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Number of days to show'); echo '</td><td class="optionbox">'; echo '<input type="text" name="days" size="2" value="' . $days . '">'; echo ' <em>', WT_I18N::plural('maximum %d day', 'maximum %d days', 30, 30), '</em>'; echo '</td></tr>'; $infoStyle = get_block_setting($block_id, 'infoStyle', 'table'); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Presentation style'); echo '</td><td class="optionbox">'; echo select_edit_control('infoStyle', array('list' => WT_I18N::translate('list'), 'table' => WT_I18N::translate('table')), null, $infoStyle, ''); echo '</td></tr>'; $calendar = get_block_setting($block_id, 'calendar'); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Calendar'); echo '</td><td class="optionbox">'; echo select_edit_control('calendar', array('jewish' => WT_Date_Jewish::calendarName(), 'gregorian' => WT_Date_Gregorian::calendarName()), null, $calendar, ''); echo '</td></tr>'; $block = get_block_setting($block_id, 'block', true); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; }
echo WT_Filter::escapeHtml(get_gedcom_setting(WT_GED_ID, 'GEONAMES_ACCOUNT')); ?> " size="40" maxlength="255" dir="ltr" placeholder="<?php echo WT_I18N::translate('Username'); ?> "> </td> </tr> <tr> <td> <?php echo WT_I18N::translate('Do not update the “last change” record'), help_link('no_update_CHAN'); ?> </td> <td> <?php echo edit_field_yes_no('NEW_NO_UPDATE_CHAN', get_gedcom_setting(WT_GED_ID, 'NO_UPDATE_CHAN')); ?> </td> </tr> </table> </div> </div> <p> <input type="submit" value="<?php echo WT_I18N::translate('save'); ?> "> </p> </form>
public function configureBlock($block_id) { if (WT_Filter::postBool('save') && WT_Filter::checkCsrf()) { set_block_setting($block_id, 'num', WT_Filter::postInteger('num', 1, 10000, 10)); set_block_setting($block_id, 'count_placement', WT_Filter::post('count_placement', 'before|after', 'before')); set_block_setting($block_id, 'block', WT_Filter::postBool('block')); exit; } require_once WT_ROOT . 'includes/functions/functions_edit.php'; $num = get_block_setting($block_id, 'num', 10); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Number of items to show'); echo '</td><td class="optionbox">'; echo '<input type="text" name="num" size="2" value="', $num, '">'; echo '</td></tr>'; $count_placement = get_block_setting($block_id, 'count_placement', 'left'); echo "<tr><td class=\"descriptionbox wrap width33\">"; echo WT_I18N::translate('Place counts before or after name?'); echo "</td><td class=\"optionbox\">"; echo select_edit_control('count_placement', array('before' => WT_I18N::translate('before'), 'after' => WT_I18N::translate('after')), null, $count_placement, ''); echo '</td></tr>'; $block = get_block_setting($block_id, 'block', false); echo '<tr><td class="descriptionbox wrap width33">'; echo WT_I18N::translate('Add a scrollbar when block contents grow'); echo '</td><td class="optionbox">'; echo edit_field_yes_no('block', $block); echo '</td></tr>'; }