b2evolution

Multilingual multiuser multiblog engine

b2evolution Technical Documentation (0.9.x) [ class tree: admin ] [ index: admin ] [ all elements ]

Source for file _edit_showposts.php

Documentation is available at _edit_showposts.php

  1. <?php
  2. /**
  3.  * Displays list of post / browsing
  4.  *
  5.  * b2evolution - {@link http://b2evolution.net/}
  6.  * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
  7.  * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
  8.  *
  9.  * @package admin
  10.  */
  11. if!defined('DB_USER') ) die'Please, do not access this page directly.' );
  12. ?>
  13. <div class="left_col">
  14.     <div class="NavBar">
  15.     <?php
  16.     /**
  17.      * Includes:
  18.      */    
  19.     require_oncedirname(__FILE__)'/'$admin_dirout'/'$core_subdir'/_class_itemlist.php' );
  20.     require_oncedirname(__FILE__)'/'$admin_dirout'/'$core_subdir'/_class_calendar.php' );
  21.     require_oncedirname(__FILE__)'/'$admin_dirout'/'$core_subdir'/_class_archivelist.php' );
  22.  
  23.     param'safe_mode''integer');         // Blogger style
  24.     param'p''integer' );                    // Specific post number to display
  25.     param'm''integer'''true );          // YearMonth(Day) to display
  26.     param'w''integer'''true );          // Week number
  27.     param'cat''string'''true );         // List of cats to restrict to
  28.     param'catsel''array'array()true );  // Array of cats to restrict to
  29.     param'author''integer'''true );     // List of authors to restrict to
  30.     param'order''string''DESC'true );   // ASC or DESC
  31.     param'orderby''string'''true );     // list of fields to order by
  32.     param'posts''integer'''true );      // # of posts to display on the page
  33.     param'paged''integer'''true );      // List page number in paged display
  34.     param'poststart''integer'1true );   // Start results at this position
  35.     param'postend''integer'''true );    // End results at this position
  36.     param's''string'''true );           // Search string
  37.     param'sentence''string''AND'true )// Search for sentence or for words
  38.     param'exact''integer'''true );      // Require exact match of title or contents
  39.     $preview 0;
  40.     param'c''string' );
  41.     param'tb''integer');
  42.     param'pb''integer');
  43.     param'show_status''array'array'published''protected''private''draft''deprecated' )true );    // Array of cats to restrict to
  44.     $show_statuses $show_status;
  45.     param'show_past''integer''0'true );
  46.     param'show_future''integer''0'true );
  47.     if( ($show_past == 0&& $show_future == ) )
  48.     {
  49.         $show_past 1;
  50.         $show_future 1;
  51.     }
  52.     $timestamp_min $show_past == 'now' '';
  53.     $timestamp_max $show_future == 'now' '';
  54.  
  55.     // Getting current blog info:
  56.     $blogparams get_blogparams_by_ID$blog );
  57.  
  58.     // Get the posts to display:
  59.     $MainList new ItemList$blog$show_statuses$p$m$w$cat$catsel$author$order$orderby$posts$paged$poststart$postend$s$sentence$exact$preview''''$timestamp_min$timestamp_max );
  60.  
  61.     $posts_per_page $MainList->posts_per_page;
  62.     $what_to_show $MainList->what_to_show;
  63.     $request $MainList->request;
  64.     $result_num_rows $MainList->get_num_rows();
  65.     $postIDlist $MainList->postIDlist;
  66.     $postIDarray $MainList->postIDarray;
  67.  
  68.  
  69.     echo '<h2>';
  70.     single_cat_title();
  71.     single_month_titleT_(' Date range: ')'htmlbody'true'b2browse.php''blog='.$blog );
  72.     echo '</h2>';
  73.  
  74.     if!$posts )
  75.     {
  76.         if$posts_per_page )
  77.         {
  78.             $posts $posts_per_page;
  79.         }
  80.         else
  81.         {
  82.             $posts 10;
  83.             $posts_per_page $posts;
  84.         }
  85.     }
  86.  
  87.     if!$poststart )
  88.     {
  89.         $poststart 1;
  90.     }
  91.  
  92.     if!$postend )
  93.     {
  94.         $postend $poststart $posts 1;
  95.     }
  96.  
  97.     $nextXstart $postend 1;
  98.     $nextXend $postend $posts;
  99.  
  100.     $previousXstart ($poststart $posts);
  101.     $previousXend $poststart 1;
  102.     if$previousXstart )
  103.     {
  104.         $previousXstart 1;
  105.     }
  106.  
  107.     require dirname(__FILE__)'/_edit_navbar.php';
  108.     ?>
  109.     </div>
  110.     <?php
  111.     while$Item $MainList->get_item() )
  112.     {
  113.         ?>
  114.         <div class="bPost<?php $Item->status'raw' ?>" lang="<?php $Item->lang(?>">
  115.             <?php 
  116.             // We don't switch locales in the backoffice, since we use the user pref anyway
  117.             $Item->anchor()?>
  118.             <div class="bSmallHead">
  119.                 <div class="bSmallHeadRight">
  120.                     <?php
  121.                     locale_flag$Item->locale'h10px' );
  122.  
  123.                     echo '<br />'.T_('Status').': <span class="Status">';
  124.                     $Item->status();
  125.                     echo '</span>';
  126.                     ?>
  127.                 </div>
  128.                 <?php
  129.                     echo '<strong>';
  130.                     $Item->issue_date()echo ' @ '$Item->issue_time();
  131.                     echo '</strong>';
  132.                     // TRANS: backoffice: each post is prefixed by "date BY author IN categories"
  133.                     echo ' 'T_('by')' ';
  134.                     $Item->Author->prefered_name();
  135.                     echo ' (';
  136.                     $Item->Author->login();
  137.                     echo ', 'T_('level:');
  138.                     $Item->Author->level();
  139.                     echo ')';
  140.                     
  141.                     // TRANS: backoffice: each post is prefixed by "date BY author IN categories"
  142.                     echo '<br />'.T_('Categories').': ';
  143.                     $Item->categoriesfalse );
  144.                 ?>
  145.             </div>
  146.  
  147.             <div class="bContent">
  148.                 <h3 class="bTitle"><?php $Item->title(?></h3>
  149.                 <div class="bText">
  150.                     <?php
  151.                         $Item->content();
  152.                         link_pages'<p class="right">'.T_('Pages:')'</p>' );
  153.                     ?>
  154.                 </div>
  155.             </div>
  156.  
  157.             <div class="PostActionsArea">
  158.                 <a href="<?php $Item->permalink(?>" title="<?php echo T_('Permanent link to full entry'?>" class="permalink_right"><img src="img/chain_link.gif" alt="<?php echo T_('Permalink'?>" width="14" height="14" border="0" class="middle" /></a>
  159.                 <?php
  160.                  // Display edit button if current user has the rights:
  161.                 $Item->edit_link' '' ''#''#''ActionButton');
  162.  
  163.                 // Display publish NOW button if current user has the rights:
  164.                 $Item->publish_link' '' ''#''#''PublishButton');
  165.  
  166.                 // Display delete button if current user has the rights:
  167.                 $Item->delete_link' '' ''#''#''DeleteButton');
  168.  
  169.                 ?>
  170.                 <a href="b2browse.php?blog=<?php echo $blog ?>&amp;p=<?php $Item->ID(?>&amp;c=1" class="ActionButton"><?php
  171.                 // TRANS: Link to comments for current post
  172.                 comments_number(T_('no comment')T_('1 comment')T_('%d comments'));
  173.                 trackback_number(''' &middot; '.T_('1 Trackback')' &middot; '.T_('%d Trackbacks'));
  174.                 pingback_number(''' &middot; '.T_('1 Pingback')' &middot; '.T_('%d Pingbacks'));
  175.                 ?></a>
  176.             </div>
  177.  
  178.             <?php
  179.             // ---------- comments ----------
  180.             if$c )
  181.             // We have request display of comments
  182.                 ?>
  183.                <div class="bFeedback">
  184.                 <a name="comments"></a>
  185.                 <h4><?php echo T_('Comments')', 'T_('Trackbacks')', 'T_('Pingbacks'?>:</h4>
  186.                 <?php
  187.             
  188.                 $CommentList new CommentList0"'comment','trackback','pingback'"$show_statuses$Item->ID'''ASC' );
  189.                 
  190.                 $CommentList->display_if_empty
  191.                                             '<div class="bComment"><p>' 
  192.                                             T_('No feedback for this post yet...'
  193.                                             '</p></div>' );
  194.             
  195.                 while$Comment $CommentList->get_next() )
  196.                 {    // Loop through comments:    
  197.                     ?>
  198.                     <!-- ========== START of a COMMENT/TB/PB ========== -->
  199.                     <div class="bComment">
  200.                         <div class="bSmallHead">
  201.                             <?php
  202.                             $Comment->date();
  203.                             echo ' @ ';
  204.                             $Comment->time'H:i' );
  205.                             if$Comment->author_url''' &middot; Url: ''' )
  206.                                     && $current_User->check_perm'spamblacklist''edit' ) )
  207.                             // There is an URL and we have permission to ban...
  208.                                 $baseDomain preg_replace("/http:\/\//i"""$Comment->author_url);
  209.                                 $baseDomain preg_replace("/^www\./i"""$baseDomain);
  210.                                 $baseDomain preg_replace("/\/.*/i"""$baseDomain);
  211.                                 ?>
  212.                                 <a href="b2antispam.php?action=ban&amp;keyword=<?php echo urlencode($baseDomain?>"><img src="img/noicon.gif" class="middle" alt="<?php echo /* TRANS: Abbrev. */ T_('Ban'?>" title="<?php echo T_('Ban this domain!'?>" /></a>&nbsp;
  213.                                 <?php 
  214.                             
  215.                             $Comment->author_email''' &middot; Email: ' );
  216.                             $Comment->author_ip' &middot; IP: ' );
  217.                          ?>
  218.                         </div>
  219.                         <div class="bCommentContent">
  220.                         <div class="bCommentTitle">
  221.                         <?php
  222.                             switch$Comment->get'type' ) )
  223.                             {
  224.                                 case 'comment'// Display a comment: 
  225.                                     echo T_('Comment from:'?> 
  226.                                     <?php break;
  227.             
  228.                                 case 'trackback'// Display a trackback:
  229.                                     echo T_('Trackback from:'?> 
  230.                                     <?php break;
  231.             
  232.                                 case 'pingback'// Display a pingback:
  233.                                     echo T_('Pingback from:'?> 
  234.                                     <?php break;
  235.                             
  236.                         ?>
  237.                         <?php $Comment->author(?>
  238.                         </div>
  239.                         <div class="bCommentText">
  240.                             <?php $Comment->content(?>
  241.                         </div>
  242.                         </div>
  243.                         <div class="CommentActionsArea">
  244.                         <a href="<?php $Comment->permalink(?>" title="<?php echo T_('Permanent link to this comment')    ?>" class="permalink_right"><img src="img/chain_link.gif" alt="<?php echo T_('Permalink'?>" width="14" height="14" border="0" class="middle" /></a>
  245.                         <?php
  246.                              // Display edit button if current user has the rights:
  247.                             $Comment->edit_link' '' ''#''#''ActionButton');
  248.  
  249.                             // Display delete button if current user has the rights:
  250.                             $Comment->delete_link' '' ''#''#''DeleteButton');
  251.                         ?>
  252.                         </div>
  253.     
  254.                     </div>
  255.                     <!-- ========== END of a COMMENT/TB/PB ========== -->
  256.                     <?php //end of the loop, don't delete
  257.                 }
  258.  
  259.                 if$Item->can_comment() )
  260.                 // User can leave a comment
  261.                 ?>
  262.                 <!-- ========== FORM to add a comment ========== -->
  263.                 <h4><?php echo T_('Leave a comment'?>:</h4>
  264.  
  265.                 <form action="<?php echo $htsrv_url ?>/comment_post.php" method="post" class="bComment">
  266.  
  267.                     <input type="hidden" name="comment_post_ID" value="<?php echo $Item->ID()?>" />
  268.                     <input type="hidden" name="redirect_to" value="<?php echo htmlspecialchars($ReqURI)?>" />
  269.  
  270.                     <fieldset>
  271.                         <div class="label"><?php echo T_('User'?>:</div>
  272.                         <div class="info">
  273.                             <strong><?php $current_User->prefered_name()?></strong>
  274.                             <?php user_profile_link' ['']'T_('Edit profile') ) ?>
  275.                             </div>
  276.                     </fieldset>
  277.  
  278.                     <?php 
  279.                         form_textarea'comment'''12T_('Comment text'),
  280.                                                         T_('Allowed XHTML tags').': '.htmlspecialchars(str_replace'><',', '$comment_allowed_tags))40'bComment' );
  281.                      ?>
  282.  
  283.                     <?php if(substr($comments_use_autobr,0,4== 'opt-'?>
  284.                     <fieldset>
  285.                         <div class="label"><label><?php echo T_('Options'?>:</label></div>
  286.                         <div class="input"><input type="checkbox" class="checkbox" name="comment_autobr" value="1" <?php if ($comments_use_autobr == 'opt-out'echo ' checked="checked"' ?> id="comment_autobr" /> <label for="comment_autobr"><?php echo T_('Auto-BR'?></label> <span class="notes"><?php echo T_('(Line breaks become &lt;br&gt;)'?></span>
  287.                         </div>
  288.                     </fieldset>
  289.                     <?php ?>
  290.  
  291.                     <fieldset>
  292.                         <div class="input">
  293.                             <input type="submit" name="submit" value="<?php echo T_('Send comment'?>" class="SaveButton" />
  294.                         </div>
  295.                     </fieldset>
  296.  
  297.                     <div class="clear"></div>
  298.  
  299.                 </form>
  300.                 <!-- ========== END of FORM to add a comment ========== -->
  301.                 <?php
  302.                 // / can comment
  303.             ?>
  304.             </div>
  305.             <?php
  306.         // / comments requested
  307.     ?>
  308.     </div>
  309.     <?php
  310.     }
  311.     
  312.     if$MainList->get_total_num_posts() )
  313.     // don't display navbar twice if we have no post
  314.     ?>
  315.     <div class="NavBar">
  316.         <?php require dirname(__FILE__)'/_edit_navbar.php'?>
  317.     </div>
  318.     <?php ?>
  319.  
  320. </div>
  321.  
  322.  
  323. <!-- ================================== START OF SIDEBAR ================================== -->
  324.  
  325. <div class="right_col">
  326.  
  327.     <div class="bSideItem">
  328.         <h2><?php $Blog->disp'name''htmlbody' ?></h2>
  329.         <?php
  330.         // ---------- CALENDAR ----------
  331.         $Calendar new Calendar$blogempty($calendar$m $calendar )''$timestamp_min$timestamp_max );
  332.         $Calendar->set'browseyears');  // allow browsing years in the calendar's caption
  333.         $Calendar->set'navigation''tfoot' );  
  334.         $Calendar->display$pagenow'blog='$blog );
  335.         ?>
  336.         <h3><?php echo T_('Notes'?></h3>
  337.         <?php $Blog->disp'notes''htmlbody' ?>
  338.     </div>
  339.  
  340.     <div class="bSideItem">
  341.         <form id="searchform" method="get" action="<?php echo $pagenow ?>">
  342.             <input type="submit" name="submit" value="<?php echo T_('Search'?>" class="search" style="float:right" />
  343.             <h3><?php echo T_('Search'?></h3>
  344.  
  345.             <input type="hidden" name="blog" value="<?php echo $blog ?>" />
  346.  
  347.             <fieldset title="Posts to show">
  348.                 <legend><?php echo T_('Posts to show'?></legend>
  349.                 <div>
  350.                 <input type="checkbox" name="show_past" value="1" id="ts_min" class="checkbox" <?php if$show_past echo 'checked="checked" '?> />
  351.                 <label for="ts_min"><?php echo T_('Past'?></label><br />
  352.  
  353.                 <input type="checkbox" name="show_future" value="1" id="ts_max" class="checkbox" <?php if$show_future echo 'checked="checked" '?> />
  354.                 <label for="ts_max"><?php echo T_('Future'?></label>
  355.                 </div>
  356.  
  357.                 <div>
  358.                 <input type="checkbox" name="show_status[]" value="published" id="sh_published" class="checkbox" <?php ifin_array"published"$show_status ) ) echo 'checked="checked" '?> />
  359.                 <label for="sh_published"><?php echo T_('Published (Public)'?></label><br />
  360.  
  361.                 <input type="checkbox" name="show_status[]" value="protected" id="sh_protected" class="checkbox" <?php ifin_array"protected"$show_status ) ) echo 'checked="checked" '?> />
  362.                 <label for="sh_protected"><?php echo T_('Protected (Members only)'?></label><br />
  363.  
  364.                 <input type="checkbox" name="show_status[]" value="private" id="sh_private" class="checkbox" <?php ifin_array"private"$show_status ) ) echo 'checked="checked" '?> />
  365.                 <label for="sh_private"><?php echo T_('Private (You only)'?></label><br />
  366.  
  367.                 <input type="checkbox" name="show_status[]" value="draft" id="sh_draft" class="checkbox" <?php ifin_array"draft"$show_status ) ) echo 'checked="checked" '?> />
  368.                 <label for="sh_draft"><?php echo T_('Draft (Not published!)'?></label><br />
  369.  
  370.                 <input type="checkbox" name="show_status[]" value="deprecated" id="sh_deprecated" class="checkbox" <?php ifin_array"deprecated"$show_status ) ) echo 'checked="checked" '?> />
  371.                 <label for="sh_deprecated"><?php echo T_('Deprecated (Not published!)'?></label><br />
  372.  
  373.  
  374.                 </div>
  375.  
  376.             </fieldset>
  377.  
  378.             <fieldset title="Text">
  379.                 <legend><?php echo T_('Title / Text contains'?></legend>
  380.                 <div>
  381.                 <input type="text" name="s" size="20" value="<?php echo htmlspecialchars($s?>" class="SearchField" />
  382.                 </div>
  383.                 <span class="line">
  384.                     <?php echo T_('Words'?>
  385.                 </span>
  386.                 <span class="line">
  387.                     <input type="radio" name="sentence" value="AND" id="sentAND" class="checkbox" <?php if$sentence=='AND' echo 'checked="checked" '?> />
  388.                     <label for="sentAND"><?php echo T_('AND'?></label>
  389.                 </span>
  390.                 <span class="line">
  391.                     <input type="radio" name="sentence" value="OR" id="sentOR" class="checkbox" <?php if$sentence=='OR' echo 'checked="checked" '?> />
  392.                     <label for="sentOR"><?php echo T_('OR'?></label>
  393.                 </span>
  394.                 <span class="line">
  395.                     <input type="radio" name="sentence" value="sentence" class="checkbox" id="sentence" <?php if$sentence=='sentence' echo 'checked="checked" '?> />
  396.                     <label for="sentence"><?php echo T_('Entire phrase'?></label>
  397.                 </span>
  398.                 <span class="line">
  399.                     <input type="checkbox" name="exact" value="1" id="exact" class="checkbox" <?php if$exact echo 'checked="checked" '?> />
  400.                     <label for="exact"><?php echo T_('Exact match'?></label>
  401.                 </span>
  402.             </fieldset>
  403.  
  404.             <fieldset title="Archives">
  405.                 <legend><?php echo T_('Archives'?></legend>
  406.                 <ul>
  407.                 <?php
  408.                 // this is what will separate your archive links
  409.                 $archive_line_start '<li>';
  410.                 $archive_line_end '</li>';
  411.                 // this is what will separate dates on weekly archive links
  412.                 $archive_week_separator ' - ';
  413.  
  414.                 $dateformat locale_datefmt();
  415.                 $archive_day_date_format $dateformat;
  416.                 $archive_week_start_date_format $dateformat;
  417.                 $archive_week_end_date_format   $dateformat;
  418.  
  419.                 $arc_link_start $pagenow'?blog='$blog'&amp;';
  420.  
  421.                 $ArchiveList new ArchiveList$blog$Settings->get('archive_mode')$show_statuses,    $timestamp_min$timestamp_max36 );
  422.  
  423.                 while$ArchiveList->get_item$arc_year$arc_month$arc_dayofmonth$arc_w$arc_count$post_ID$post_title) )
  424.                 {
  425.                     echo $archive_line_start;
  426.                     switch$Settings->get('archive_mode') )
  427.                     {
  428.                         case 'monthly':
  429.                             // --------------------------------- MONTHLY ARCHIVES ---------------------------------
  430.                             $arc_m $arc_year.zeroise($arc_month,2);
  431.                             echo '<input type="radio" name="m" value="'$arc_m'" class="checkbox"';
  432.                             if$m == $arc_m echo ' checked="checked"' ;
  433.                             echo ' /> ';
  434.                             echo '<a href="'$arc_link_start'm='$arc_m'">';
  435.                             echo T_($month[zeroise($arc_month,2)])' '$arc_year;
  436.                             echo "</a> ($arc_count)";
  437.                             break;
  438.  
  439.                         case 'daily':
  440.                             // --------------------------------- DAILY ARCHIVES -----------------------------------
  441.                             $arc_m $arc_year.zeroise($arc_month,2).zeroise($arc_dayofmonth,2);
  442.                             echo '<input type="radio" name="m" value="'$arc_m'" class="checkbox"';
  443.                             if$m == $arc_m echo ' checked="checked"' ;
  444.                             echo ' /> ';
  445.                             echo '<a href="'$arc_link_start'm='$arc_m'">';
  446.                             echo mysql2date($archive_day_date_format$arc_year'-'zeroise($arc_month,2)'-'zeroise($arc_dayofmonth,2)' 00:00:00');
  447.                             echo "</a> ($arc_count)";
  448.                             break;
  449.  
  450.                         case 'weekly':
  451.                             // --------------------------------- WEEKLY ARCHIVES ---------------------------------
  452.                             echo '<a href="'$arc_link_start'm='$arc_year'&amp;w='$arc_w'">';
  453.                             echo $arc_year.', '.T_('week').' '.$arc_w;
  454.                             echo "</a> ($arc_count)";
  455.                         break;
  456.  
  457.                         case 'postbypost':
  458.                         default:
  459.                             // ------------------------------- POSY BY POST ARCHIVES -----------------------------
  460.                             echo '<a href="'$arc_link_start'p='$post_ID'">';
  461.                             if ($post_title{
  462.                                 echo strip_tags($post_title);
  463.                             else {
  464.                                 echo $post_ID;
  465.                             }
  466.                             echo '</a>';
  467.                     }
  468.  
  469.                     echo $archive_line_end."\n";
  470.                 }
  471.                 ?>
  472.  
  473.                 </ul>
  474.             </fieldset>
  475.  
  476.             <fieldset title="Categories">
  477.                 <legend><?php echo T_('Categories'?></legend>
  478.                 <ul>
  479.                 <?php
  480.                 $cat_line_start '<li>';
  481.                 $cat_line_end '</li>';
  482.                 $cat_group_start '<ul>';
  483.                 $cat_group_end '</ul>';
  484.                 # When multiple blogs are listed on same page:
  485.                 $cat_blog_start '<li><strong>';
  486.                 $cat_blog_end '</strong></li>';
  487.  
  488.  
  489.                 // ----------------- START RECURSIVE CAT LIST ----------------
  490.                 cat_query();    // make sure the caches are loaded
  491.                 ifisset$cat_array ) ) $cat_array array();
  492.                 function cat_list_before_first$parent_cat_ID$level )
  493.                 {    // callback to start sublist
  494.                     global $cat_group_start;
  495.                     if$level echo "\n",$cat_group_start,"\n";
  496.                 }
  497.                 function cat_list_before_each$cat_ID$level )
  498.                 {    // callback to display sublist element
  499.                     global $blog$cat_array$cat_line_start$pagenow;
  500.                     $cat get_the_category_by_ID$cat_ID );
  501.                     echo $cat_line_start;
  502.                     echo '<label><input type="checkbox" name="catsel[]" value="'$cat_ID'" class="checkbox"';
  503.                     ifin_array$cat_ID$cat_array ) )
  504.                     {    // This category is in the current selection
  505.                         echo ' checked="checked"';
  506.                     }
  507.                     echo ' /> ';
  508.                     echo '<a href="'$pagenow'?blog='$blog'&amp;cat='$cat_ID'">'$cat['cat_name']'</a> ('$cat['cat_postcount',')';
  509.                     ifin_array$cat_ID$cat_array ) )
  510.                     {    // This category is in the current selection
  511.                         echo "*";
  512.                     }
  513.                     echo '</label>';
  514.                 }
  515.                 function cat_list_after_each$cat_ID$level )
  516.                 {    // callback to display sublist element
  517.                     global $cat_line_end;
  518.                     echo $cat_line_end,"\n";
  519.                 }
  520.                 function cat_list_after_last$parent_cat_ID$level )
  521.                 {    // callback to end sublist
  522.                     global  $cat_group_end;
  523.                     if$level echo $cat_group_end,"\n";
  524.                 }
  525.  
  526.                 if$blog )
  527.                 {    // We want to display cats for one blog
  528.                     cat_children$cache_categories$blogNULL'cat_list_before_first''cat_list_before_each''cat_list_after_each''cat_list_after_last');
  529.                 }
  530.                 else
  531.                 {    // We want to display cats for all blogs
  532.                     for$curr_blog_ID=blog_list_start('stub');
  533.                                 $curr_blog_ID!=false;
  534.                                  $curr_blog_ID=blog_list_next('stub') )
  535.                     {
  536.  
  537.                         echo $cat_blog_start;
  538.                         ?>
  539.                         <a href="<?php blog_list_iteminfo('blogurl'?>"><?php blog_list_iteminfo('name'?></a>
  540.                         <?php
  541.                         echo $cat_blog_end;
  542.  
  543.                         // run recursively through the cats
  544.                         cat_children$cache_categories$curr_blog_IDNULL'cat_list_before_first''cat_list_before_each''cat_list_after_each''cat_list_after_last');
  545.                     }
  546.                 }
  547.                 // ----------------- END RECURSIVE CAT LIST ----------------
  548.                 ?>
  549.                 </ul>
  550.             </fieldset>
  551.  
  552.             <input type="submit" name="submit" value="<?php echo T_('Search'?>" class="search" />
  553.             <input type="button" value="<?php echo T_('Reset'?>" onclick="document.location.href='<?php echo $pagenow,'?blog=',$blog ?>';" class="search" />
  554.         </form>
  555.  
  556.     </div>
  557.  
  558. </div>
  559. <div class="clear"></div>

Documentation generated on Tue, 20 May 2008 01:53:57 +0200 by phpDocumentor 1.4.2