本文整理汇总了PHP中Fisharebest\Webtrees\Functions\FunctionsPrint::helpLink方法的典型用法代码示例。如果您正苦于以下问题:PHP FunctionsPrint::helpLink方法的具体用法?PHP FunctionsPrint::helpLink怎么用?PHP FunctionsPrint::helpLink使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Fisharebest\Webtrees\Functions\FunctionsPrint
的用法示例。
在下文中一共展示了FunctionsPrint::helpLink方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
&filterof=<?php
echo $filterof;
?>
&filtersx=<?php
echo $filtersx;
?>
&view=<?php
echo $view;
?>
">
<?php
echo $today->format('%Y');
?>
</a>
<?php
echo FunctionsPrint::helpLink('annivers_year_select');
?>
</td>
<td class="descriptionbox vmiddle">
<?php
echo I18N::translate('Show');
?>
</td>
<td class="optionbox vmiddle">
<?php
if (!$WT_TREE->getPreference('HIDE_LIVE_PEOPLE') || Auth::check()) {
?>
<select class="list_value" name="filterof" onchange="document.dateform.submit();">
<option value="all" <?php
示例2: explode
</td>
<td class="optionbox wrap"><input type="text" name="CALN" id="CALN" value=""></td></tr>
<?php
echo keep_chan();
?>
</table>
<a href="#" onclick="return expand_layer('events');"><i id="events_img" class="icon-plus"></i>
<?php
echo I18N::translate('Associate events with this source');
?>
</a>
<div id="events" style="display: none;">
<table class="facts_table">
<tr>
<td class="descriptionbox wrap width25"><?php
echo I18N::translate('Select events'), FunctionsPrint::helpLink('edit_SOUR_EVEN');
?>
</td>
<td class="optionbox wrap"><select name="EVEN[]" multiple="multiple" size="5">
<?php
$parts = explode(',', $WT_TREE->getPreference('INDI_FACTS_ADD'));
foreach ($parts as $key) {
?>
<option value="<?php
echo $key;
?>
"><?php
echo GedcomTag::getLabel($key);
?>
</option>
<?php
示例3: MediaController
define('WT_SCRIPT_NAME', 'mediaviewer.php');
require './includes/session.php';
$controller = new MediaController();
if ($controller->record && $controller->record->canShow()) {
$controller->pageHeader();
if ($controller->record->isPendingDeletion()) {
if (Auth::isModerator($controller->record->getTree())) {
echo '<p class="ui-state-highlight">', I18N::translate('This media object has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>'), ' ', FunctionsPrint::helpLink('pending_changes'), '</p>';
} elseif (Auth::isEditor($controller->record->getTree())) {
echo '<p class="ui-state-highlight">', I18N::translate('This media object has been deleted. The deletion will need to be reviewed by a moderator.'), ' ', FunctionsPrint::helpLink('pending_changes'), '</p>';
}
} elseif ($controller->record->isPendingAddtion()) {
if (Auth::isModerator($controller->record->getTree())) {
echo '<p class="ui-state-highlight">', I18N::translate('This media object has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>'), ' ', FunctionsPrint::helpLink('pending_changes'), '</p>';
} elseif (Auth::isEditor($controller->record->getTree())) {
echo '<p class="ui-state-highlight">', I18N::translate('This media object has been edited. The changes need to be reviewed by a moderator.'), ' ', FunctionsPrint::helpLink('pending_changes'), '</p>';
}
}
} else {
http_response_code(404);
$controller->pageHeader();
echo '<p class="ui-state-error">', I18N::translate('This media object does not exist or you do not have permission to view it.'), '</p>';
return;
}
$controller->addInlineJavascript('
jQuery("#media-tabs")
.tabs({
create: function(e, ui){
jQuery(e.target).css("visibility", "visible"); // prevent FOUC
}
});
示例4:
default:
throw new \Exception('Bad $action (' . $action . ') in addmedia.php');
}
$controller->pageHeader();
echo '<div id="addmedia-page">';
//container for media edit pop-up
echo '<form method="post" name="newmedia" action="addmedia.php" enctype="multipart/form-data">';
echo '<input type="hidden" name="action" value="', $action, '">';
echo '<input type="hidden" name="ged" value="', $WT_TREE->getNameHtml(), '">';
echo '<input type="hidden" name="pid" value="', $pid, '">';
if ($linktoid) {
echo '<input type="hidden" name="linktoid" value="', $linktoid, '">';
}
echo '<table class="facts_table">';
echo '<tr><td class="topbottombar" colspan="2">';
echo $controller->getPageTitle(), FunctionsPrint::helpLink('OBJE');
echo '</td></tr>';
if (!$linktoid && $action == 'create') {
echo '<tr><td class="descriptionbox wrap width25">';
echo I18N::translate('Enter an individual, family, or source ID');
echo '</td><td class="optionbox wrap"><input type="text" data-autocomplete-type="IFS" name="linktoid" id="linktoid" size="6" value="">';
echo ' ', FunctionsPrint::printFindIndividualLink('linktoid');
echo ' ', FunctionsPrint::printFindFamilyLink('linktoid');
echo ' ', FunctionsPrint::printFindSourceLink('linktoid');
echo '<p class="small text-muted">', I18N::translate('Enter or search for the ID of the individual, family, or source to which this media object should be linked.'), '</p></td></tr>';
}
if ($media) {
$gedrec = $media->getGedcom();
} else {
$gedrec = '';
}
示例5: printFamilyFacts
/**
* Print the facts
*/
public function printFamilyFacts()
{
global $linkToID;
$linkToID = $this->record->getXref();
// -- Tell addmedia.php what to link to
$indifacts = $this->record->getFacts();
if ($indifacts) {
Functions::sortFacts($indifacts);
foreach ($indifacts as $fact) {
FunctionsPrintFacts::printFact($fact, $this->record);
}
} else {
echo '<tr><td class="messagebox" colspan="2">', I18N::translate('No facts exist for this family.'), '</td></tr>';
}
if (Auth::isEditor($this->record->getTree())) {
FunctionsPrint::printAddNewFact($this->record->getXref(), $indifacts, 'FAM');
echo '<tr><td class="descriptionbox">';
echo I18N::translate('Note');
echo '</td><td class="optionbox">';
echo "<a href=\"#\" onclick=\"return add_new_record('" . $this->record->getXref() . "','NOTE');\">", I18N::translate('Add a note'), '</a>';
echo '</td></tr>';
echo '<tr><td class="descriptionbox">';
echo I18N::translate('Shared note');
echo '</td><td class="optionbox">';
echo "<a href=\"#\" onclick=\"return add_new_record('" . $this->record->getXref() . "','SHARED_NOTE');\">", I18N::translate('Add a shared note'), '</a>';
echo '</td></tr>';
if ($this->record->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($this->record->getTree())) {
echo '<tr><td class="descriptionbox">';
echo I18N::translate('Media object');
echo '</td><td class="optionbox">';
echo "<a href=\"#\" onclick=\"window.open('addmedia.php?action=showmediaform&linktoid=" . $this->record->getXref() . "', '_blank', edit_window_specs); return false;\">", I18N::translate('Add a media object'), '</a>';
echo FunctionsPrint::helpLink('OBJE');
echo '<br>';
echo "<a href=\"#\" onclick=\"window.open('inverselink.php?linktoid=" . $this->record->getXref() . "&linkto=family', '_blank', find_window_specs); return false;\">", I18N::translate('Link to an existing media object'), '</a>';
echo '</td></tr>';
}
echo '<tr><td class="descriptionbox">';
echo I18N::translate('Source');
echo '</td><td class="optionbox">';
echo "<a href=\"#\" onclick=\"return add_new_record('" . $this->record->getXref() . "','SOUR');\">", I18N::translate('Add a source citation'), '</a>';
echo '</td></tr>';
}
}
示例6: return
return (array_key_exists($x->getTag(), $order) ? $order[$x->getTag()] : PHP_INT_MAX) - (array_key_exists($y->getTag(), $order) ? $order[$y->getTag()] : PHP_INT_MAX);
});
// Print the facts
foreach ($facts as $fact) {
FunctionsPrintFacts::printFact($fact, $controller->record);
}
// new fact link
if ($controller->record->canEdit()) {
FunctionsPrint::printAddNewFact($controller->record->getXref(), $facts, 'SOUR');
// new media
if ($controller->record->getTree()->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($WT_TREE)) {
echo '<tr><td class="descriptionbox">';
echo GedcomTag::getLabel('OBJE');
echo '</td><td class="optionbox">';
echo '<a href="#" onclick="window.open(\'addmedia.php?action=showmediaform&linktoid=', $controller->record->getXref(), '\', \'_blank\', edit_window_specs); return false;">', I18N::translate('Add a new media object'), '</a>';
echo FunctionsPrint::helpLink('OBJE');
echo '<br>';
echo '<a href="#" onclick="window.open(\'inverselink.php?linktoid=', $controller->record->getXref(), '&linkto=source\', \'_blank\', find_window_specs); return false;">', I18N::translate('Link to an existing media object'), '</a>';
echo '</td></tr>';
}
}
echo '</table>
</div>';
// Individuals linked to this source
if ($linked_indi) {
echo '<div id="indi-sources">', FunctionsPrintLists::individualTable($linked_indi), '</div>';
}
// Families linked to this source
if ($linked_fam) {
echo '<div id="fam-sources">', FunctionsPrintLists::familyTable($linked_fam), '</div>';
}
示例7: getTabContent
/** {@inheritdoc} */
public function getTabContent()
{
global $WT_TREE, $controller;
ob_start();
echo '<table class="facts_table">';
foreach ($this->getFactsWithMedia() as $fact) {
if ($fact->getTag() == 'OBJE') {
FunctionsPrintFacts::printMainMedia($fact, 1);
} else {
for ($i = 2; $i < 4; ++$i) {
FunctionsPrintFacts::printMainMedia($fact, $i);
}
}
}
if (!$this->getFactsWithMedia()) {
echo '<tr><td id="no_tab4" colspan="2" class="facts_value">', I18N::translate('There are no media objects for this individual.'), '</td></tr>';
}
// New media link
if ($controller->record->canEdit() && $WT_TREE->getPreference('MEDIA_UPLOAD') >= Auth::accessLevel($controller->record->getTree())) {
?>
<tr>
<td class="facts_label">
<?php
echo GedcomTag::getLabel('OBJE');
?>
</td>
<td class="facts_value">
<a href="#" onclick="window.open('addmedia.php?action=showmediaform&linktoid=<?php
echo $controller->record->getXref();
?>
&ged=<?php
echo $controller->record->getTree()->getNameUrl();
?>
', '_blank', edit_window_specs); return false;">
<?php
echo I18N::translate('Add a new media object');
?>
</a>
<?php
echo FunctionsPrint::helpLink('OBJE');
?>
<br>
<a href="#" onclick="window.open('inverselink.php?linktoid=<?php
echo $controller->record->getXref();
?>
&ged=<?php
echo $WT_TREE->getNameUrl();
?>
&linkto=person', '_blank', find_window_specs); return false;">
<?php
echo I18N::translate('Link to an existing media object');
?>
</a>
</td>
</tr>
<?php
}
?>
</table>
<?php
return '<div id="' . $this->getName() . '_content">' . ob_get_clean() . '</div>';
}
示例8: FamilyController
define('WT_SCRIPT_NAME', 'family.php');
require './includes/session.php';
$record = Family::getInstance(Filter::get('famid', WT_REGEX_XREF), $WT_TREE);
$controller = new FamilyController($record);
if ($controller->record && $controller->record->canShow()) {
if ($controller->record->isPendingDeletion()) {
if (Auth::isModerator($controller->record->getTree())) {
FlashMessages::addMessage(I18N::translate('This family has been deleted. You should review the deletion and then %1$s or %2$s it.', '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'accept') . '</a>', '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the deletion and then accept or reject it.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
} elseif (Auth::isEditor($controller->record->getTree())) {
FlashMessages::addMessage(I18N::translate('This family has been deleted. The deletion will need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
}
} elseif ($controller->record->isPendingAddtion()) {
if (Auth::isModerator($controller->record->getTree())) {
FlashMessages::addMessage(I18N::translate('This family has been edited. You should review the changes and then %1$s or %2$s them.', '<a href="#" onclick="accept_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'accept') . '</a>', '<a href="#" onclick="reject_changes(\'' . $controller->record->getXref() . '\');">' . I18N::translateContext('You should review the changes and then accept or reject them.', 'reject') . '</a>') . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
} elseif (Auth::isEditor($controller->record->getTree())) {
FlashMessages::addMessage(I18N::translate('This family has been edited. The changes need to be reviewed by a moderator.') . ' ' . FunctionsPrint::helpLink('pending_changes'), 'warning');
}
}
$controller->pageHeader();
} elseif ($controller->record && $controller->record->getTree()->getPreference('SHOW_PRIVATE_RELATIONSHIPS')) {
$controller->pageHeader();
// Continue - to display the children/parents/grandparents.
// We'll check for showing the details again later
} else {
FlashMessages::addMessage(I18N::translate('This family does not exist or you do not have permission to view it.'), 'danger');
http_response_code(404);
$controller->pageHeader();
return;
}
?>
<div id="family-page">
示例9: getBlock
/**
* Generate the HTML content of this block.
*
* @param int $block_id
* @param bool $template
* @param string[] $cfg
*
* @return string
*/
public function getBlock($block_id, $template = true, $cfg = array())
{
global $ctype, $WT_TREE;
switch (Filter::get('action')) {
case 'deletenews':
$news_id = Filter::get('news_id');
if ($news_id) {
Database::prepare("DELETE FROM `##news` WHERE news_id = ?")->execute(array($news_id));
}
break;
}
if (isset($_REQUEST['gedcom_news_archive'])) {
$limit = 'nolimit';
$flag = '0';
} else {
$flag = $this->getBlockSetting($block_id, 'flag', 0);
if ($flag === '0') {
$limit = 'nolimit';
} else {
$limit = $this->getBlockSetting($block_id, 'limit', 'nolimit');
}
}
foreach (array('limit', 'flag') as $name) {
if (array_key_exists($name, $cfg)) {
${$name} = $cfg[$name];
}
}
$usernews = Database::prepare("SELECT SQL_CACHE news_id, user_id, gedcom_id, UNIX_TIMESTAMP(updated) AS updated, subject, body FROM `##news` WHERE gedcom_id=? ORDER BY updated DESC")->execute(array($WT_TREE->getTreeId()))->fetchAll();
$id = $this->getName() . $block_id;
$class = $this->getName() . '_block';
if ($ctype === 'gedcom' && Auth::isManager($WT_TREE) || $ctype === 'user' && Auth::check()) {
$title = '<a class="icon-admin" title="' . I18N::translate('Configure') . '" href="block_edit.php?block_id=' . $block_id . '&ged=' . $WT_TREE->getNameHtml() . '&ctype=' . $ctype . '"></a>';
} else {
$title = '';
}
$title .= $this->getTitle();
$content = '';
if (count($usernews) == 0) {
$content .= I18N::translate('No news articles have been submitted.') . '<br>';
}
$c = 0;
foreach ($usernews as $news) {
if ($limit == 'count') {
if ($c >= $flag) {
break;
}
$c++;
}
if ($limit == 'date') {
if ((int) ((WT_TIMESTAMP - $news->updated) / 86400) > $flag) {
break;
}
}
$content .= '<div class="news_box" id="article' . $news->news_id . '">';
$content .= '<div class="news_title">' . Filter::escapeHtml($news->subject) . '</div>';
$content .= '<div class="news_date">' . FunctionsDate::formatTimestamp($news->updated) . '</div>';
if ($news->body == strip_tags($news->body)) {
$news->body = nl2br($news->body, false);
}
$content .= $news->body;
// Print Admin options for this News item
if (Auth::isManager($WT_TREE)) {
$content .= '<hr>' . '<a href="#" onclick="window.open(\'editnews.php?news_id=\'+' . $news->news_id . ', \'_blank\', news_window_specs); return false;">' . I18N::translate('Edit') . '</a> | ' . '<a href="index.php?action=deletenews&news_id=' . $news->news_id . '&ctype=' . $ctype . '&ged=' . $WT_TREE->getNameHtml() . '" onclick="return confirm(\'' . I18N::translate('Are you sure you want to delete “%s”?', Filter::escapeHtml($news->subject)) . "');\">" . I18N::translate('Delete') . '</a><br>';
}
$content .= '</div>';
}
$printedAddLink = false;
if (Auth::isManager($WT_TREE)) {
$content .= "<a href=\"#\" onclick=\"window.open('editnews.php?gedcom_id=" . $WT_TREE->getTreeId() . "', '_blank', news_window_specs); return false;\">" . I18N::translate('Add a news article') . "</a>";
$printedAddLink = true;
}
if ($limit == 'date' || $limit == 'count') {
if ($printedAddLink) {
$content .= ' | ';
}
$content .= '<a href="index.php?gedcom_news_archive=yes&ctype=' . $ctype . '&ged=' . $WT_TREE->getNameHtml() . '">' . I18N::translate('View archive') . "</a>";
$content .= FunctionsPrint::helpLink('gedcom_news_archive') . '<br>';
}
if ($template) {
return Theme::theme()->formatBlock($id, $title, $class, $content);
} else {
return $content;
}
}
示例10: addSimpleTag
/**
* add a new tag input field
*
* called for each fact to be edited on a form.
* Fact level=0 means a new empty form : data are POSTed by name
* else data are POSTed using arrays :
* glevels[] : tag level
* islink[] : tag is a link
* tag[] : tag name
* text[] : tag value
*
* @param string $tag fact record to edit (eg 2 DATE xxxxx)
* @param string $upperlevel optional upper level tag (eg BIRT)
* @param string $label An optional label to echo instead of the default
* @param string $extra optional text to display after the input field
* @param Individual $person For male/female translations
*
* @return string
*/
public static function addSimpleTag($tag, $upperlevel = '', $label = '', $extra = null, Individual $person = null)
{
global $tags, $main_fact, $xref, $bdm, $action, $WT_TREE;
// Keep track of SOUR fields, so we can reference them in subsequent PAGE fields.
static $source_element_id;
$subnamefacts = array('NPFX', 'GIVN', 'SPFX', 'SURN', 'NSFX', '_MARNM_SURN');
preg_match('/^(?:(\\d+) (' . WT_REGEX_TAG . ') ?(.*))/', $tag, $match);
list(, $level, $fact, $value) = $match;
$level = (int) $level;
// element name : used to POST data
if ($level === 0) {
if ($upperlevel) {
$element_name = $upperlevel . '_' . $fact;
} else {
$element_name = $fact;
}
} else {
$element_name = 'text[]';
}
if ($level === 1) {
$main_fact = $fact;
}
// element id : used by javascript functions
if ($level === 0) {
$element_id = $fact;
} else {
$element_id = $fact . Uuid::uuid4();
}
if ($upperlevel) {
$element_id = $upperlevel . '_' . $fact . Uuid::uuid4();
}
// field value
$islink = substr($value, 0, 1) === '@' && substr($value, 0, 2) !== '@#';
if ($islink) {
$value = trim(substr($tag, strlen($fact) + 3), ' @\\r');
} else {
$value = (string) substr($tag, strlen($fact) + 3);
}
if ($fact === 'REPO' || $fact === 'SOUR' || $fact === 'OBJE' || $fact === 'FAMC') {
$islink = true;
}
if ($fact === 'SHARED_NOTE_EDIT' || $fact === 'SHARED_NOTE') {
$islink = true;
$fact = 'NOTE';
}
// label
echo '<tr id="', $element_id, '_tr"';
if ($fact === 'MAP' || ($fact === 'LATI' || $fact === 'LONG') && $value === '') {
echo ' style="display:none;"';
}
echo '>';
if (in_array($fact, $subnamefacts) || $fact === 'LATI' || $fact === 'LONG') {
echo '<td class="optionbox wrap width25">';
} else {
echo '<td class="descriptionbox wrap width25">';
}
// tag name
if ($label) {
echo $label;
} elseif ($upperlevel) {
echo GedcomTag::getLabel($upperlevel . ':' . $fact);
} else {
echo GedcomTag::getLabel($fact);
}
// If using GEDFact-assistant window
if ($action === 'addnewnote_assisted') {
// Do not print on GEDFact Assistant window
} else {
// Not all facts have help text.
switch ($fact) {
case 'NAME':
if ($upperlevel !== 'REPO' && $upperlevel !== 'UNKNOWN') {
echo FunctionsPrint::helpLink($fact);
}
break;
case 'DATE':
case 'PLAC':
case 'RESN':
case 'ROMN':
case 'SURN':
case '_HEB':
//.........这里部分代码省略.........
示例11:
<option value="1,2,3,4,5,6,7,8,9,10" selected>', I18N::translate('interval one child'), '</option>
<option value="2,4,6,8,10,12">', I18N::translate('interval two children'), '</option>
</select>
<br>
</div>
<div id="map_opt" style="display:none;">
<div id="chart_type">';
echo I18N::translate('Chart type');
echo '<br><select name="chart_type" onchange="statusShowSurname(this);">
<option value="indi_distribution_chart" selected>', I18N::translate('Individual distribution chart'), '</option>
<option value="surname_distribution_chart">', I18N::translate('Surname distribution chart'), '</option>
</select>
<br>
</div>
<div id="surname_opt" style="display:none;">';
echo GedcomTag::getLabel('SURN'), FunctionsPrint::helpLink('google_chart_surname'), '<br><input data-autocomplete-type="SURN" type="text" name="SURN" size="20">';
echo '<br>
</div>';
echo I18N::translate('Geographical area');
echo '<br><select id="chart_shows" name="chart_shows">
<option value="world" selected>', I18N::translate('World'), '</option>
<option value="europe">', I18N::translate('Europe'), '</option>
<option value="south_america">', I18N::translate('South America'), '</option>
<option value="asia">', I18N::translate('Asia'), '</option>
<option value="middle_east">', I18N::translate('Middle East'), '</option>
<option value="africa">', I18N::translate('Africa'), '</option>
</select>
</div>
</td>
<td class="descriptionbox width20 wrap" id="axes">', I18N::translate('Categories'), '</td>
<td class="optionbox width30" id="zyaxes">
示例12:
<?php
echo I18N::translate('Surname distribution chart');
?>
</option>
</select>
</label>
<br>
</div>
<div id="surname_opt" style="display:none;">
<label for="SURN">
<?php
echo GedcomTag::getLabel('SURN');
?>
</label>
<?php
echo FunctionsPrint::helpLink('google_chart_surname');
?>
<br>
<input data-autocomplete-type="SURN" type="text" id="SURN" name="SURN" size="20">
<br>
</div>
<label for="chart_shows">
<?php
echo I18N::translate('Geographic area');
?>
</label>
<br>
<select id="chart_shows" name="chart_shows">
<option value="world" selected>
<?php
echo I18N::translate('World');