Textpattern PHP Cross Reference Content Management Systems

Source: /textpattern/include/txp_tag.php - 3948 lines - 66405 bytes - Summary - Text - Print

   1  <?php
   2  
   3  /*
   4      This is Textpattern
   5  
   6      Copyright 2005 by Dean Allen
   7      www.textpattern.com
   8      All rights reserved
   9  
  10      Use of this software indicates acceptance of the Textpattern license agreement
  11  
  12  $HeadURL: https://textpattern.googlecode.com/svn/releases/4.5.4/source/textpattern/include/txp_tag.php $
  13  $LastChangedRevision: 4095 $
  14  
  15  */
  16  
  17  if (!defined('txpinterface'))
  18  {
  19      die('txpinterface is undefined.');
  20  }
  21  
  22  // -------------------------------------------------------------
  23  
  24  header(pluggable_ui('admin_side', 'x_frame_options', 'X-Frame-Options: SAMEORIGIN'));
  25  
  26  ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  27  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo LANG; ?>" lang="<?php echo LANG; ?>" dir="<?php echo txpspecialchars(gTxt('lang_dir')); ?>">
  28  <head>
  29      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  30      <title><?php echo gTxt('build'); ?> &#124; Textpattern CMS</title>
  31      <script type="text/javascript" src="jquery.js"></script>
  32      <?php echo script_js(
  33          'var textpattern = {event: "'.txpspecialchars($event).'", step: "'.txpspecialchars($step).'", _txp_token: "'.txpspecialchars(form_token()).'"};'
  34      ); ?>
  35      <?php echo $theme->html_head(); ?>
  36      </head>
  37  <body id="tag-event">
  38  <?php
  39  
  40      $tag_name = gps('tag_name');
  41  
  42      $functname = 'tag_'.$tag_name;
  43  
  44      if (function_exists($functname))
  45      {
  46          $endform = n.tr(
  47              td().
  48              td(
  49                  fInput('submit', '', gTxt('build'))
  50              )
  51          ).
  52          n.endTable().
  53          n.eInput('tag').
  54          n.sInput('build').
  55          n.hInput('tag_name', $tag_name);
  56  
  57          echo $functname($tag_name);
  58      }
  59  
  60  ?>
  61  
  62  </body>
  63  </html>
  64  <?php
  65  
  66  /*
  67  
  68  begin generic functions
  69  
  70  */
  71  
  72  // -------------------------------------------------------------
  73  
  74  	function tagRow($label, $thing)
  75      {
  76          return n.n.tr(
  77              n.fLabelCell($label).
  78              n.td($thing)
  79          );
  80      }
  81  
  82  // -------------------------------------------------------------
  83  
  84      function tb($tag, $atts_list = array(), $thing = '')
  85      {
  86          $atts = array();
  87  
  88          foreach ($atts_list as $att => $val)
  89          {
  90              if ($val or $val === '0' or $val === '{att_empty}')
  91              {
  92                  $val = str_replace('{att_empty}', '', $val);
  93                  $atts[] = ' '.$att.'="'.$val.'"';
  94              }
  95          }
  96  
  97          $atts = ($atts) ? join('', $atts) : '';
  98  
  99          return !empty($thing) ?
 100              '<txp:'.$tag.$atts.'>'.$thing.'</txp:'.$tag.'>' :
 101              '<txp:'.$tag.$atts.' />';
 102      }
 103  
 104  // -------------------------------------------------------------
 105  
 106  	function tbd($tag, $thing)
 107      {
 108          return '<txp:'.$tag.'>'.$thing.'</txp:'.$tag.'>';
 109      }
 110  
 111  // -------------------------------------------------------------
 112  
 113  	function tdb($thing)
 114      {
 115          return n.graf(text_area('tag', '', '', $thing), ' id="tagbuilder-output"');
 116      }
 117  
 118  //--------------------------------------------------------------
 119  
 120  	function key_input($name, $var)
 121      {
 122          return '<textarea name="'.$name.'">'.$var.'</textarea>';
 123      }
 124  
 125  //--------------------------------------------------------------
 126  
 127  	function input_id($id)
 128      {
 129          return fInput('text', 'id', $id, '', '', '', 6);
 130      }
 131  
 132  //--------------------------------------------------------------
 133  
 134  	function time_pop($time)
 135      {
 136          $vals = array(
 137              'past'   => gTxt('time_past'),
 138              'future' => gTxt('time_future'),
 139              'any'    => gTxt('time_any')
 140          );
 141  
 142          return ' '.selectInput('time', $vals, $time, true);
 143      }
 144  
 145  //--------------------------------------------------------------
 146  
 147  	function input_limit($limit)
 148      {
 149          return fInput('text', 'limit', $limit, '', '', '', 2);
 150      }
 151  
 152  //--------------------------------------------------------------
 153  
 154  	function input_offset($offset)
 155      {
 156          return fInput('text', 'offset', $offset, '', '', '', 2);
 157      }
 158  
 159  //--------------------------------------------------------------
 160  
 161  	function input_tag($name, $val)
 162      {
 163          return fInput('text', $name, $val, '', '', '', 6);
 164      }
 165  
 166  //--------------------------------------------------------------
 167  
 168  	function yesno_pop($select_name, $val) {
 169          $vals = array(
 170              1 => gTxt('yes'),
 171              0 => gTxt('no'),
 172          );
 173  
 174          if (is_numeric($val)) {
 175              $val = (int) $val;
 176          }
 177  
 178          return ' '.selectInput($select_name, $vals, $val, true, '', '', true);
 179      }
 180  
 181  //--------------------------------------------------------------
 182  
 183  	function status_pop($val)
 184      {
 185          $vals = array(
 186              4 => gTxt('live'),
 187              5 => gTxt('sticky'),
 188              3 => gTxt('pending'),
 189              1 => gTxt('draft'),
 190              2 => gTxt('hidden'),
 191          );
 192  
 193          return ' '.selectInput('status', $vals, $val, true);
 194      }
 195  
 196  //--------------------------------------------------------------
 197  
 198  	function section_pop($select_name, $val)
 199      {
 200          $vals = array();
 201  
 202          $rs = safe_rows_start('name, title', 'txp_section', "name != 'default' order by name");
 203  
 204          if ($rs and numRows($rs) > 0)
 205          {
 206              while ($a = nextRow($rs))
 207              {
 208                  extract($a);
 209  
 210                  $vals[$name] = $title;
 211              }
 212  
 213              return ' '.selectInput($select_name, $vals, $val, true);
 214          }
 215  
 216          return gTxt('no_sections_available');
 217      }
 218  
 219  //--------------------------------------------------------------
 220  
 221  	function type_pop($val)
 222      {
 223          $vals = array(
 224              'article' => gTxt('article'),
 225              'link'        => gTxt('link'),
 226              'image'        => gTxt('image'),
 227              'file'        => gTxt('file'),
 228          );
 229  
 230          return ' '.selectInput('type', $vals, $val, true);
 231      }
 232  
 233  //--------------------------------------------------------------
 234  
 235  	function feed_flavor_pop($val)
 236      {
 237          $vals = array(
 238              'atom' => 'Atom 1.0',
 239              'rss'     => 'RSS 2.0'
 240          );
 241  
 242          return ' '.selectInput('flavor', $vals, $val, true);
 243      }
 244  
 245  //--------------------------------------------------------------
 246  
 247  	function feed_format_pop($val)
 248      {
 249          $vals = array(
 250              'a'    => '<a href...',
 251              'link' => '<link rel...',
 252          );
 253  
 254          return ' '.selectInput('format', $vals, $val, true);
 255      }
 256  
 257  //--------------------------------------------------------------
 258  
 259  	function article_category_pop($val)
 260      {
 261          $vals = getTree('root','article');
 262  
 263          if ($vals)
 264          {
 265              return ' '.treeSelectInput('category', $vals, $val);
 266          }
 267  
 268          return gTxt('no_categories_available');
 269      }
 270  
 271  //--------------------------------------------------------------
 272  
 273  	function link_category_pop($val)
 274      {
 275          $vals = getTree('root','link');
 276  
 277          if ($vals)
 278          {
 279              return ' '.treeSelectInput('category', $vals, $val);
 280          }
 281  
 282          return gTxt('no_categories_available');
 283      }
 284  
 285  //--------------------------------------------------------------
 286  
 287  	function file_category_pop($val)
 288      {
 289          $vals = getTree('root','file');
 290  
 291          if ($vals)
 292          {
 293              return ' '.treeSelectInput('category', $vals, $val);
 294          }
 295  
 296          return gTxt('no_categories_available');
 297      }
 298  
 299  //--------------------------------------------------------------
 300  
 301  	function match_pop($val)
 302      {
 303          $vals = array(
 304              'Category1,Category2' => gTxt('category1').' '.gTxt('and').' '.gTxt('category2'),
 305              'Category1'           => gTxt('category1'),
 306              'Category2'           => gTxt('category2')
 307          );
 308  
 309          return ' '.selectInput('match', $vals, $val, true);
 310      }
 311  
 312  //--------------------------------------------------------------
 313  
 314  	function search_opts_pop($val)
 315      {
 316          $vals = array(
 317              'exact' => gTxt('exact'),
 318              'any'   => gTxt('any'),
 319              'all'   => gTxt('all'),
 320          );
 321  
 322          return ' '.selectInput('match', $vals, $val, false);
 323      }
 324  
 325  //--------------------------------------------------------------
 326  
 327  	function author_pop($val)
 328      {
 329          $vals = array();
 330  
 331          $rs = safe_rows_start('name', 'txp_users', '1 = 1 order by name');
 332  
 333          if ($rs)
 334          {
 335              while ($a = nextRow($rs))
 336              {
 337                  extract($a);
 338  
 339                  $vals[$name] = $name;
 340              }
 341  
 342              return ' '.selectInput('author', $vals, $val, true);
 343          }
 344      }
 345  
 346  //--------------------------------------------------------------
 347  
 348  	function sort_pop($val)
 349      {
 350          $asc = ' ('.gTxt('ascending').')';
 351          $desc = ' ('.gTxt('descending').')';
 352  
 353          $vals = array(
 354              'Title asc'      => gTxt('tag_title').$asc,
 355              'Title desc'     => gTxt('tag_title').$desc,
 356              'Posted asc'     => gTxt('tag_posted').$asc,
 357              'Posted desc'    => gTxt('tag_posted').$desc,
 358              'LastMod asc'    => gTxt('last_modification').$asc,
 359              'LastMod desc'   => gTxt('last_modification').$desc,
 360              'Section asc'    => gTxt('section').$asc,
 361              'Section desc'   => gTxt('section').$desc,
 362              'Category1 asc'  => gTxt('category1').$asc,
 363              'Category1 desc' => gTxt('category1').$desc,
 364              'Category2 asc'  => gTxt('category2').$asc,
 365              'Category2 desc' => gTxt('category2').$desc,
 366              'rand()'         => gTxt('random')
 367          );
 368  
 369          return ' '.selectInput('sort', $vals, $val, true);
 370      }
 371  
 372  //--------------------------------------------------------------
 373  
 374  	function discuss_sort_pop($val)
 375      {
 376          $asc = ' ('.gTxt('ascending').')';
 377          $desc = ' ('.gTxt('descending').')';
 378  
 379          $vals = array(
 380              'posted asc'  => gTxt('posted').$asc,
 381              'posted desc' => gTxt('posted').$desc,
 382          );
 383  
 384          return ' '.selectInput('sort', $vals, $val, true);
 385      }
 386  
 387  //--------------------------------------------------------------
 388  
 389  	function list_sort_pop($val)
 390      {
 391          $asc = ' ('.gTxt('ascending').')';
 392          $desc = ' ('.gTxt('descending').')';
 393  
 394          $vals = array(
 395              'title asc'  => gTxt('tag_title').$asc,
 396              'title desc' => gTxt('tag_title').$desc,
 397              'name asc'   => gTxt('name').$asc,
 398              'name desc'  => gTxt('name').$desc,
 399          );
 400  
 401          return ' '.selectInput('sort', $vals, $val, true);
 402      }
 403  
 404  //--------------------------------------------------------------
 405  
 406  	function pgonly_pop($val)
 407      {
 408          $vals = array(
 409              '1' => gTxt('yes'),
 410              '0' => gTxt('no')
 411          );
 412  
 413          return ' '.selectInput('pgonly', $vals, $val, true);
 414      }
 415  
 416  //--------------------------------------------------------------
 417  
 418  	function form_pop($select_name, $type = '', $val)
 419      {
 420          $vals = array();
 421  
 422          $type = ($type) ? "type = '".doSlash($type)."'" : '1 = 1';
 423  
 424          $rs = safe_rows_start('name', 'txp_form', "$type order by name");
 425  
 426          if ($rs and numRows($rs) > 0)
 427          {
 428              while ($a = nextRow($rs))
 429              {
 430                  extract($a);
 431  
 432                  $vals[$name] = $name;
 433              }
 434  
 435              return ' '.selectInput($select_name, $vals, $val, true);
 436          }
 437  
 438          return gTxt('no_forms_available');
 439      }
 440  
 441  //--------------------------------------------------------------
 442  
 443  	function css_pop($val)
 444      {
 445          $vals = array();
 446  
 447          $rs = safe_rows_start('name', 'txp_css', "1 = 1 order by name");
 448  
 449          if ($rs)
 450          {
 451              while ($a = nextRow($rs))
 452              {
 453                  extract($a);
 454  
 455                  $vals[$name] = $name;
 456              }
 457  
 458              return ' '.selectInput('name', $vals, $val, true);
 459          }
 460  
 461          return false;
 462      }
 463  
 464  //--------------------------------------------------------------
 465  
 466  	function css_format_pop($val)
 467      {
 468          $vals = array(
 469              'link' => '<link rel...',
 470              'url'  => 'css.php?...'
 471          );
 472  
 473          return ' '.selectInput('format', $vals, $val, true);
 474      }
 475  
 476  //--------------------------------------------------------------
 477  
 478  	function escape_pop($val)
 479      {
 480          $vals = array(
 481              '{att_empty}' => '',
 482              'html'        => 'html',
 483          );
 484  
 485          return ' '.selectInput('escape', $vals, $val, false);
 486      }
 487  
 488  //--------------------------------------------------------------
 489  
 490  /*
 491  
 492  begin tag builder functions
 493  
 494  */
 495  
 496  // -------------------------------------------------------------
 497  
 498  	function tag_article()
 499      {
 500          global $step, $endform, $tag_name;
 501  
 502          $atts = gpsa(array(
 503              'allowoverride',
 504              'form',
 505              'limit',
 506              'listform',
 507              'offset',
 508              'pageby',
 509              'pgonly',
 510              'searchall',
 511              'searchsticky',
 512              'sort',
 513              'status',
 514              'time'
 515          ));
 516  
 517          extract($atts);
 518  
 519          $out = form(
 520              startTable('tagbuilder').
 521  
 522              tr(
 523                  tdcs(
 524                      hed(gTxt('tag_'.$tag_name), 3)
 525                  , 2)
 526              ).
 527  
 528              tagRow('status',
 529                  status_pop($status)).
 530  
 531              tagRow('time',
 532                  time_pop($time)).
 533  
 534              tagRow('searchall',
 535                  yesno_pop('searchall', $searchall)).
 536  
 537              tagRow('searchsticky',
 538                  yesno_pop('searchsticky', $searchsticky)).
 539  
 540              tagRow('limit',
 541                  input_limit($limit)).
 542  
 543              tagRow('offset',
 544                  input_offset($offset)).
 545  
 546              tagRow('pageby',
 547                  fInput('text', 'pageby', $pageby, '', '', '', 2)).
 548  
 549              tagRow('sort',
 550                  sort_pop($sort)).
 551  
 552              tagRow('pgonly',
 553                  pgonly_pop($pgonly)).
 554  
 555              tagRow('allowoverride',
 556                  yesno_pop('allowoverride', $allowoverride)).
 557  
 558              tagRow('form',
 559                  form_pop('form', 'article', $form)).
 560  
 561              tagRow('listform',
 562                  form_pop('listform', 'article', $listform)).
 563  
 564              $endform
 565          );
 566  
 567          if ($step == 'build')
 568          {
 569              $out .= tdb(tb($tag_name, $atts));
 570          }
 571  
 572          return $out;
 573      }
 574  
 575  // -------------------------------------------------------------
 576  
 577  	function tag_article_custom()
 578      {
 579          global $step, $endform, $tag_name;
 580  
 581          $atts = gpsa(array(
 582              'allowoverride',
 583              'author',
 584              'break',
 585              'category',
 586              'class',
 587              'excerpted',
 588              'expired',
 589              'form',
 590              'id',
 591              'keywords',
 592              'label',
 593              'labeltag',
 594              'limit',
 595              'month',
 596              'offset',
 597              'pageby',
 598              'pgonly',
 599              'section',
 600              'sort',
 601              'status',
 602              'time',
 603              'wraptag',
 604          ));
 605  
 606          extract($atts);
 607  
 608          $out = form(
 609              startTable('tagbuilder').
 610  
 611              tr(
 612                  tdcs(
 613                      hed(gTxt('tag_'.$tag_name), 3)
 614                  , 2)
 615              ).
 616  
 617              tagRow('id',
 618                  input_id($id)).
 619  
 620              tagRow('status',
 621                  status_pop($status)).
 622  
 623              tagRow('section',
 624                  section_pop('section', $section)).
 625  
 626              tagRow('category',
 627                  article_category_pop($category)).
 628  
 629              tagRow('time',
 630                  time_pop($time)).
 631  
 632              tagRow('month',
 633                  fInput('text', 'month', $month, '', '', '', 7). ' ('.gTxt('yyyy-mm').')') .
 634  
 635              tagRow('keywords',
 636                  key_input('keywords', $keywords)).
 637  
 638              tagRow('has_excerpt',
 639                  yesno_pop('excerpted', $excerpted)).
 640  
 641              tagRow('expired',
 642                  yesno_pop('expired', $expired)).
 643  
 644              tagRow('author',
 645                  author_pop($author)).
 646  
 647              tagRow('sort',
 648                  sort_pop($sort)).
 649  
 650              tagRow('limit',
 651                  input_limit($limit)).
 652  
 653              tagRow('offset',
 654                  input_offset($offset)).
 655  
 656              tagRow('pgonly',
 657                  pgonly_pop($pgonly)).
 658  
 659              tagRow('allowoverride',
 660                  yesno_pop('allowoverride', $allowoverride)).
 661  
 662              tagRow('label',
 663                  fInput('text', 'label', $label, '', '', '', 20)).
 664  
 665              tagRow('labeltag',
 666                  input_tag('labeltag', $labeltag)).
 667  
 668              tagRow('wraptag',
 669                  input_tag('wraptag', $wraptag)).
 670  
 671              tagRow('class',
 672                  fInput('text', 'class', $class, '', '', '', 14)).
 673  
 674              tagRow('break',
 675                  input_tag('break', $break)).
 676  
 677              tagRow('form',
 678                  form_pop('form', 'article', $form)).
 679              $endform
 680          );
 681  
 682          if ($step == 'build')
 683          {
 684              $out .= tdb(tb($tag_name, $atts));
 685          }
 686  
 687          return $out;
 688      }
 689  
 690  // -------------------------------------------------------------
 691  
 692  	function tag_email()
 693      {
 694          global $step, $endform, $tag_name;
 695  
 696          $atts = gpsa(array(
 697              'email',
 698              'linktext',
 699              'title'
 700          ));
 701  
 702          extract($atts);
 703  
 704          $out = form(
 705              startTable('tagbuilder').
 706  
 707              tr(
 708                  tdcs(
 709                      hed(gTxt('tag_'.$tag_name), 3)
 710                  , 2)
 711              ).
 712  
 713              tagRow('email_address',
 714                  fInput('text', 'email', $email, '', '', '', 20)).
 715  
 716              tagRow('tooltip',
 717                  fInput('text', 'title', $title, '', '', '', 20)).
 718  
 719              tagRow('link_text',
 720                  fInput('text', 'linktext', $linktext, '', '', '', 20)).
 721  
 722              $endform
 723          );
 724  
 725          if ($step == 'build')
 726          {
 727              $out .= tdb(tb($tag_name, $atts));
 728          }
 729  
 730          return $out;
 731      }
 732  
 733  // -------------------------------------------------------------
 734  
 735  	function tag_page_title()
 736      {
 737          global $step, $endform, $tag_name;
 738  
 739          $atts = gpsa(array('separator'));
 740  
 741          extract($atts);
 742  
 743          $out = form(
 744              startTable('tagbuilder').
 745  
 746              tr(
 747                  tdcs(
 748                      hed(gTxt('tag_'.$tag_name), 3)
 749                  , 2)
 750              ).
 751  
 752              tagRow('title_separator',
 753                  fInput('text', 'separator', $separator, '', '', '', 4)).
 754  
 755              $endform
 756          );
 757  
 758          if ($step == 'build')
 759          {
 760              $out .= tdb(tb($tag_name, $atts));
 761          }
 762  
 763          return $out;
 764      }
 765  
 766  // -------------------------------------------------------------
 767  
 768  	function tag_linklist()
 769      {
 770          global $step, $endform, $tag_name;
 771  
 772          $atts = gpsa(array(
 773              'break',
 774              'category',
 775              'form',
 776              'label',
 777              'labeltag',
 778              'limit',
 779              'sort',
 780              'wraptag',
 781          ));
 782  
 783          $asc = ' ('.gTxt('ascending').')';
 784          $desc = ' ('.gTxt('descending').')';
 785  
 786          $sorts = array(
 787              'linksort asc'  => gTxt('name').$asc,
 788              'linksort desc' => gTxt('name').$desc,
 789              'category asc'  => gTxt('category').$asc,
 790              'category desc' => gTxt('category').$desc,
 791              'date asc'      => gTxt('date').$asc,
 792              'date desc'     => gTxt('date').$desc,
 793              'rand()'        => gTxt('random')
 794          );
 795  
 796          extract($atts);
 797  
 798          $out = form(
 799              startTable('tagbuilder').
 800  
 801              tr(
 802                  tdcs(
 803                      hed(gTxt('tag_'.$tag_name), 3)
 804                  , 2)
 805              ).
 806  
 807              tagRow('category',
 808                  link_category_pop($category)).
 809  
 810              tagRow('limit',
 811                  input_limit($limit)).
 812  
 813              tagRow('sort',
 814                  ' '.selectInput('sort', $sorts, $sort)).
 815  
 816              tagRow('label',
 817                  fInput('text', 'label', $label, '', '', '', 20)).
 818  
 819              tagRow('labeltag',
 820                  input_tag('labeltag', $labeltag)).
 821  
 822              tagRow('form',
 823                  form_pop('form', 'link', $form)).
 824  
 825              tagRow('wraptag',
 826                  input_tag('wraptag', $wraptag)).
 827  
 828              tagRow('break',
 829                  input_tag('break', $break)).
 830  
 831              $endform
 832          );
 833  
 834          if ($step == 'build')
 835          {
 836              $out .= tdb(tb($tag_name, $atts));
 837          }
 838  
 839          echo $out;
 840      }
 841  
 842  // -------------------------------------------------------------
 843  
 844  	function tag_section_list()
 845      {
 846          global $step, $endform, $tag_name;
 847  
 848          $atts = gpsa(array(
 849              'active_class',
 850              'break',
 851              'class',
 852              'default_title',
 853              'exclude',
 854              'include_default',
 855              'label',
 856              'labeltag',
 857              'sections',
 858              'sort',
 859              'wraptag'
 860          ));
 861  
 862          extract($atts);
 863  
 864          $out = form(
 865              startTable('tagbuilder').
 866  
 867              tr(
 868                  tdcs(
 869                      hed(gTxt('tag_'.$tag_name), 3)
 870                  , 2)
 871              ).
 872  
 873              tagRow('include_default',
 874                  yesno_pop('include_default', $include_default)).
 875  
 876              tagRow('sort',
 877                  list_sort_pop($sort)).
 878  
 879              tagRow('default_title',
 880                  fInput('text', 'default_title', $default_title, '', '', '', 20)).
 881  
 882              tagRow('sections',
 883                  fInput('text', 'sections', $sections, '', '', '', 20)).
 884  
 885              tagRow('exclude',
 886                  fInput('text', 'exclude', $exclude, '', '', '', 20)).
 887  
 888              tagRow('label',
 889                  fInput('text', 'label', $label, '', '', '', 20)).
 890  
 891              tagRow('labeltag',
 892                  input_tag('labeltag', $labeltag)).
 893  
 894              tagRow('wraptag',
 895                  input_tag('wraptag', $wraptag)).
 896  
 897              tagRow('class',
 898                  fInput('text', 'class', $class, '', '', '', 14)).
 899  
 900              tagRow('active_class',
 901                  fInput('text', 'active_class', $active_class, '', '', '', 14)).
 902  
 903              tagRow('break',
 904                  input_tag('break', $break)).
 905  
 906              $endform
 907          );
 908  
 909          if ($step == 'build')
 910          {
 911              $out .= tdb(tb($tag_name, $atts));
 912          }
 913  
 914          echo $out;
 915  
 916      }
 917  
 918  // -------------------------------------------------------------
 919  
 920  	function tag_category_list()
 921      {
 922          global $step, $endform, $tag_name;
 923  
 924          $atts = gpsa(array(
 925              'active_class',
 926              'break',
 927              'categories',
 928              'class',
 929              'exclude',
 930              'label',
 931              'labeltag',
 932              'parent',
 933              'section',
 934              'sort',
 935              'this_section',
 936              'type',
 937              'wraptag',
 938          ));
 939  
 940          extract($atts);
 941  
 942          $out = form(
 943              startTable('tagbuilder').
 944  
 945              tr(
 946                  tdcs(
 947                      hed(gTxt('tag_'.$tag_name), 3)
 948                  , 2)
 949              ).
 950  
 951              tagRow('type',
 952                  type_pop($type)).
 953  
 954              tagRow('parent',
 955                  fInput('text', 'parent', $parent, '', '', '', 20)).
 956  
 957              tagRow('categories',
 958                  fInput('text', 'categories', $categories, '', '', '', 20)).
 959  
 960              tagRow('exclude',
 961                  fInput('text', 'exclude', $exclude, '', '', '', 20)).
 962  
 963              tagRow('this_section',
 964                  yesno_pop('this_section', $this_section)).
 965  
 966              tagRow('category_list_section',
 967                  section_pop('section', $section)).
 968  
 969              tagRow('sort',
 970                  list_sort_pop($sort)).
 971  
 972              tagRow('label',
 973                  fInput('text', 'label', ($label ? $label : gTxt('categories')), '', '', '', 20)).
 974  
 975              tagRow('labeltag',
 976                  input_tag('labeltag', $labeltag)).
 977  
 978              tagRow('wraptag',
 979                  input_tag('wraptag', $wraptag)).
 980  
 981              tagRow('class',
 982                  fInput('text', 'class', $class, '', '', '', 14)).
 983  
 984              tagRow('active_class',
 985                  fInput('text', 'active_class', $active_class, '', '', '', 14)).
 986  
 987              tagRow('break',
 988                  input_tag('break', $break)).
 989  
 990              $endform
 991          );
 992  
 993          if ($step == 'build')
 994          {
 995              $out .= tdb(tb($tag_name, $atts));
 996          }
 997  
 998          echo $out;
 999      }
