function search_result_url($atts) { global $thisarticle; $l = permlinkurl($thisarticle); return permlink($atts, $l); }
function l10n_permlink($atts, $thing) { global $thisarticle, $l10n_language, $is_article_list, $pretext, $prefs; $attrib_list = array('debug' => '0', 'articleid' => '', 'class' => '', 'style' => '', 'title' => '', 'titlegtxt' => ''); $atts = lAtts($attrib_list, $atts); $atts['title'] = $atts['titlegtxt'] ? gTxt($atts['titlegtxt']) : $atts['title']; $debug = $atts['debug']; if ($debug) { dmp($atts); } if (!$atts['articleid'] && $is_article_list) { return ''; } if (!$atts['articleid'] && !$is_article_list) { $atts['articleid'] = $thisarticle[L10N_COL_GROUP]; } $atts['id'] = _l10n_get_rendition_id($atts['articleid'], $debug); unset($atts['debug']); unset($atts['articleid']); unset($atts['titlegtxt']); return permlink($atts, $thing); }
function search_result_permlink($atts, $thing = NULL) { return permlink($atts, $thing); }
function zem_data_field(&$obj, $atts) { extract(lAtts(array('type' => '', 'field' => '', 'wraptag' => '', 'class' => 'zem_data_field', 'format' => '', 'title' => '', 'title_format' => '', 'label' => '', 'sep' => ': ', 'escape' => '1', 'linktext' => NULL, 'default' => ''), $atts, 0)); $attr = ''; if (!$obj) { return; } if (!array_key_exists($field, $obj)) { trigger_error(gTxt('unknown_field', array('{field}' => $field))); } if (empty($obj[$field])) { if ($default) { $out = $default; } else { return ''; } } else { $out = $obj[$field]; } if ($type == 'date' and $format) { $out = zem_strftime($format, strtotime($out)); } if ($type == 'date' and $title_format) { $attr = ' title="' . zem_strftime($title_format, strtotime($out)) . '"'; } if ($escape) { $out = escape_output($out); } if ($type == 'permlink') { $out = permlink(array('class' => $class, 'id' => $out), $linktext); } elseif ($type == 'link') { $out = href($linktext, $out); } elseif ($type == 'email') { $out = eE($out); } elseif ($type == 'emaillink') { $out = href($linktext, 'mailto:' . eE($out)); } $pre = ''; if ($label) { $pre = $label . $sep; } return doTag($pre . $out, $wraptag, $class, $attr); }