tags
[ class tree: tags ] [ index: tags ] [ all elements ]

Source for file list.php

Documentation is available at list.php

  1. <?php
  2. /**
  3.  * @version $Header$
  4.  * @package tags
  5.  * @subpackage functions
  6.  * 
  7.  * @copyright Copyright (c) 2004-2006, bitweaver.org
  8.  *  All Rights Reserved. See below for details and a complete list of authors.
  9.  *  Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
  10.  */
  11.  
  12. /**
  13.  * required setup
  14.  */
  15. require_once"../kernel/setup_inc.php" );
  16. require_onceTAGS_PKG_PATH."LibertyTag.php" );
  17.  
  18. $gBitSystem->verifyPackage'tags' );
  19.  
  20. if!empty$_REQUEST['action') ) {
  21.     if$_REQUEST['action'== 'remove' && !empty$_REQUEST['tag_id') ) {
  22.         if !$gBitUser->hasPermission('p_tags_moderate') ){
  23.             $gBitSystem->fatalErrortra('You do not have permission to remove tags.') );
  24.         }
  25.         
  26.         $tmpTag new LibertyTag();
  27.         $tmpTag->loadTag($_REQUEST);
  28.         
  29.         ifisset$_REQUEST["confirm") ) {
  30.             if$tmpTag->expunge$tmpTag->mInfo['tag_id') ) {
  31.                 bit_redirectTAGS_PKG_URL.'list.php?status_id='.!empty$_REQUEST['status_id'$_REQUEST['status_id''' ) );
  32.             else {
  33.                 $feedback['error'$tmpTag->mErrors;
  34.             }
  35.         }
  36.         $gBitSystem->setBrowserTitle'Confirm removal of '.$tmpTag->mInfo['tag');
  37.         $formHash['remove'TRUE;
  38.         $formHash['action''remove';
  39.         $formHash['status_id'!empty$_REQUEST['status_id'$_REQUEST['status_id''' );
  40.         $formHash['tag_id'$_REQUEST['tag_id'];
  41.         $msgHash array(
  42.             'label' => tra('Remove Tag'),
  43.             'confirm_item' => $tmpTag->mInfo['tag'],
  44.             'warning' => ('This will remove the above tag.'),
  45.             'error' => tra('This cannot be undone!'),
  46.         );
  47.         $gBitSystem->confirmDialog$formHash$msgHash );
  48.     }
  49. }
  50.  
  51. $tag new LibertyTag();
  52.  
  53. $listHash $_REQUEST;
  54. $tagHash $_REQUEST;
  55.  
  56. ifisset($_REQUEST['tags']) ){
  57.     $pageTitle tra'Tagged Content' );
  58.     if$listData $tag->assignContentList$listHash ) ) {
  59.         $pageTitle .= ' '.tra'with' ).' '.$_REQUEST['tags'];
  60.         $gBitSystem->setCanonicalLink$tag->getDisplayUrlWithTag$_REQUEST['tags') );
  61.     else {
  62.         $gBitSystem->setHttpStatusHttpStatusCodes::HTTP_GONE );
  63.     }
  64.     $tagData $tag->getList$tagHash );
  65.     $gBitSmarty->assign'tagData'$tagData["data");
  66.     $gBitSmarty->assign'tagsReq'$_REQUEST['tags');
  67.     $gBitSystem->display'bitpackage:tags/list_content.tpl'$pageTitlearray'display_mode' => 'list' ));
  68. }else{
  69.     $listData $tag->getList$listHash );
  70.     $gBitSmarty->assign'tagData'$listData["data");
  71.     $gBitSystem->display'bitpackage:tags/list_tags.tpl'tra'Tags' array'display_mode' => 'list' ));
  72. }
  73. ?>

Documentation generated on Wed, 29 Jul 2015 13:57:02 +0000 by phpDocumentor 1.5.0-lsces