1000  
1001  // -------------------------------------------------------------
1002  
1003  	function tag_recent_articles()
1004      {
1005          global $step, $endform, $tag_name;
1006  
1007          $atts = gpsa(array(
1008              'break',
1009              'category',
1010              'label',
1011              'labeltag',
1012              'limit',
1013              'section',
1014              'sort',
1015              'wraptag',
1016          ));
1017  
1018          extract($atts);
1019  
1020          $out = form(
1021              startTable('tagbuilder').
1022  
1023              tr(
1024                  tdcs(
1025                      hed(gTxt('tag_'.$tag_name), 3)
1026                  , 2)
1027              ).
1028  
1029              tagRow('section',
1030                  section_pop('section', $section)).
1031  
1032              tagRow('category',
1033                  article_category_pop($category)).
1034  
1035              tagRow('sort',
1036                  sort_pop($sort)).
1037  
1038              tagRow('limit',
1039                  fInput('text', 'limit', $limit, '', '', '', 2)).
1040  
1041              tagRow('label',
1042                  fInput('text', 'label', ($label ? $label : gTxt('recent_articles')), '', '', '', 20)).
1043  
1044              tagRow('labeltag',
1045                  input_tag('labeltag', $labeltag)).
1046  
1047              tagRow('wraptag',
1048                  input_tag('wraptag', $wraptag)).
1049  
1050              tagRow('break',
1051                  input_tag('break', $break)).
1052  
1053              $endform
1054          );
1055  
1056          if ($step == 'build')
1057          {
1058              $out .= tdb(tb($tag_name, $atts));
1059          }
1060  
1061          return $out;
1062      }
1063  
1064  // -------------------------------------------------------------
1065  
1066  	function tag_related_articles()
1067      {
1068          global $step, $endform, $tag_name;
1069  
1070          $atts = gpsa(array(
1071              'break',
1072              'class',
1073              'label',
1074              'labeltag',
1075              'limit',
1076              'match',
1077              'section',
1078              'sort',
1079              'wraptag',
1080          ));
1081  
1082          extract($atts);
1083  
1084          $label = (!$label) ? 'Related Articles' : $label;
1085  
1086          $out = form(
1087              startTable('tagbuilder').
1088  
1089              tr(
1090                  tdcs(
1091                      hed(gTxt('tag_'.$tag_name), 3)
1092                  , 2)
1093              ).
1094  
1095              tagRow('section',
1096                  section_pop('section', $section)).
1097  
1098              tagRow('match',
1099                  match_pop($match)).
1100  
1101              tagRow('sort',
1102                  sort_pop($sort)).
1103  
1104              tagRow('limit',
1105                  fInput('text', 'limit', $limit, '', '', '', 2)).
1106  
1107              tagRow('label',
1108                  fInput('text', 'label', $label, '', '', '', 20)).
1109  
1110              tagRow('labeltag',
1111                  input_tag('labeltag', $labeltag)).
1112  
1113              tagRow('wraptag',
1114                  input_tag('wraptag', $wraptag)).
1115  
1116              tagRow('class',
1117                  fInput('text', 'class', $class, '', '', '', 20)).
1118  
1119              tagRow('break',
1120                  input_tag('break', $break)).
1121  
1122              $endform
1123          );
1124  
1125          if ($step == 'build')
1126          {
1127              $out .= tdb(tb($tag_name, $atts));
1128          }
1129  
1130          return $out;
1131      }
1132  
1133  // -------------------------------------------------------------
1134  
1135  	function tag_recent_comments()
1136      {
1137          global $step, $endform, $tag_name;
1138  
1139          $atts = gpsa(array(
1140              'break',
1141              'class',
1142              'label',
1143              'labeltag',
1144              'limit',
1145              'sort',
1146              'wraptag',
1147          ));
1148  
1149          extract($atts);
1150  
1151          $out = form(
1152              startTable('tagbuilder').
1153  
1154              tr(
1155                  tdcs(
1156                      hed(gTxt('tag_'.$tag_name), 3)
1157                  , 2)
1158              ).
1159  
1160              tagRow('sort',
1161                  discuss_sort_pop($sort)).
1162  
1163              tagRow('limit',
1164                  fInput('text', 'limit', $limit, '', '', '', 2)).
1165  
1166              tagRow('label',
1167                  fInput('text', 'label', ($label ? $label : gTxt('recent_comments')), '', '', '', 20)).
1168  
1169              tagRow('labeltag',
1170                  input_tag('labeltag', $labeltag)).
1171  
1172              tagRow('wraptag',
1173                  input_tag('wraptag', $wraptag)).
1174  
1175              tagRow('class',
1176                  fInput('text', 'class', $class, '', '', '', 5)).
1177  
1178              tagRow('break',
1179                  input_tag('break', $break)).
1180  
1181          $endform
1182          );
1183  
1184          if ($step == 'build')
1185          {
1186              $out .= tdb(tb($tag_name, $atts));
1187          }
1188  
1189          return $out;
1190      }
1191  
1192  // -------------------------------------------------------------
1193  
1194  	function tag_output_form()
1195      {
1196          global $step, $endform, $tag_name;
1197  
1198          $atts = gpsa(array(
1199              'form'
1200          ));
1201  
1202          extract($atts);
1203  
1204          $out = form(
1205              startTable('tagbuilder').
1206  
1207              tr(
1208                  tdcs(
1209                      hed(gTxt('tag_'.$tag_name), 3)
1210                  , 2)
1211              ).
1212  
1213              tagRow('form',
1214                  form_pop('form', 'misc', $form)).
1215  
1216              $endform
1217          );
1218  
1219          if ($step == 'build')
1220          {
1221              $out .= tdb(tb($tag_name, $atts));
1222          }
1223  
1224          return $out;
1225      }
1226  
1227  // -------------------------------------------------------------
1228  
1229  	function tag_popup()
1230      {
1231          global $step, $endform, $tag_name;
1232  
1233          $atts = gpsa(array(
1234              'class',
1235              'label',
1236              'section',
1237              'this_section',
1238              'type',
1239              'wraptag'
1240          ));
1241  
1242          extract($atts);
1243  
1244          $types = array(
1245              'c' => gTxt('Category'),
1246              's' => gTxt('Section')
1247          );
1248  
1249          $out = form(
1250              startTable('tagbuilder').
1251  
1252              tr(
1253                  tdcs(
1254                      hed(gTxt('tag_'.$tag_name), 3)
1255                  , 2)
1256              ).
1257  
1258              tagRow('type',
1259                  ' '.selectInput('type', $types, $type, true)).
1260  
1261              tagRow('section',
1262                  section_pop('section', $section)).
1263  
1264              tagRow('this_section',
1265                  yesno_pop('this_section', $this_section)).
1266  
1267              tagRow('label',
1268                  fInput('text', 'label', ($label ? $label : gTxt('browse')), '', '', '', INPUT_REGULAR)).
1269  
1270              tagRow('wraptag',
1271                  input_tag('wraptag', $wraptag)).
1272  
1273              tagRow('class',
1274                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1275  
1276              $endform
1277          );
1278  
1279          if ($step == 'build')
1280          {
1281              $out .= tdb(tb($tag_name, $atts));
1282          }
1283  
1284          return $out;
1285      }
1286  
1287  // -------------------------------------------------------------
1288  
1289  	function tag_password_protect()
1290      {
1291          global $step, $endform, $tag_name;
1292  
1293          $atts = gpsa(array(
1294              'login',
1295              'pass'
1296          ));
1297  
1298          extract($atts);
1299  
1300          $out = form(
1301              startTable('tagbuilder').
1302  
1303              tr(
1304                  tdcs(
1305                      hed(gTxt('tag_'.$tag_name), 3)
1306                  , 2)
1307              ).
1308  
1309              tagRow('login',
1310                  fInput('text', 'login', $login, '', '', '', INPUT_REGULAR)).
1311  
1312              tagRow('password',
1313                  fInput('text', 'pass', $pass, '', '', '', INPUT_REGULAR)).
1314  
1315              $endform
1316          );
1317  
1318          if ($step == 'build')
1319          {
1320              $out .= tdb(tb($tag_name, $atts));
1321          }
1322  
1323          return $out;
1324      }
1325  
1326  // -------------------------------------------------------------
1327  
1328  	function tag_search_input()
1329      {
1330          global $step, $endform, $tag_name;
1331  
1332          $atts = gpsa(array(
1333              'button',
1334              'class',
1335              'form',
1336              'label',
1337              'match',
1338              'section',
1339              'size',
1340              'wraptag'
1341          ));
1342  
1343          extract($atts);
1344  
1345          $out = form(
1346              startTable('tagbuilder').
1347  
1348              tr(
1349                  tdcs(
1350                      hed(gTxt('tag_'.$tag_name), 3)
1351                  , 2)
1352              ).
1353  
1354              tagRow('match_type',
1355                  search_opts_pop($match)).
1356  
1357              tagRow('section',
1358                  section_pop('section', $section)).
1359  
1360              tagRow('button_text',
1361                  fInput('text', 'button', $button, '', '', '', INPUT_REGULAR)).
1362  
1363              tagRow('input_size',
1364                  fInput('text', 'size', $size, '', '', '', INPUT_TINY)).
1365  
1366              tagRow('label',
1367                  fInput('text', 'label', ($label ? $label : gTxt('search')), '', '', '', INPUT_REGULAR)).
1368  
1369              tagRow('wraptag',
1370                  input_tag('wraptag', $wraptag)).
1371  
1372              tagRow('class',
1373                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1374  
1375              tagRow('form',
1376                  form_pop('form', 'misc', $form)).
1377  
1378              $endform
1379          );
1380  
1381          if ($step == 'build')
1382          {
1383              $out .= tdb(tb($tag_name, $atts));
1384          }
1385  
1386          return $out;
1387      }
1388  
1389  // -------------------------------------------------------------
1390  
1391  	function tag_category1()
1392      {
1393          global $step, $endform, $tag_name;
1394  
1395          $atts = gpsa(array(
1396              'class',
1397              'link',
1398              'title',
1399              'section',
1400              'this_section',
1401              'wraptag'
1402          ));
1403  
1404          extract($atts);
1405  
1406          $out = form(
1407              startTable('tagbuilder').
1408              tr(
1409                  tdcs(
1410                      hed(gTxt('tag_'.$tag_name), 3)
1411                  , 2)
1412              ).
1413  
1414              tagRow('title',
1415                  yesno_pop('title', $title)).
1416  
1417              tagRow('link_to_this_category',
1418                  yesno_pop('link', $link)).
1419  
1420              tagRow('section',
1421                  section_pop('section', $section)).
1422  
1423              tagRow('this_section',
1424                  yesno_pop('this_section', $this_section)).
1425  
1426              tagRow('wraptag',
1427                  input_tag('wraptag', $wraptag)).
1428  
1429              tagRow('class',
1430                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1431  
1432              $endform
1433          );
1434  
1435          if ($step == 'build')
1436          {
1437              $out .= tdb(tb($tag_name, $atts));
1438          }
1439  
1440          return $out;
1441      }
1442  
1443  // -------------------------------------------------------------
1444  
1445  	function tag_category2()
1446      {
1447          global $step, $endform, $tag_name;
1448  
1449          $atts = gpsa(array(
1450              'class',
1451              'link',
1452              'title',
1453              'section',
1454              'this_section',
1455              'wraptag'
1456          ));
1457  
1458          extract($atts);
1459  
1460          $out = form(
1461              startTable('tagbuilder').
1462              tr(
1463                  tdcs(
1464                      hed(gTxt('tag_'.$tag_name), 3)
1465                  , 2)
1466              ).
1467  
1468              tagRow('title',
1469                  yesno_pop('title', $title)).
1470  
1471              tagRow('link_to_this_category',
1472                  yesno_pop('link', $link)).
1473  
1474              tagRow('section',
1475                  section_pop('section', $section)).
1476  
1477              tagRow('this_section',
1478                  yesno_pop('this_section', $this_section)).
1479  
1480              tagRow('wraptag',
1481                  input_tag('wraptag', $wraptag)).
1482  
1483              tagRow('class',
1484                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1485  
1486              $endform
1487          );
1488  
1489          if ($step == 'build')
1490          {
1491              $out .= tdb(tb($tag_name, $atts));
1492          }
1493  
1494          return $out;
1495      }
1496  
1497  // -------------------------------------------------------------
1498  
1499  	function tag_category()
1500      {
1501          global $step, $endform, $tag_name;
1502  
1503          $atts = gpsa(array(
1504              'class',
1505              'link',
1506              'name',
1507              'this_section',
1508              'title',
1509              'type',
1510              'url',
1511              'wraptag'
1512          ));
1513  
1514          extract($atts);
1515  
1516          $out = form(
1517              startTable('tagbuilder').
1518  
1519              tr(
1520                  tdcs(
1521                      hed(gTxt('tag_'.$tag_name), 3)
1522                  , 2)
1523              ).
1524  
1525              tagRow('name',
1526                  fInput('text', 'name', $name, '', '', '', INPUT_REGULAR)).
1527  
1528              tagRow('link_to_this_category',
1529                  yesno_pop('link', $link)).
1530  
1531              tagRow('title',
1532                  yesno_pop('title', $title)).
1533  
1534              tagRow('type',
1535                  type_pop('type', $type)).
1536  
1537              tagRow('url_only',
1538                  yesno_pop('url', $url)).
1539  
1540              tagRow('wraptag',
1541                  input_tag('wraptag', $wraptag)).
1542  
1543              tagRow('class',
1544                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1545  
1546              $endform
1547          );
1548  
1549          if ($step == 'build')
1550          {
1551              $out .= tdb(tb($tag_name, $atts));
1552          }
1553  
1554          return $out;
1555      }
1556  
1557  // -------------------------------------------------------------
1558  
1559  	function tag_if_category()
1560      {
1561          global $step, $endform, $tag_name;
1562  
1563          $atts = gpsa(array(
1564              'name'
1565          ));
1566  
1567          extract($atts);
1568  
1569          $out = form(
1570              startTable('tagbuilder').
1571  
1572              tr(
1573                  tdcs(
1574                      hed(gTxt('tag_'.$tag_name), 3)
1575                  , 2)
1576              ).
1577  
1578              tagRow('name',
1579                  fInput('text', 'name', $name, '', '', '', INPUT_REGULAR)).
1580  
1581              $endform
1582          );
1583  
1584          if ($step == 'build')
1585          {
1586              $out .= tdb(tb($tag_name, $atts, gTxt('...')));
1587          }
1588  
1589          return $out;
1590      }
1591  
1592  // -------------------------------------------------------------
1593  
1594  	function tag_section()
1595      {
1596          global $step, $endform, $tag_name;
1597  
1598          $atts = gpsa(array(
1599              'class',
1600              'link',
1601              'name',
1602              'title',
1603              'url',
1604              'wraptag'
1605          ));
1606  
1607          extract($atts);
1608  
1609          $out = form(
1610              startTable('tagbuilder').
1611  
1612              tr(
1613                  tdcs(
1614                      hed(gTxt('tag_'.$tag_name), 3)
1615                  , 2)
1616              ).
1617  
1618              tagRow('name',
1619                  section_pop('name', $tag_name)).
1620  
1621              tagRow('link_to_this_section',
1622                  yesno_pop('link', $link)).
1623  
1624              tagRow('url_only',
1625                  yesno_pop('url', $url)).
1626  
1627              tagRow('wraptag',
1628                  input_tag('wraptag', $wraptag)).
1629  
1630              tagRow('class',
1631                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1632  
1633              $endform
1634          );
1635  
1636          if ($step == 'build')
1637          {
1638              $out .= tdb(tb($tag_name, $atts));
1639          }
1640  
1641          return $out;
1642      }
1643  
1644  // -------------------------------------------------------------
1645  
1646  	function tag_if_section()
1647      {
1648          global $step, $endform, $tag_name;
1649  
1650          $atts = gpsa(array(
1651              'name'
1652          ));
1653  
1654          extract($atts);
1655  
1656          $out = form(
1657              startTable('tagbuilder').
1658  
1659              tr(
1660                  tdcs(
1661                      hed(gTxt('tag_'.$tag_name), 3)
1662                  , 2)
1663              ).
1664  
1665              tagRow('name',
1666                  section_pop('name', $tag_name)).
1667  
1668              $endform
1669          );
1670  
1671          if ($step == 'build')
1672          {
1673              $out .= tdb(tb($tag_name, $atts, gTxt('...')));
1674          }
1675  
1676          return $out;
1677      }
1678  
1679  // -------------------------------------------------------------
1680  
1681  	function tag_author()
1682      {
1683          global $step, $endform, $tag_name;
1684  
1685          $atts = gpsa(array(
1686              'link',
1687              'section',
1688              'this_section'
1689          ));
1690  
1691          extract($atts);
1692  
1693          $out = form(
1694              startTable('tagbuilder').
1695  
1696              tr(
1697                  tdcs(
1698                      hed(gTxt('tag_'.$tag_name), 3)
1699                  , 2)
1700              ).
1701  
1702              tagRow('link_to_this_author',
1703                  yesno_pop('link', $link)).
1704  
1705              tagRow('section',
1706                  section_pop('section', $section)).
1707  
1708              tagRow('this_section',
1709                  yesno_pop('this_section', $this_section)).
1710  
1711              $endform
1712          );
1713  
1714          if ($step == 'build')
1715          {
1716              $out .= tdb(tb($tag_name, $atts));
1717          }
1718  
1719          return $out;
1720      }
1721  
1722  // -------------------------------------------------------------
1723  
1724  	function tag_link_to_home()
1725      {
1726          global $step, $endform, $tag_name;
1727  
1728          $atts = gpsa(array(
1729              'class',
1730          ));
1731  
1732          extract($atts);
1733  
1734          $thing = gps('thing');
1735  
1736          $out = form(
1737              startTable('tagbuilder').
1738  
1739              tr(
1740                  tdcs(
1741                      hed(gTxt('tag_'.$tag_name), 3)
1742                  , 2)
1743              ).
1744  
1745              tagRow('link_text',
1746                  fInput('text', 'thing', ($thing ? $thing : gTxt('tag_home')), '', '', '', INPUT_REGULAR)).
1747  
1748              tagRow('class',
1749                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1750  
1751              $endform
1752          );
1753  
1754          if ($step == 'build')
1755          {
1756              $out .= tdb(tb($tag_name, $atts, $thing));
1757          }
1758  
1759          return $out;
1760      }
1761  
1762  // -------------------------------------------------------------
1763  
1764  	function tag_link_to_prev()
1765      {
1766          global $step, $endform, $tag_name;
1767  
1768          $atts = gpsa(array(
1769              'showalways',
1770          ));
1771  
1772          extract($atts);
1773  
1774          $thing = gps('thing');
1775  
1776          $out = form(
1777              startTable('tagbuilder').
1778  
1779              tr(
1780                  tdcs(
1781                      hed(gTxt('tag_'.$tag_name), 3)
1782                  , 2)
1783              ).
1784  
1785              tagRow('link_text',
1786                  fInput('text', 'thing', ($thing ? $thing : '<txp:prev_title />'), '', '', '', INPUT_REGULAR)).
1787  
1788              tagRow('showalways',
1789                  yesno_pop('showalways', $showalways)).
1790  
1791              $endform
1792          );
1793  
1794          if ($step == 'build')
1795          {
1796              $out .= tdb(tb($tag_name, $atts, $thing));
1797          }
1798  
1799          return $out;
1800      }
1801  
1802  // -------------------------------------------------------------
1803  
1804  	function tag_link_to_next()
1805      {
1806          global $step, $endform, $tag_name;
1807  
1808          $atts = gpsa(array(
1809              'showalways',
1810          ));
1811  
1812          extract($atts);
1813  
1814          $thing = gps('thing');
1815  
1816          $out = form(
1817              startTable('tagbuilder').
1818  
1819              tr(
1820                  tdcs(
1821                      hed(gTxt('tag_'.$tag_name), 3)
1822                  , 2)
1823              ).
1824  
1825              tagRow('link_text',
1826                  fInput('text', 'thing', ($thing ? $thing : '<txp:next_title />'), '', '', '', INPUT_REGULAR)).
1827  
1828              tagRow('showalways',
1829                  yesno_pop('showalways', $showalways)).
1830  
1831              $endform
1832          );
1833  
1834          if ($step == 'build')
1835          {
1836              $out .= tdb(tb($tag_name, $atts, $thing));
1837          }
1838  
1839          return $out;
1840      }
1841  
1842  // -------------------------------------------------------------
1843  
1844  	function tag_feed_link()
1845      {
1846          global $step, $endform, $tag_name;
1847  
1848          $atts = gpsa(array(
1849              'category',
1850              'class',
1851              'flavor',
1852              'format',
1853              'label',
1854              'limit',
1855              'section',
1856              'title',
1857              'wraptag',
1858          ));
1859  
1860          extract($atts);
1861  
1862          $label = $label ? $label : 'XML';
1863  
1864          $out = form(
1865              startTable('tagbuilder').
1866  
1867              tr(
1868                  tdcs(
1869                      hed(gTxt('tag_'.$tag_name), 3)
1870                  , 2)
1871              ).
1872  
1873              tagRow('flavor',
1874                  feed_flavor_pop($flavor)).
1875  
1876              tagRow('format',
1877                  feed_format_pop($format)).
1878  
1879              tagRow('section',
1880                  section_pop('section', $section)).
1881  
1882              tagRow('category',
1883                  article_category_pop($section)).
1884  
1885              tagRow('limit',
1886                  input_limit($limit)).
1887  
1888              tagRow('label',
1889                  fInput('text', 'label', $label, '', '', '', INPUT_REGULAR)).
1890  
1891              tagRow('title',
1892                  fInput('text', 'title', $title, '', '', '', INPUT_REGULAR)).
1893  
1894              tagRow('wraptag',
1895                  input_tag('wraptag', $wraptag)).
1896  
1897              tagRow('class',
1898                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1899  
1900              $endform
1901          );
1902  
1903          if ($step == 'build')
1904          {
1905              $out .= tdb(tb($tag_name, $atts));
1906          }
1907  
1908          return $out;
1909      }
1910  
1911  // -------------------------------------------------------------
1912  
1913  	function tag_link_feed_link()
1914      {
1915          global $step, $endform, $tag_name;
1916  
1917          $atts = gpsa(array(
1918              'category',
1919              'class',
1920              'flavor',
1921              'format',
1922              'label',
1923              'limit',
1924              'title',
1925              'wraptag'
1926          ));
1927  
1928          extract($atts);
1929  
1930          $label = (!$label) ? 'XML' : $label;
1931  
1932          $out = form(
1933              startTable('tagbuilder').
1934  
1935              tr(
1936                  tdcs(
1937                      hed(gTxt('tag_'.$tag_name), 3)
1938                  , 2)
1939              ).
1940  
1941              tagRow('flavor',
1942                  feed_flavor_pop($flavor)).
1943  
1944              tagRow('format',
1945                  feed_format_pop($format)).
1946  
1947              tagRow('category',
1948                  link_category_pop($category)).
1949  
1950              tagRow('limit',
1951                  fInput('text', 'limit', $limit, '', '', '', INPUT_TINY)).
1952  
1953              tagRow('label',
1954                  fInput('text', 'label', $label, '', '', '', INPUT_REGULAR)).
1955  
1956              tagRow('title',
1957                  fInput('text', 'title', $title, '', '', '', INPUT_REGULAR)).
1958  
1959              tagRow('wraptag',
1960                  input_tag('wraptag', $wraptag)).
1961  
1962              tagRow('class',
1963                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
1964  
1965              $endform
1966          );
1967  
1968          if ($step == 'build')
1969          {
1970              $out .= tdb(tb($tag_name, $atts));
1971          }
1972  
1973          return $out;
1974      }
1975  
1976  // -------------------------------------------------------------
1977  
1978  	function tag_permlink()
1979      {
1980          global $step, $endform, $tag_name;
1981  
1982          $atts = gpsa(array(
1983              'class',
1984              'id',
1985              'style',
1986              'title'
1987          ));
1988  
1989          extract($atts);
1990  
1991          $thing = gps('thing');
1992  
1993          $out = form(
1994              startTable('tagbuilder').
1995  
1996              tr(
1997                  tdcs(
1998                      hed(gTxt('tag_'.$tag_name), 3)
1999                  , 2)
2000              ).
2001  
2002              tagRow('id',
2003                  input_id($id)).
2004  
2005              tagRow('link_text',
2006                  fInput('text', 'thing', ($thing ? $thing : '<txp:title />'), '', '', '', INPUT_REGULAR)).
2007  
2008              tagRow('title',
2009                  fInput('text', 'title', $title, '', '', '', INPUT_REGULAR)).
2010  
2011              tagRow('class',
2012                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
2013  
2014              tagRow('inline_style',
2015                  fInput('text', 'style', $style, '', '', '', INPUT_REGULAR)).
2016  
2017              $endform
2018          );
2019  
2020          if ($step == 'build')
2021          {
2022              $out .= tdb(tb($tag_name, $atts, $thing));
2023          }
2024  
2025          return $out;
2026      }
2027  
2028  // -------------------------------------------------------------
2029  
2030  	function tag_newer()
2031      {
2032          global $step, $endform, $tag_name;
2033  
2034          $thing = gps('thing');
2035  
2036          $out = form(
2037              startTable('tagbuilder').
2038  
2039              tr(
2040                  tdcs(
2041                      hed(gTxt('tag_'.$tag_name), 3)
2042                  , 2)
2043              ).
2044  
2045              tagRow('link_text',
2046                  fInput('text', 'thing', ($thing ? $thing : '<txp:text item="newer" />'), '', '', '', INPUT_REGULAR)).
2047  
2048              $endform
2049          );
2050  
2051          if ($step == 'build')
2052          {
2053              $out .= tdb(tb($tag_name, array(), $thing));
2054          }
2055  
2056          return $out;
2057      }
2058  
2059  // -------------------------------------------------------------
2060  
2061  	function tag_older()
2062      {
2063          global $step, $endform, $tag_name;
2064  
2065          $thing = gps('thing');
2066  
2067          $out = form(
2068              startTable('tagbuilder').
2069  
2070              tr(
2071                  tdcs(
2072                      hed(gTxt('tag_'.$tag_name), 3)
2073                  , 2)
2074              ).
2075  
2076              tagRow('link_text',
2077                  fInput('text', 'thing', ($thing ? $thing : '<txp:text item="older" />'), '', '', '', INPUT_REGULAR)).
2078  
2079              $endform
2080          );
2081  
2082          if ($step == 'build')
2083          {
2084              $out .= tdb(tb($tag_name, array(), $thing));
2085          }
2086  
2087          return $out;
2088      }
2089  
2090  // -------------------------------------------------------------
2091  
2092  	function tag_next_title()
2093      {
2094          global $step, $endform, $tag_name;
2095  
2096          return form(
2097              startTable('tagbuilder').
2098  
2099              tr(
2100                  tdcs(
2101                      hed(gTxt('tag_'.$tag_name), 3)
2102                  , 2)
2103              ).
2104  
2105              n.endTable()
2106          ).
2107  
2108          tdb(tb($tag_name));
2109      }
2110  
2111  // -------------------------------------------------------------
2112  
2113  	function tag_site_name()
2114      {
2115          global $step, $endform, $tag_name;
2116  
2117          return form(
2118              startTable('tagbuilder').
2119  
2120              tr(
2121                  tdcs(
2122                      hed(gTxt('tag_'.$tag_name), 3)
2123                  , 2)
2124              ).
2125  
2126              n.endTable()
2127          ).
2128  
2129          tdb(tb($tag_name));
2130      }
2131  
2132  // -------------------------------------------------------------
2133  
2134  	function tag_site_slogan()
2135      {
2136          global $step, $endform, $tag_name;
2137  
2138          return form(
2139              startTable('tagbuilder').
2140  
2141              tr(
2142                  tdcs(
2143                      hed(gTxt('tag_'.$tag_name), 3)
2144                  , 2)
2145              ).
2146  
2147              n.endTable()
2148          ).
2149  
2150          tdb(tb($tag_name));
2151      }
2152  
2153  // -------------------------------------------------------------
2154  
2155  	function tag_prev_title()
2156      {
2157          global $step, $endform, $tag_name;
2158  
2159          return form(
2160              startTable('tagbuilder').
2161  
2162              tr(
2163                  tdcs(
2164                      hed(gTxt('tag_'.$tag_name), 3)
2165                  , 2)
2166              ).
2167  
2168              n.endTable()
2169          ).
2170  
2171          tdb(tb($tag_name));
2172      }
2173  
2174  // -------------------------------------------------------------
2175  
2176  	function tag_article_image()
2177      {
2178          global $step, $endform, $tag_name;
2179  
2180          $atts = gpsa(array(
2181              'class',
2182              'escape',
2183              'height',
2184              'html_id',
2185              'style',
2186              'thumbnail',
2187              'width',
2188              'wraptag',
2189          ));
2190  
2191          extract($atts);
2192  
2193          $out = form(
2194              startTable('tagbuilder').
2195  
2196              tr(
2197                  tdcs(
2198                      hed(gTxt('tag_'.$tag_name), 3)
2199                  , 2)
2200              ).
2201  
2202              tagRow('use_thumbnail',
2203                  yesno_pop('thumbnail', $thumbnail)).
2204  
2205              tagRow('escape',
2206                  escape_pop($escape)).
2207  
2208              tagRow('html_id',
2209                  fInput('text', 'html_id', $html_id, '', '', '', INPUT_REGULAR)).
2210  
2211              tagRow('class',
2212                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
2213  
2214              tagRow('inline_style',
2215                  fInput('text', 'style', $style, '', '', '', INPUT_REGULAR)).
2216  
2217              tagRow('wraptag',
2218                  fInput('text', 'wraptag', $wraptag, '', '', '', INPUT_REGULAR)).
2219  
2220              $endform
2221          );
2222  
2223          if ($step == 'build')
2224          {
2225              $out .= tdb(tb($tag_name, $atts));
2226          }
2227  
2228          return $out;
2229      }
2230  
2231  // -------------------------------------------------------------
2232  
2233  	function tag_css()
2234      {
2235          global $step, $endform, $tag_name;
2236  
2237          $atts = gpsa(array(
2238              'format',
2239              'media',
2240              'name',
2241              'rel',
2242              'title'
2243          ));
2244  
2245          extract($atts);
2246  
2247          $out = form(
2248              startTable('tagbuilder').
2249  
2250              tr(
2251                  tdcs(
2252                      hed(gTxt('tag_'.$tag_name), 3)
2253                  , 2)
2254              ).
2255  
2256              tagRow('name',
2257                  css_pop($name)).
2258  
2259              tagRow('format',
2260                  css_format_pop($format)).
2261  
2262              tagRow('media',
2263                  fInput('text', 'media', $media, '', '', '', INPUT_REGULAR)).
2264  
2265              tagRow('rel',
2266                  fInput('text', 'rel', $rel, '', '', '', INPUT_REGULAR)).
2267  
2268              tagRow('title',
2269                  fInput('text', 'title', $title, '', '', '', INPUT_REGULAR)).
2270  
2271              $endform
2272          );
2273  
2274          if ($step == 'build')
2275          {
2276              $out .= tdb(tb($tag_name, $atts));
2277          }
2278  
2279          return $out;
2280      }
2281  
2282  // -------------------------------------------------------------
2283  
2284  	function tag_body()
2285      {
2286          global $step, $endform, $tag_name;
2287  
2288          return form(
2289              startTable('tagbuilder').
2290  
2291              tr(
2292                  tdcs(
2293                      hed(gTxt('tag_'.$tag_name), 3)
2294                  , 2)
2295              ).
2296  
2297              n.endTable()
2298          ).
2299  
2300          tdb(tb($tag_name));
2301      }
2302  
2303  // -------------------------------------------------------------
2304  
2305  	function tag_excerpt()
2306      {
2307          global $step, $endform, $tag_name;
2308  
2309          return form(
2310              startTable('tagbuilder').
2311  
2312              tr(
2313                  tdcs(
2314                      hed(gTxt('tag_'.$tag_name), 3)
2315                  , 2)
2316              ).
2317  
2318              n.endTable()
2319          ).
2320  
2321          tdb(tb($tag_name));
2322      }
2323  
2324  // -------------------------------------------------------------
2325  
2326  	function tag_title()
2327      {
2328          global $step, $endform, $tag_name;
2329  
2330          return form(
2331              startTable('tagbuilder').
2332  
2333              tr(
2334                  tdcs(
2335                      hed(gTxt('tag_'.$tag_name), 3)
2336                  , 2)
2337              ).
2338  
2339              n.endTable()
2340          ).
2341  
2342          tdb(tb($tag_name));
2343      }
2344  
2345  // -------------------------------------------------------------
2346  
2347  	function tag_link()
2348      {
2349          global $step, $endform, $tag_name;
2350  
2351          $atts = gpsa(array(
2352              'rel'
2353          ));
2354  
2355          extract($atts);
2356  
2357          $out = form(
2358              startTable('tagbuilder').
2359  
2360              tr(
2361                  tdcs(
2362                      hed(gTxt('tag_'.$tag_name), 3)
2363                  , 2)
2364              ).
2365  
2366              tagRow('rel',
2367                  fInput('text', 'rel', $rel, '', '', '', INPUT_REGULAR)).
2368  
2369              $endform
2370          );
2371  
2372          if ($step == 'build')
2373          {
2374              $out .= tdb(tb($tag_name, $atts));
2375          }
2376  
2377          return $out;
2378      }
2379  
2380  // -------------------------------------------------------------
2381  
2382  	function tag_linkdesctitle()
2383      {
2384          global $step, $endform, $tag_name;
2385  
2386          $atts = gpsa(array(
2387              'rel'
2388          ));
2389  
2390          extract($atts);
2391  
2392          $out = form(
2393              startTable('tagbuilder').
2394  
2395              tr(
2396                  tdcs(
2397                      hed(gTxt('tag_'.$tag_name), 3)
2398                  , 2)
2399              ).
2400  
2401              tagRow('rel',
2402                  fInput('text', 'rel', $rel, '', '', '', INPUT_REGULAR)).
2403  
2404              $endform
2405          );
2406  
2407          if ($step == 'build')
2408          {
2409              $out .= tdb(tb($tag_name, $atts));
2410          }
2411  
2412          return $out;
2413      }
2414  
2415  // -------------------------------------------------------------
2416  
2417  	function tag_link_description()
2418      {
2419          global $step, $endform, $tag_name;
2420  
2421          $atts = gpsa(array(
2422              'class',
2423              'escape',
2424              'label',
2425              'labeltag',
2426              'wraptag'
2427          ));
2428  
2429          extract($atts);
2430  
2431          $out = form(
2432              startTable('tagbuilder').
2433  
2434              tr(
2435                  tdcs(
2436                      hed(gTxt('tag_'.$tag_name), 3)
2437                  , 2)
2438              ).
2439  
2440              tagRow('escape',
2441                  escape_pop($escape)).
2442  
2443              tagRow('label',
2444                  fInput('text', 'label', $label, '', '', '', INPUT_REGULAR)).
2445  
2446              tagRow('labeltag',
2447                  input_tag('labeltag', $labeltag)).
2448  
2449              tagRow('wraptag',
2450                  input_tag('wraptag', $wraptag)).
2451  
2452              tagRow('class',
2453                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
2454  
2455              $endform
2456          );
2457  
2458          if ($step == 'build')
2459          {
2460              $out .= tdb(tb($tag_name, $atts));
2461          }
2462  
2463          return $out;
2464      }
2465  
2466  // -------------------------------------------------------------
2467  
2468  	function tag_link_name()
2469      {
2470          global $step, $endform, $tag_name;
2471  
2472          $atts = gpsa(array(
2473              'escape',
2474          ));
2475  
2476          extract($atts);
2477  
2478          $out = form(
2479              startTable('tagbuilder').
2480  
2481              tr(
2482                  tdcs(
2483                      hed(gTxt('tag_'.$tag_name), 3)
2484                  , 2)
2485              ).
2486  
2487              tagRow('escape',
2488                  escape_pop($escape)).
2489  
2490              $endform
2491          );
2492  
2493          if ($step == 'build')
2494          {
2495              $out .= tdb(tb($tag_name, $atts));
2496          }
2497  
2498          return $out;
2499      }
2500  
2501  // -------------------------------------------------------------
2502  
2503  	function tag_link_category()
2504      {
2505          global $step, $endform, $tag_name;
2506  
2507          $atts = gpsa(array(
2508              'class',
2509              'label',
2510              'labeltag',
2511              'title',
2512              'wraptag'
2513          ));
2514  
2515          extract($atts);
2516  
2517          $out = form(
2518              startTable('tagbuilder').
2519  
2520              tr(
2521                  tdcs(
2522                      hed(gTxt('tag_'.$tag_name), 3)
2523                  , 2)
2524              ).
2525  
2526              tagRow('title',
2527                  yesno_pop('title', $title)).
2528  
2529              tagRow('label',
2530                  fInput('text', 'label', $label, '', '', '', INPUT_REGULAR)).
2531  
2532              tagRow('labeltag',
2533                  input_tag('labeltag', $labeltag)).
2534  
2535              tagRow('wraptag',
2536                  input_tag('wraptag', $wraptag)).
2537  
2538              tagRow('class',
2539                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
2540  
2541              $endform
2542          );
2543  
2544          if ($step == 'build')
2545          {
2546              $out .= tdb(tb($tag_name, $atts));
2547          }
2548  
2549          return $out;
2550      }
2551  
2552  // -------------------------------------------------------------
2553  
2554  	function tag_link_date()
2555      {
2556          global $step, $endform, $tag_name;
2557  
2558          $atts = gpsa(array(
2559              'format',
2560              'gmt',
2561              'lang'
2562          ));
2563  
2564          extract($atts);
2565  
2566          $out = form(
2567              startTable('tagbuilder').
2568  
2569              tr(
2570                  tdcs(
2571                      hed(gTxt('tag_'.$tag_name), 3)
2572                  , 2)
2573              ).
2574  
2575              tagRow('time_format',
2576                  fInput('text', 'format', $format, '', '', '', INPUT_REGULAR)).
2577  
2578              tagRow('gmt',
2579                  yesno_pop('gmt', $gmt)).
2580  
2581              tagRow('locale',
2582                  fInput('text', 'lang', $lang, '', '', '', INPUT_REGULAR)).
2583  
2584              $endform
2585          );
2586  
2587          if ($step == 'build')
2588          {
2589              $out .= tdb(tb($tag_name, $atts));
2590          }
2591  
2592          return $out;
2593      }
2594  
2595  // -------------------------------------------------------------
2596  
2597  	function tag_posted()
2598      {
2599          global $step, $endform, $tag_name;
2600  
2601          $atts = gpsa(array(
2602              'format',
2603              'gmt',
2604              'lang'
2605          ));
2606  
2607          extract($atts);
2608  
2609          $out = form(
2610              startTable('tagbuilder').
2611  
2612              tr(
2613                  tdcs(
2614                      hed(gTxt('tag_'.$tag_name), 3)
2615                  , 2)
2616              ).
2617  
2618              tagRow('time_format',
2619                  fInput('text', 'format', $format, '', '', '', INPUT_REGULAR)).
2620  
2621              tagRow('gmt',
2622                  yesno_pop('gmt', $gmt)).
2623  
2624              tagRow('locale',
2625                  fInput('text', 'lang', $lang, '', '', '', INPUT_REGULAR)).
2626  
2627              $endform
2628          );
2629  
2630          if ($step == 'build')
2631          {
2632              $out .= tdb(tb($tag_name, $atts));
2633          }
2634  
2635          return $out;
2636      }
2637  
2638  // -------------------------------------------------------------
2639  
2640  	function tag_comments_invite()
2641      {
2642          global $step, $endform, $tag_name;
2643  
2644          $atts = gpsa(array(
2645              'class',
2646              'showcount',
2647              'textonly',
2648              'wraptag'
2649          ));
2650  
2651          extract($atts);
2652  
2653          $out = form(
2654              startTable('tagbuilder').
2655  
2656              tr(
2657                  tdcs(
2658                      hed(gTxt('tag_'.$tag_name), 3)
2659                  , 2)
2660              ).
2661  
2662              tagRow('textonly',
2663                  yesno_pop('textonly', $textonly)).
2664  
2665              tagRow('showcount',
2666                  yesno_pop('showcount', $showcount)).
2667  
2668              tagRow('wraptag',
2669                  input_tag('wraptag', $wraptag)).
2670  
2671              tagRow('class',
2672                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
2673  
2674              $endform
2675          );
2676  
2677          if ($step == 'build')
2678          {
2679              $out .= tdb(tb($tag_name, $atts));
2680          }
2681  
2682          return $out;
2683      }
2684  
2685  // -------------------------------------------------------------
2686  
2687  	function tag_comment_permlink()
2688      {
2689          global $step, $endform, $tag_name;
2690  
2691          return form(
2692              startTable('tagbuilder').
2693  
2694              tr(
2695                  tdcs(
2696                      hed(gTxt('tag_'.$tag_name), 3)
2697                  , 2)
2698              ).
2699  
2700              n.endTable()
2701          ).
2702  
2703          tdb(tb($tag_name));
2704      }
2705  
2706  // -------------------------------------------------------------
2707  
2708  	function tag_comment_time()
2709      {
2710          global $step, $endform, $tag_name;
2711  
2712          $atts = gpsa(array(
2713              'format',
2714              'gmt',
2715              'lang'
2716          ));
2717  
2718          extract($atts);
2719  
2720          $out = form(
2721              startTable('tagbuilder').
2722  
2723              tr(
2724                  tdcs(
2725                      hed(gTxt('tag_'.$tag_name), 3)
2726                  , 2)
2727              ).
2728  
2729              tagRow('time_format',
2730                  fInput('text', 'format', $format, '', '', '', INPUT_REGULAR)).
2731  
2732              tagRow('gmt',
2733                  yesno_pop('gmt', $gmt)).
2734  
2735              tagRow('locale',
2736                  fInput('text', 'lang', $lang, '', '', '', INPUT_REGULAR)).
2737  
2738              $endform
2739          );
2740  
2741          if ($step == 'build')
2742          {
2743              $out .= tdb(tb($tag_name, $atts));
2744          }
2745  
2746          return $out;
2747      }
2748  
2749  // -------------------------------------------------------------
2750  
2751  	function tag_comment_name()
2752      {
2753          global $step, $endform, $tag_name;
2754  
2755          $atts = gpsa(array(
2756              'link'
2757          ));
2758  
2759          extract($atts);
2760  
2761          $out = form(
2762              startTable('tagbuilder').
2763  
2764              tr(
2765                  tdcs(
2766                      hed(gTxt('tag_'.$tag_name), 3)
2767                  , 2)
2768              ).
2769  
2770              tagRow('comment_name_link',
2771                  yesno_pop('link', $link)).
2772  
2773              $endform
2774          );
2775  
2776          if ($step == 'build')
2777          {
2778              $out .= tdb(tb($tag_name, $atts));
2779          }
2780  
2781          return $out;
2782      }
2783  
2784  // -------------------------------------------------------------
2785  
2786  	function tag_comment_email()
2787      {
2788          global $step, $endform, $tag_name;
2789  
2790          return form(
2791              startTable('tagbuilder').
2792  
2793              tr(
2794                  tdcs(
2795                      hed(gTxt('tag_'.$tag_name), 3)
2796                  , 2)
2797              ).
2798  
2799              n.endTable()
2800          ).
2801  
2802          tdb(tb($tag_name));
2803      }
2804  
2805  // -------------------------------------------------------------
2806  
2807  	function tag_comment_web()
2808      {
2809          global $step, $endform, $tag_name;
2810  
2811          return form(
2812              startTable('tagbuilder').
2813  
2814              tr(
2815                  tdcs(
2816                      hed(gTxt('tag_'.$tag_name), 3)
2817                  , 2)
2818              ).
2819  
2820              n.endTable()
2821          ).
2822  
2823          tdb(tb($tag_name));
2824      }
2825  
2826  // -------------------------------------------------------------
2827  
2828  	function tag_comment_message()
2829      {
2830          global $step, $endform, $tag_name;
2831  
2832          return form(
2833              startTable('tagbuilder').
2834  
2835              tr(
2836                  tdcs(
2837                      hed(gTxt('tag_'.$tag_name), 3)
2838                  , 2)
2839              ).
2840  
2841              n.endTable()
2842          ).
2843  
2844          tdb(tb($tag_name));
2845      }
2846  
2847  // -------------------------------------------------------------
2848  
2849  	function tag_comment_email_input()
2850      {
2851          global $step, $endform, $tag_name;
2852  
2853          return form(
2854              startTable('tagbuilder').
2855  
2856              tr(
2857                  tdcs(
2858                      hed(gTxt('tag_'.$tag_name), 3)
2859                  , 2)
2860              ).
2861  
2862              n.endTable()
2863          ).
2864  
2865          tdb(tb($tag_name));
2866      }
2867  
2868  // -------------------------------------------------------------
2869  
2870  	function tag_comment_message_input()
2871      {
2872          global $step, $endform, $tag_name;
2873  
2874          return form(
2875              startTable('tagbuilder').
2876  
2877              tr(
2878                  tdcs(
2879                      hed(gTxt('tag_'.$tag_name), 3)
2880                  , 2)
2881              ).
2882  
2883              n.endTable()
2884          ).
2885  
2886          tdb(tb($tag_name));
2887      }
2888  
2889  // -------------------------------------------------------------
2890  
2891  	function tag_comment_name_input()
2892      {
2893          global $step, $endform, $tag_name;
2894  
2895          return form(
2896              startTable('tagbuilder').
2897  
2898              tr(
2899                  tdcs(
2900                      hed(gTxt('tag_'.$tag_name), 3)
2901                  , 2)
2902              ).
2903  
2904              n.endTable()
2905          ).
2906  
2907          tdb(tb($tag_name));
2908      }
2909  
2910  // -------------------------------------------------------------
2911  
2912  	function tag_comment_preview()
2913      {
2914          global $step, $endform, $tag_name;
2915  
2916          return form(
2917              startTable('tagbuilder').
2918  
2919              tr(
2920                  tdcs(
2921                      hed(gTxt('tag_'.$tag_name), 3)
2922                  , 2)
2923              ).
2924  
2925              n.endTable()
2926          ).
2927  
2928          tdb(tb($tag_name));
2929      }
2930  
2931  // -------------------------------------------------------------
2932  
2933  	function tag_comment_remember()
2934      {
2935          global $step, $endform, $tag_name;
2936  
2937          return form(
2938              startTable('tagbuilder').
2939  
2940              tr(
2941                  tdcs(
2942                      hed(gTxt('tag_'.$tag_name), 3)
2943                  , 2)
2944              ).
2945  
2946              n.endTable()
2947          ).
2948  
2949          tdb(tb($tag_name));
2950      }
2951  
2952  // -------------------------------------------------------------
2953  
2954  	function tag_comment_submit()
2955      {
2956          global $step, $endform, $tag_name;
2957  
2958          return form(
2959              startTable('tagbuilder').
2960  
2961              tr(
2962                  tdcs(
2963                      hed(gTxt('tag_'.$tag_name), 3)
2964                  , 2)
2965              ).
2966  
2967              n.endTable()
2968          ).
2969  
2970          tdb(tb($tag_name));
2971      }
2972  
2973  // -------------------------------------------------------------
2974  
2975  	function tag_comment_web_input()
2976      {
2977          global $step, $endform, $tag_name;
2978  
2979          return form(
2980              startTable('tagbuilder').
2981  
2982              tr(
2983                  tdcs(
2984                      hed(gTxt('tag_'.$tag_name), 3)
2985                  , 2)
2986              ).
2987  
2988              n.endTable()
2989          ).
2990  
2991          tdb(tb($tag_name));
2992      }
2993  
2994  // -------------------------------------------------------------
2995  
2996  	function tag_comments()
2997      {
2998          global $step, $endform, $tag_name;
2999  
3000          $atts = gpsa(array(
3001              'break',
3002              'breakclass',
3003              'class',
3004              'form',
3005              'limit',
3006              'offset',
3007              'sort',
3008              'wraptag'
3009          ));
3010  
3011          extract($atts);
3012  
3013          $out = form(
3014              startTable('tagbuilder').
3015  
3016              tr(
3017                  tdcs(
3018                      hed(gTxt('tag_'.$tag_name), 3)
3019                  , 2)
3020              ).
3021  
3022              tagRow('form',
3023                  form_pop('form', 'comment', $form)).
3024  
3025              tagRow('sort',
3026                  discuss_sort_pop($sort)).
3027  
3028              tagRow('limit',
3029                  input_limit($limit)).
3030  
3031              tagRow('offset',
3032                  input_offset($offset)).
3033  
3034              tagRow('wraptag',
3035                  input_tag('wraptag', $wraptag)).
3036  
3037              tagRow('class',
3038                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
3039  
3040              tagRow('break',
3041                  input_tag('break', $break)).
3042  
3043              tagRow('breakclass',
3044                  fInput('text', 'breakclass', $breakclass, '', '', '', INPUT_REGULAR)).
3045  
3046              $endform
3047          );
3048  
3049          if ($step == 'build')
3050          {
3051              $out .= tdb(tb($tag_name, $atts));
3052          }
3053  
3054          return $out;
3055      }
3056  
3057  // -------------------------------------------------------------
3058  
3059  	function tag_comments_form()
3060      {
3061          global $step, $endform, $tag_name;
3062  
3063          $atts = gpsa(array(
3064              'class',
3065              'id',
3066              'isize',
3067              'form',
3068              'msgcols',
3069              'msgrows',
3070              'wraptag'
3071          ));
3072  
3073          extract($atts);
3074  
3075          $out = form(
3076              startTable('tagbuilder').
3077  
3078              tr(
3079                  tdcs(
3080                      hed(gTxt('tag_'.$tag_name), 3)
3081                  , 2)
3082              ).
3083  
3084              tagRow('id',
3085                  input_id($id)).
3086  
3087              tagRow('isize',
3088                  fInput('text', 'isize', $isize, '', '', '', 2)).
3089  
3090              tagRow('msgcols',
3091                  fInput('text', 'msgcols', $msgcols, '', '', '', 2)).
3092  
3093              tagRow('msgrows',
3094                  fInput('text', 'msgrows', $msgrows, '', '', '', 2)).
3095  
3096              tagRow('form',
3097                  form_pop('form', 'comment', $form)).
3098  
3099              tagRow('wraptag',
3100                  input_tag('wraptag', $wraptag)).
3101  
3102              tagRow('class',
3103                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
3104  
3105              $endform
3106          );
3107  
3108          if ($step == 'build')
3109          {
3110              $out .= tdb(tb($tag_name, $atts));
3111          }
3112  
3113          return $out;
3114      }
3115  
3116  // -------------------------------------------------------------
3117  
3118  	function tag_comments_preview()
3119      {
3120          global $step, $endform, $tag_name;
3121  
3122          $atts = gpsa(array(
3123              'class',
3124              'id',
3125              'form',
3126              'wraptag'
3127          ));
3128  
3129          extract($atts);
3130  
3131          $out = form(
3132              startTable('tagbuilder').
3133  
3134              tr(
3135                  tdcs(
3136                      hed(gTxt('tag_'.$tag_name), 3)
3137                  , 2)
3138              ).
3139  
3140              tagRow('id',
3141                  input_id($id)).
3142  
3143              tagRow('form',
3144                  form_pop('form', 'comment', $form)).
3145  
3146              tagRow('wraptag',
3147                  input_tag('wraptag', $wraptag)).
3148  
3149              tagRow('class',
3150                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
3151  
3152              $endform
3153          );
3154  
3155          if ($step == 'build')
3156          {
3157              $out .= tdb(tb($tag_name, $atts));
3158          }
3159  
3160          return $out;
3161      }
3162  
3163  // -------------------------------------------------------------
3164  
3165  	function tag_search_result_title()
3166      {
3167          global $step, $endform, $tag_name;
3168  
3169          return form(
3170              startTable('tagbuilder').
3171  
3172              tr(
3173                  tdcs(
3174                      hed(gTxt('tag_'.$tag_name), 3)
3175                  , 2)
3176              ).
3177  
3178              n.endTable()
3179          ).
3180  
3181          tdb(tb($tag_name));
3182      }
3183  
3184  // -------------------------------------------------------------
3185  
3186  	function tag_search_result_excerpt()
3187      {
3188          global $step, $endform, $tag_name;
3189  
3190          $atts = gpsa(array(
3191              'hilight',
3192              'limit'
3193          ));
3194  
3195          extract($atts);
3196  
3197          $out = form(
3198              startTable('tagbuilder').
3199  
3200              tr(
3201                  tdcs(
3202                      hed(gTxt('tag_'.$tag_name), 3)
3203                  , 2)
3204              ).
3205  
3206              tagRow('hilight',
3207                  input_tag('hilight', $hilight)).
3208  
3209              tagRow('hilight_limit',
3210                  input_limit($limit)).
3211  
3212              $endform
3213          );
3214  
3215          if ($step == 'build')
3216          {
3217              $out .= tdb(tb($tag_name, $atts));
3218          }
3219  
3220          return $out;
3221      }
3222  
3223  // -------------------------------------------------------------
3224  
3225  	function tag_search_result_url()
3226      {
3227          global $step, $endform, $tag_name;
3228  
3229          return form(
3230              startTable('tagbuilder').
3231  
3232              tr(
3233                  tdcs(
3234                      hed(gTxt('tag_'.$tag_name), 3)
3235                  , 2)
3236              ).
3237  
3238              n.endTable()
3239          ).
3240  
3241          tdb(tb($tag_name));
3242      }
3243  
3244  // -------------------------------------------------------------
3245  
3246  	function tag_search_result_date()
3247      {
3248          global $step, $endform, $tag_name;
3249  
3250          $atts = gpsa(array(
3251              'format',
3252              'gmt',
3253              'lang'
3254          ));
3255  
3256          extract($atts);
3257  
3258          $out = form(
3259              startTable('tagbuilder').
3260  
3261              tr(
3262                  tdcs(
3263                      hed(gTxt('tag_'.$tag_name), 3)
3264                  , 2)
3265              ).
3266  
3267              tagRow('time_format',
3268                  fInput('text', 'format', $format, '', '', '', INPUT_REGULAR)).
3269  
3270              tagRow('gmt',
3271                  yesno_pop('gmt', $gmt)).
3272  
3273              tagRow('locale',
3274                  fInput('text', 'lang', $lang, '', '', '', INPUT_REGULAR)).
3275  
3276              $endform
3277          );
3278  
3279          if ($step == 'build')
3280          {
3281              $out .= tdb(tb($tag_name, $atts));
3282          }
3283  
3284          return $out;
3285      }
3286  
3287  // -------------------------------------------------------------
3288  
3289  	function tag_lang()
3290      {
3291          global $step, $endform, $tag_name;
3292  
3293          return form(
3294              startTable('tagbuilder').
3295  
3296              tr(
3297                  tdcs(
3298                      hed(gTxt('tag_'.$tag_name), 3)
3299                  , 2)
3300              ).
3301  
3302              n.endTable()
3303          ).
3304  
3305          tdb(tb($tag_name));
3306      }
3307  
3308  // -------------------------------------------------------------
3309  
3310  	function tag_breadcrumb()
3311      {
3312          global $step, $endform, $tag_name;
3313  
3314          $atts = gpsa(array(
3315              'class',
3316              'label',
3317              'link',
3318              'linkclass',
3319              'separator',
3320              'title',
3321              'wraptag'
3322          ));
3323  
3324          extract($atts);
3325  
3326          $out = form(
3327              startTable('tagbuilder').
3328  
3329              tr(
3330                  tdcs(
3331                      hed(gTxt('tag_'.$tag_name), 3)
3332                  , 2)
3333              ).
3334  
3335              tagRow('breadcrumb_separator',
3336                  fInput('text', 'separator', $separator, '', '', '', INPUT_XSMALL)).
3337  
3338              tagRow('breadcrumb_linked',
3339                  yesno_pop('link', $link)).
3340  
3341              tagRow('linkclass',
3342                  fInput('text', 'linkclass', $linkclass, '', '', '', INPUT_REGULAR)).
3343  
3344              tagRow('label',
3345                  fInput('text', 'label', $label, '', '', '', INPUT_REGULAR)).
3346  
3347              tagRow('title',
3348                  fInput('text', 'title', $title, '', '', '', INPUT_REGULAR)).
3349  
3350              tagRow('wraptag',
3351                  input_tag('wraptag', $wraptag)).
3352  
3353              tagRow('class',
3354                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
3355  
3356              $endform
3357          );
3358  
3359          if ($step == 'build')
3360          {
3361              $out .= tdb(tb($tag_name, $atts));
3362          }
3363  
3364          return $out;
3365      }
3366  
3367  // -------------------------------------------------------------
3368  
3369  	function tag_image()
3370      {
3371          global $step, $endform, $tag_name, $img_dir;
3372  
3373          $atts = gpsa(array(
3374              'class',
3375              'html_id',
3376              'style',
3377              'wraptag',
3378  
3379              'alt',
3380              'caption',
3381              'h',
3382              'id',
3383              'w',
3384          ));
3385  
3386          extract($atts);
3387  
3388          $ext = gps('ext');
3389          $type = gps('type');
3390  
3391          $types = array(
3392              'textile'     => 'Textile',
3393              'textpattern' => 'Textpattern',
3394              'html'        => 'HTML'
3395          );
3396  
3397          $out = form(
3398              startTable('tagbuilder').
3399  
3400              tr(
3401                  tdcs(
3402                      hed(gTxt('tag_'.$tag_name), 3)
3403                  , 2)
3404              ).
3405  
3406              tagRow('type',
3407                  ''.selectInput('type', $types, ($type ? $type : 'textpattern'), true)).
3408  
3409              tagRow('html_id',
3410                  fInput('text', 'html_id', $html_id, '', '', '', INPUT_REGULAR)).
3411  
3412              tagRow('class',
3413                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
3414  
3415              tagRow('inline_style',
3416                  fInput('text', 'style', $style, '', '', '', INPUT_REGULAR)).
3417  
3418              tagRow('wraptag',
3419                  fInput('text', 'wraptag', $wraptag, '', '', '', INPUT_REGULAR)).
3420  
3421              hInput('id', $id).
3422              hInput('ext', $ext).
3423              hInput('w', $w).
3424              hInput('h', $h).
3425              hInput('alt', $alt).
3426              hInput('caption', $caption).
3427  
3428              $endform
3429          );
3430  
3431          if ($step == 'build')
3432          {
3433              $url = imagesrcurl($id, $ext);
3434  
3435              switch ($type)
3436              {
3437                  case 'textile':
3438                      $alt = ($alt) ? ' ('.$alt.')' : '';
3439                      $modifiers = '';
3440  
3441                      if ($class)
3442                      {
3443                          $modifiers .= '('.$class;
3444  
3445                          if ($html_id)
3446                          {
3447                              $modifiers .= '#'.$html_id;
3448                          }
3449  
3450                          $modifiers .= ')';
3451                      }
3452  
3453                      elseif ($html_id)
3454                      {
3455                          $modifiers .= "(#$html_id)";
3456                      }
3457  
3458                      if ($style)
3459                      {
3460                          $modifiers .= '{'.$style.'}';
3461                      }
3462  
3463                      $wraptag = ($wraptag) ? $wraptag.$modifiers . '. ' : '';
3464  
3465                      $out .= tdb(
3466                          ( ($wraptag) ? $wraptag : '') . '!'. ( ($wraptag) ? '' : $modifiers ) .$url.$alt.'!'
3467                      );
3468                  break;
3469  
3470                  case 'html':
3471                      $alt     = ' alt="'.txpspecialchars($alt).'"';
3472                      $caption = ($caption) ? ' title="'.txpspecialchars($caption).'"' : '';
3473                      $class   = ($class)   ? ' class="'.$class.'"' : '';
3474                      $html_id = ($html_id) ? ' id="'.$html_id.'"' : '';
3475                      $style   = ($style)   ? ' style="'.$style.'"' : '';
3476  
3477                      $out .= tdb(
3478                          ($wraptag ? "<$wraptag>" : '').
3479                          '<img src="'.$url.'" width="'.$w.'" height="'.$h.'"'.$alt.$caption.$html_id.$class.$style.' />'.
3480                          ($wraptag ? "</$wraptag>" : '')
3481                      );
3482                  break;
3483  
3484                  case 'textpattern':
3485                  default:
3486  
3487                      $atts = array(
3488                          'class'   => $class,
3489                          'html_id' => $html_id,
3490                          'id'      => $id,
3491                          'style'   => $style,
3492                          'wraptag' => $wraptag
3493                      );
3494  
3495                      $out .= tdb(tb($tag_name, $atts));
3496                  break;
3497              }
3498          }
3499  
3500          return $out;
3501      }
3502  
3503  // -------------------------------------------------------------
3504  
3505  	function tag_file_download()
3506      {
3507          global $step, $endform, $tag_name;
3508  
3509          $atts = gpsa(array(
3510              'form',
3511              'id'
3512          ));
3513  
3514          extract($atts);
3515  
3516          $out = form(
3517              startTable('tagbuilder').
3518  
3519              tr(
3520                  tdcs(
3521                      hed(gTxt('tag_'.$tag_name), 3)
3522                  , 2)
3523              ).
3524  
3525              tagRow('id',
3526                  input_id($id)).
3527  
3528              tagRow('form',
3529                  form_pop('form', 'file', $form)).
3530  
3531              $endform
3532          );
3533  
3534          if ($step == 'build')
3535          {
3536              $out .= tdb(tb($tag_name, $atts));
3537          }
3538  
3539          return $out;
3540      }
3541  
3542  // -------------------------------------------------------------
3543  
3544  	function tag_file_download_list()
3545      {
3546          global $step, $endform, $tag_name;
3547  
3548          $atts = gpsa(array(
3549              'break',
3550              'category',
3551              'form',
3552              'label',
3553              'labeltag',
3554              'limit',
3555              'sort',
3556              'wraptag',
3557          ));
3558  
3559          $asc = ' ('.gTxt('ascending').')';
3560          $desc = ' ('.gTxt('descending').')';
3561  
3562          $sorts = array(
3563              'filename asc'   => gTxt('file_name').$asc,
3564              'filename desc'  => gTxt('file_name').$desc,
3565              'downloads asc'  => gTxt('downloads').$asc,
3566              'downloads desc' => gTxt('downloads').$desc,
3567              'rand()'         => 'Random'
3568          );
3569  
3570          extract($atts);
3571  
3572          $out = form(
3573              startTable('tagbuilder').
3574  
3575              tr(tdcs(hed(gTxt('tag_'.$tag_name),3),2) ).
3576  
3577              tagRow('category',
3578                  file_category_pop($category)).
3579  
3580              tagRow('sort',
3581                  ' '.selectInput('sort', $sorts, $sort, true)).
3582  
3583              tagRow('limit',
3584                  input_limit($limit)).
3585  
3586              tagRow('label',
3587                  fInput('text', 'label', $label, '', '', '', INPUT_REGULAR)).
3588  
3589              tagRow('labeltag',
3590                  input_tag('labeltag', $labeltag)).
3591  
3592              tagRow('wraptag',
3593                  input_tag('wraptag',$wraptag)).
3594  
3595              tagRow('break',
3596                  input_tag('break',$break)).
3597  
3598              tagRow('form',
3599                  form_pop('form','file',$form)).
3600  
3601              $endform
3602          );
3603  
3604          if ($step == 'build')
3605          {
3606              $out .= tdb(tb($tag_name, $atts));
3607          }
3608  
3609          echo $out;
3610      }
3611  
3612  // -------------------------------------------------------------
3613  
3614  	function tag_file_download_created()
3615      {
3616          global $step, $endform, $tag_name;
3617  
3618          $atts = gpsa(array(
3619              'format'
3620          ));
3621  
3622          extract($atts);
3623  
3624          $out = form(
3625              startTable('tagbuilder').
3626  
3627              tr(
3628                  tdcs(
3629                      hed(gTxt('tag_'.$tag_name), 3)
3630                  , 2)
3631              ).
3632  
3633              tagRow('time_format',
3634                  fInput('text', 'format', $format, '', '', '', 15)).
3635  
3636              $endform
3637          );
3638  
3639          if ($step == 'build')
3640          {
3641              $out .= tdb(tb($tag_name, $atts));
3642          }
3643  
3644          return $out;
3645      }
3646  
3647  // -------------------------------------------------------------
3648  
3649  	function tag_file_download_modified()
3650      {
3651          global $step, $endform, $tag_name;
3652  
3653          $atts = gpsa(array(
3654              'format'
3655          ));
3656  
3657          extract($atts);
3658  
3659          $out = form(
3660              startTable('tagbuilder').
3661  
3662              tr(
3663                  tdcs(
3664                      hed(gTxt('tag_'.$tag_name), 3)
3665                  , 2)
3666              ).
3667  
3668              tagRow('time_format',
3669                  fInput('text', 'format', $format, '', '', '', 15)).
3670  
3671              $endform
3672          );
3673  
3674          if ($step == 'build')
3675          {
3676              $out .= tdb(tb($tag_name, $atts));
3677          }
3678  
3679          return $out;
3680      }
3681  
3682  // -------------------------------------------------------------
3683  
3684  	function tag_file_download_size()
3685      {
3686          global $step, $endform, $tag_name;
3687  
3688          $atts = gpsa(array(
3689              'decimals',
3690              'format'
3691          ));
3692  
3693          $formats = array(
3694              'b' => 'Bytes',
3695              'k' => 'Kilobytes',
3696              'm' => 'Megabytes',
3697              'g' => 'Gigabytes',
3698              't' => 'Terabytes',
3699              'p' => 'Petabytes',
3700              'e' => 'Exabytes',
3701              'z' => 'Zettabytes',
3702              'y' => 'Yottabytes'
3703          );
3704  
3705          extract($atts);
3706  
3707          $out = form(
3708              startTable('tagbuilder').
3709  
3710              tr(
3711                  tdcs(hed(gTxt('tag_'.$tag_name), 3)
3712              , 2)
3713              ).
3714  
3715              tagRow('size_format',
3716                  ' '.selectInput('format', $formats, $format, true)).
3717  
3718              tagRow('decimals',
3719                  fInput('text', 'decimals', $decimals, '', '', '', 4)).
3720  
3721              $endform
3722          );
3723  
3724          if ($step == 'build')
3725          {
3726              $out .= tdb(tb($tag_name, $atts));
3727          }
3728  
3729          return $out;
3730      }
3731  
3732  // -------------------------------------------------------------
3733  
3734  	function tag_file_download_link()
3735      {
3736          global $step, $endform, $tag_name, $permlink_mode;
3737  
3738          $atts = gpsa(array(
3739              'filename',
3740              'id'
3741          ));
3742  
3743          extract($atts);
3744  
3745          $thing = gps('thing');
3746  
3747          $type = gps('type');
3748          $description = gps('description');
3749  
3750          $types = array(
3751              'textile'     => 'Textile',
3752              'textpattern' => 'Textpattern',
3753              'html'        => 'HTML'
3754          );
3755  
3756          $out = form(
3757              startTable('tagbuilder').
3758  
3759              tr(
3760                  tdcs(
3761                      hed(gTxt('tag_'.$tag_name), 3)
3762                  , 2)
3763              ).
3764  
3765              tagRow('type',
3766                  ''.selectInput('type', $types, ($type ? $type : 'textpattern'), true)).
3767  
3768              tagRow('id',
3769                  input_id($id)).
3770  
3771              tagRow('filename',
3772                  fInput('text', 'filename', $filename, '', '', '', INPUT_REGULAR)).
3773  
3774              tagRow('link_text',
3775                  fInput('text', 'thing', ($thing ? $thing : $filename), '', '', '', INPUT_REGULAR)).
3776  
3777              tagRow('description',
3778                  '<textarea name="description" cols="'.INPUT_REGULAR.'" rows="'.INPUT_XSMALL.'">'.$description.'</textarea>').
3779  
3780              $endform
3781          );
3782  
3783          if ($step == 'build')
3784          {
3785              $description = str_replace('&', '&#38;', txpspecialchars($description));
3786              $urlinfo = parse_url(hu);
3787              $url = ($permlink_mode == 'messy') ?
3788                  $urlinfo['path'].'index.php?s=file_download'.($type == 'textile' ? '&' : a).'id='.$id:
3789                  $urlinfo['path'].gTxt('file_download').'/'.$id.($filename ? '/'.urlencode($filename) : '');
3790  
3791              switch ($type)
3792              {
3793                  case 'textile':
3794                      $thing = ($thing) ? $thing : $filename;
3795                      $description = ($description) ? ' ('.$description.')' : '';
3796  
3797                      $out .= tdb('"'.$thing.$description.'":'.$url);
3798                  break;
3799  
3800                  case 'html':
3801                      $thing = ($thing) ? $thing : $filename;
3802                      $description = ($description) ? ' title="'.$description.'"' : '';
3803  
3804                      $out .= tdb('<a href="'.$url.'"'.$description.'>'.$thing.'</a>');
3805                  break;
3806  
3807                  case 'textpattern':
3808                  default:
3809                      $atts = array('id' => $id);
3810                      $thing = ($thing) ? $thing : '<txp:file_download_name />';
3811  
3812                      $out .= tdb(tb($tag_name, $atts, $thing));
3813                  break;
3814              }
3815          }
3816  
3817          return $out;
3818      }
3819  
3820  // -------------------------------------------------------------
3821  
3822  	function tag_file_download_name()
3823      {
3824          global $step, $endform, $tag_name;
3825  
3826          return form(
3827              startTable('tagbuilder').
3828  
3829              tr(
3830                  tdcs(
3831                      hed(gTxt('tag_'.$tag_name), 3)
3832                  , 2)
3833              ).
3834  
3835              n.endTable()
3836          ).
3837  
3838          tdb(tb($tag_name));
3839      }
3840  
3841  // -------------------------------------------------------------
3842  
3843  	function tag_file_download_downloads()
3844      {
3845          global $step, $endform, $tag_name;
3846  
3847          return form(
3848              startTable('tagbuilder').
3849  
3850              tr(
3851                  tdcs(
3852                      hed(gTxt('tag_'.$tag_name), 3)
3853                  , 2)
3854              ).
3855  
3856              n.endTable()
3857          ).
3858  
3859          tdb(tb($tag_name));
3860      }
3861  
3862  // -------------------------------------------------------------
3863  
3864  	function tag_file_download_category()
3865      {
3866          global $step, $endform, $tag_name;
3867  
3868          $atts = gpsa(array(
3869              'class',
3870              'escape',
3871              'wraptag'
3872          ));
3873  
3874          extract($atts);
3875  
3876          $out = form(
3877              startTable('tagbuilder').
3878  
3879              tr(
3880                  tdcs(
3881                      hed(gTxt('tag_'.$tag_name), 3)
3882                  , 2)
3883              ).
3884  
3885              tagRow('escape',
3886                  escape_pop($escape)).
3887  
3888              tagRow('wraptag',
3889                  input_tag('wraptag', $wraptag)).
3890  
3891              tagRow('class',
3892                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
3893  
3894              $endform
3895          );
3896  
3897          if ($step == 'build')
3898          {
3899              $out .= tdb(tb($tag_name, $atts));
3900          }
3901  
3902          return $out;
3903      }
3904  
3905  // -------------------------------------------------------------
3906  
3907  	function tag_file_download_description()
3908      {
3909          global $step, $endform, $tag_name;
3910  
3911          $atts = gpsa(array(
3912              'class',
3913              'escape',
3914              'wraptag'
3915          ));
3916  
3917          extract($atts);
3918  
3919          $out = form(
3920              startTable('tagbuilder').
3921  
3922              tr(
3923                  tdcs(
3924                      hed(gTxt('tag_'.$tag_name), 3)
3925                  , 2)
3926              ).
3927  
3928              tagRow('escape',
3929                  escape_pop($escape)).
3930  
3931              tagRow('wraptag',
3932                  input_tag('wraptag', $wraptag)).
3933  
3934              tagRow('class',
3935                  fInput('text', 'class', $class, '', '', '', INPUT_REGULAR)).
3936  
3937              $endform
3938          );
3939  
3940          if ($step == 'build')
3941          {
3942              $out .= tdb(tb($tag_name, $atts));
3943          }
3944  
3945          return $out;
3946      }
3947  
3948  ?>

title

Description

title

Description

title

Description

title

title

Body