function tag_recent_articles() { global $step, $endform, $name; $invars = gpsa(array('label', 'limit', 'break', 'wraptag', 'category', 'sortby', 'sortdir', 'labeltag')); extract($invars); $label = !$label ? gTxt('recently') : $label; $limit = !$limit ? '10' : $limit; $break = !$break ? '<br />' : $break; $category = !$category ? '' : $category; $sortby = !$sortby ? '' : $sortby; $out = form(startTable('list') . tr(tdcs(hed(gTxt('tag_recent_articles'), 3), 2)) . tagRow('label', fInput('text', 'label', $label, 'edit', '', '', 20)) . tagRow('labeltag', fInput('text', 'labeltag', $labeltag, 'edit', '', '', 5)) . tagRow('limit', fInput('text', 'limit', $limit, 'edit', '', '', 2)) . tagRow('break', fInput('text', 'break', $break, 'edit', '', '', 5)) . tagRow('wraptag', fInput('text', 'wraptag', $wraptag, 'edit', '', '', 2)) . tagRow('category', category_pop($category)) . tagRow('sort_by', sort_pop($sortby)) . tagRow('sort_direction', sortdir_pop($sortdir)) . $endform); $out .= $step == 'build' ? tdb(tb($name, $invars)) : ''; return $out; }
function tag_related_articles() { global $step, $endform, $tag_name; $atts = gpsa(array('break', 'class', 'label', 'labeltag', 'limit', 'match', 'section', 'sort', 'wraptag')); extract($atts); $label = !$label ? 'Related Articles' : $label; $out = form(startTable('tagbuilder') . tr(tdcs(hed(gTxt('tag_' . $tag_name), 3), 2)) . tagRow('section', section_pop('section', $section)) . tagRow('match', match_pop($match)) . tagRow('sort', sort_pop($sort)) . tagRow('limit', fInput('text', 'limit', $limit, 'edit', '', '', 2)) . tagRow('label', fInput('text', 'label', $label, 'edit', '', '', 20)) . tagRow('labeltag', input_tag('labeltag', $labeltag)) . tagRow('wraptag', input_tag('wraptag', $wraptag)) . tagRow('class', fInput('text', 'class', $class, 'edit', '', '', 20)) . tagRow('break', input_tag('break', $break)) . $endform); if ($step == 'build') { $out .= tdb(tb($tag_name, $atts)); } return $out; }