b2evolution PHP Cross Reference Blogging Systems

Source: /inc/comments/views/_comments_sidebar.view.php - 211 lines - 8371 bytes - Text - Print

Description: This file implements the right sidebar for the comment browsing screen. This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file implements the right sidebar for the comment browsing screen.
   4   *
   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}.
   9  *
  10   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
  11   *
  12   * {@internal Open Source relicensing agreement:
  13   * EVO FACTORY grants Francois PLANQUE the right to license
  14   * EVO FACTORY contributions to this file and the b2evolution project
  15   * under any OSI approved OSS license (http://www.opensource.org/licenses/).
  16   * }}
  17   *
  18   * @package evocore
  19   *
  20   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  21   * @author asimo: Evo Factory / Attila Simo
  22   *
  23   * @version $Id: _comments_sidebar.view.php 6136 2014-03-08 07:59:48Z manuel $
  24   */
  25  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  26  
  27  /**
  28   * @var AdminUI
  29   */
  30  global $AdminUI;
  31  /**
  32   * @var Blog
  33   */
  34  global $Blog;
  35  
  36  global $current_User;
  37  
  38  global $CommentList;
  39  
  40  $pp = $CommentList->param_prefix;
  41  
  42  global ${$pp.'show_statuses'}, ${$pp.'expiry_statuses'}, ${$pp.'s'}, ${$pp.'sentence'}, ${$pp.'exact'};
  43  global ${$pp.'rating_toshow'}, ${$pp.'rating_turn'}, ${$pp.'rating_limit'}, ${$pp.'url_match'}, ${$pp.'author_url'}, ${$pp.'include_emptyurl'}, ${$pp.'author_IP'};
  44  global $tab3;
  45  
  46  $show_statuses = ${$pp.'show_statuses'};
  47  $expiry_statuses = ${$pp.'expiry_statuses'};
  48  $s = ${$pp.'s'};
  49  $sentence = ${$pp.'sentence'};
  50  $exact = ${$pp.'exact'};
  51  $rating_toshow = ${$pp.'rating_toshow'};
  52  $rating_turn = ${$pp.'rating_turn'};
  53  $rating_limit = ${$pp.'rating_limit'};
  54  $url_match = ${$pp.'url_match'};
  55  $author_url = ${$pp.'author_url'};
  56  $include_emptyurl = ${$pp.'include_emptyurl'};
  57  $author_IP = ${$pp.'author_IP'};
  58  
  59  load_funcs( 'skins/_skin.funcs.php' );
  60  
  61  $Widget = new Widget();
  62  $template = $AdminUI->get_template( 'side_item' );
  63  
  64  $Widget->title = T_('Filters');
  65  
  66  echo $Widget->replace_vars( $template['block_start'] );
  67  
  68  $Form = new Form( NULL, 'comment_filter_form', 'get', 'none' );
  69  
  70  $Form->begin_form( '' );
  71  
  72      $Form->hidden_ctrl();
  73      $Form->hidden( 'tab3', $tab3 );
  74      $Form->submit( array( 'submit', T_('Search'), 'search', '', 'float:right' ) );
  75  
  76      echo '<fieldset>';
  77      echo '<legend>'.T_('Comments to show').'</legend>';
  78  
  79      $exclude_statuses = array_merge( get_restricted_statuses( $Blog->ID, 'blog_comment!' ), array( 'redirected' ) );
  80      $statuses = get_visibility_statuses( 'notes-array', $exclude_statuses );
  81      foreach( $statuses as $status_key => $status_name )
  82      { // show statuses
  83          ?>
  84          <input type="checkbox" name="<?php echo $pp ?>show_statuses[]" value="<?php echo $status_key; ?>" id="sh_<?php echo $status_key; ?>" class="checkbox" <?php if( in_array( $status_key, $show_statuses ) ) echo 'checked="checked" '?> />
  85          <label for="sh_<?php echo $status_key; ?>" title="<?php echo substr( $status_name[1], 1, strlen( $status_name[1] ) - 2 ); ?>"><?php echo $status_name[0] ?></label><br />
  86          <?php
  87      }
  88      ?>
  89  
  90      <br />
  91      <input type="checkbox" name="<?php echo $pp ?>expiry_statuses[]" value="active" id="show_active" class="checkbox" <?php if( in_array( "active", $expiry_statuses ) ) echo 'checked="checked" '?> />
  92      <label for="show_active"><?php echo T_('Show active') ?> </label><br />
  93      <input type="checkbox" name="<?php echo $pp ?>expiry_statuses[]" value="expired" id="show_expired" class="checkbox" <?php if( in_array( "expired", $expiry_statuses ) ) echo 'checked="checked" '?> />
  94      <label for="show_expired"><?php echo T_('Show expired') ?> </label><br />
  95  
  96      <?php
  97      echo '</fieldset>';
  98  
  99      echo '<fieldset>';
 100      echo '<legend>'.T_('Title / Text contains').'</legend>';
 101  
 102      echo $Form->inputstart;
 103      ?>
 104      <div><input type="text" name="<?php echo $pp ?>s" size="20" value="<?php echo htmlspecialchars($s) ?>" class="SearchField" /></div>
 105      <?php
 106      echo $Form->inputend;
 107      ?>
 108      <div class="tile">
 109          <input type="radio" name="<?php echo $pp ?>sentence" value="AND" id="sentAND" class="radio" <?php if( $sentence=='AND' ) echo 'checked="checked" '?> />
 110          <label for="sentAND"><?php echo T_('AND') ?></label>
 111      </div>
 112      <div class="tile">
 113          <input type="radio" name="<?php echo $pp ?>sentence" value="OR" id="sentOR" class="radio" <?php if( $sentence=='OR' ) echo 'checked="checked" '?> />
 114          <label for="sentOR"><?php echo T_('OR') ?></label>
 115      </div>
 116      <div class="tile">
 117          <input type="radio" name="<?php echo $pp ?>sentence" value="sentence" id="sentence" class="radio" <?php if( $sentence=='sentence' ) echo 'checked="checked" '?> />
 118          <label for="sentence"><?php echo T_('Entire phrase') ?></label>
 119      </div>
 120      <div class="tile">
 121          <input type="checkbox" name="<?php echo $pp ?>exact" value="1" id="exact" class="checkbox" <?php if( $exact ) echo 'checked="checked" '?> />
 122          <label for="exact"><?php echo T_('Exact match') ?></label>
 123      </div>
 124  
 125      <?php
 126      echo '</fieldset>';
 127  
 128      echo '<fieldset>';
 129      echo '<legend>'.T_('Rating').'</legend>';
 130  
 131      ?>
 132      <div class="rating">
 133          <input type="checkbox" name="<?php echo $pp ?>rating_toshow[]" value="norating" id="rating_ts_norating" class="checkbox" <?php if( isset( $rating_toshow ) && in_array( "norating", $rating_toshow ) ) echo 'checked="checked" '?> />
 134          <label for="rating_ts_norating"><?php echo T_('No rating') ?> </label><br />
 135  
 136          <input type="checkbox" name="<?php echo $pp ?>rating_toshow[]" value="haverating" id="rating_ts_haverating" class="checkbox" <?php if( isset( $rating_toshow ) && in_array( "haverating", $rating_toshow ) ) echo 'checked="checked" '?> />
 137          <label for="rating_ts_haverating"><?php echo T_('Have rating') ?> </label><br />
 138      </div>
 139      <div class="rating">
 140          <input type="radio" name="<?php echo $pp ?>rating_turn" value="above" id="rating_above" class="radio" <?php if( $rating_turn=='above' ) echo 'checked="checked" '?> />
 141          <label for="rating_above"><?php echo T_('Above') ?></label>
 142  
 143          <input type="radio" name="<?php echo $pp ?>rating_turn" value="below" id="rating_below" class="radio" <?php if( $rating_turn=='below' ) echo 'checked="checked" '?> />
 144          <label for="rating_below"><?php echo T_('Below') ?></label><br />
 145  
 146          <input type="radio" name="<?php echo $pp ?>rating_turn" value="exact" id="rating_exact" class="radio" <?php if( $rating_turn=='exact' ) echo 'checked="checked" '?> />
 147          <label for="rating_norating"><?php echo T_('Exact') ?></label>
 148      </div>
 149      <div class="rating">
 150          <?php
 151          echo T_('Poor');
 152  
 153          for( $i=1; $i<=5; $i++ )
 154          {
 155              echo '<input type="radio" name="'.$pp.'rating_limit" value="'.$i.'" class="radio"';
 156              if( $rating_limit == $i )
 157              {
 158                  echo ' checked="checked"';
 159              }
 160              echo ' />';
 161          }
 162  
 163          echo T_('Excellent');
 164          ?>
 165      </div>
 166  
 167      <?php
 168      echo '</fieldset>';
 169  
 170      echo '<fieldset>';
 171      echo '<legend>'.T_('Author URL').'</legend>';
 172  
 173      echo $Form->inputstart;
 174      ?>
 175      <div><input type="text" name="<?php echo $pp ?>author_url" size="20" value="<?php echo htmlspecialchars($author_url) ?>" class="SearchField" /></div>
 176      <?php
 177      echo $Form->inputend;
 178      ?>
 179      <div>
 180          <input type="radio" name="<?php echo $pp ?>url_match" value="=" id="with_url" class="radio" <?php if( $url_match=='=' ) echo 'checked="checked" '?> />
 181          <label for="with_url"><?php echo T_('With this') ?></label>
 182  
 183          <input type="radio" name="<?php echo $pp ?>url_match" value="!=" id="without_url" class="radio" <?php if( $url_match=='!=' ) echo 'checked="checked" '?> />
 184          <label for="without_url"><?php echo T_('Without this') ?></label>
 185      </div>
 186      <div>
 187          <input type="checkbox" name="<?php echo $pp ?>include_emptyurl" value="true" id="without_any_url" class="checkbox" <?php if( $include_emptyurl ) echo 'checked="checked" '?> />
 188          <label for="without_any_url"><?php echo T_('Include comments with no url') ?> <span class="notes">(<?php echo T_('Works only when url filter is set') ?>)</span></label><br />
 189      </div>
 190  
 191      <?php
 192      echo '</fieldset>';
 193  
 194      echo '<fieldset>';
 195      echo '<legend>'.T_('IP').'</legend>';
 196      echo $Form->inputstart;
 197      ?>
 198      <div><?php echo T_('IP') ?> <input type="text" name="<?php echo $pp ?>author_IP" size="20" value="<?php echo htmlspecialchars($author_IP) ?>" class="SearchField" style="width:85%" /></div>
 199      <div class="note"><?php echo T_('use \'%\' for partial matches') ?></div>
 200      <?php
 201      echo $Form->inputend;
 202  
 203      echo '</fieldset>';
 204  
 205      $Form->submit( array( 'submit', T_('Search'), 'search' ) );
 206  
 207  $Form->end_form();
 208  
 209  echo $template['block_end'];
 210  
 211  ?>

title

Description

title

Description

title

Description

title

title

Body