当前位置: 首页>>代码示例>>PHP>>正文


PHP XoopsBlock::getContent方法代码示例

本文整理汇总了PHP中XoopsBlock::getContent方法的典型用法代码示例。如果您正苦于以下问题:PHP XoopsBlock::getContent方法的具体用法?PHP XoopsBlock::getContent怎么用?PHP XoopsBlock::getContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XoopsBlock的用法示例。


在下文中一共展示了XoopsBlock::getContent方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: isset

    $block['title'] = $myblock->getVar('title', 'E');
    $block['content'] = $myblock->getVar('content', 'n');
    $block['modules'] =& $bmodule;
    $block['ctype'] = isset($bctype) ? $bctype : $myblock->getVar('c_type');
    $block['is_custom'] = true;
    $block['cachetime'] = intval($bcachetime);
    echo '<a href="myblocksadmin.php">' . _AM_BADMIN . '</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;' . $block['form_title'] . '<br /><br />';
    include dirname(__FILE__) . '/../admin/myblockform.php';
    //GIJ
    //echo '<a href="admin.php?fct=blocksadmin">'. _AM_BADMIN .'</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;'.$block['form_title'].'<br /><br />';
    //include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blockform.php';
    $form->addElement($xoopsGTicket->getTicketXoopsForm(__LINE__, 1800, 'myblocksadmin'));
    //GIJ
    $form->display();
    $original_level = error_reporting(E_ALL);
    echo "\r\n    <table width='100%' class='outer' cellspacing='1'>\r\n      <tr>\r\n        <th>" . $myblock->getVar('title') . "</th>\r\n      </tr>\r\n      <tr>\r\n        <td class='odd'>" . $myblock->getContent('S', $bctype) . "</td>\r\n      </tr>\r\n    </table>\n";
    error_reporting($original_level);
    xoops_cp_footer();
    /* echo '<script type="text/javascript">
      preview_window = openWithSelfMain("'.XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file='.$dummyfile.'", "popup", 250, 200);
      </script>';*/
    exit;
}
/* if ($op == 'previewpopup') {
  if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
    exit('Invalid Referer');
  }
  $file = str_replace('..', '', XOOPS_CACHE_PATH.'/'.trim($_GET['file']));
  if (file_exists($file)) {
    include $file;
    @unlink($file);
开发者ID:BackupTheBerlios,项目名称:nobunobuxoops-svn,代码行数:31,代码来源:blocksadmin.inc.php

示例2: XoopsBlock

     $block['form_title'] = _AM_EDITBLOCK;
     $myblock = new XoopsBlock($bid);
     $block['name'] = $myblock->getVar('name');
 } else {
     if ($op == 'save') {
         $block['form_title'] = _AM_ADDBLOCK;
     } else {
         $block['form_title'] = _AM_CLONEBLOCK;
     }
     $myblock = new XoopsBlock();
     $myblock->setVar('block_type', 'C');
 }
 $myts =& MyTextSanitizer::getInstance();
 $myblock->setVar('title', $myts->stripSlashesGPC($btitle));
 $myblock->setVar('content', $myts->stripSlashesGPC($bcontent));
 $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" /><meta http-equiv="content-language" content="' . _LANGCODE . '" /><title>' . $xoopsConfig['sitename'] . '</title><link rel="stylesheet" type="text/css" media="all" href="' . getcss($xoopsConfig['theme_set']) . '" /></head><body><table><tr><th>' . $myblock->getVar('title') . '</th></tr><tr><td>' . $myblock->getContent('S', $bctype) . '</td></tr></table></body></html>';
 $dummyfile = '_dummyfile_' . time() . '.html';
 $fp = fopen(XOOPS_CACHE_PATH . '/' . $dummyfile, 'w');
 fwrite($fp, $dummyhtml);
 fclose($fp);
 $block['edit_form'] = false;
 $block['template'] = '';
 $block['op'] = $op;
 $block['side'] = $bside;
 $block['weight'] = $bweight;
 $block['visible'] = $bvisible;
 $block['title'] = $myblock->getVar('title', 'E');
 $block['content'] = $myblock->getVar('content', 'E');
 $block['modules'] =& $bmodule;
 $block['ctype'] = isset($bctype) ? $bctype : $myblock->getVar('c_type');
 $block['is_custom'] = true;
开发者ID:severnaya99,项目名称:Sg-2010,代码行数:31,代码来源:blocksadmin.inc.php

示例3: test_getContent

 public function test_getContent()
 {
     $instance = new XoopsBlock();
     $level = ob_get_level();
     $value = $instance->getContent();
     while (ob_get_level() > $level) {
         ob_end_clean();
     }
     $this->assertSame('', $value);
     $value = $instance->getContent('s', 'T');
     $this->assertSame('', $value);
     $value = $instance->getContent('s', 'H');
     $this->assertSame('', $value);
     $value = $instance->getContent('s', 'P');
     $this->assertSame('', $value);
     $value = $instance->getContent('s', 'S');
     $this->assertSame('', $value);
     $value = $instance->getContent('e');
     $this->assertSame('', $value);
     $value = $instance->getContent('default');
     $this->assertSame(null, $value);
 }
开发者ID:RanLee,项目名称:XoopsCore,代码行数:22,代码来源:blockTest.php

示例4: XoopsBlock

     if ($op == 'save') {
         $block['form_title'] = _AM_ADDBLOCK;
     } else {
         $block['form_title'] = _AM_CLONEBLOCK;
     }
     $myblock = new XoopsBlock();
     $myblock->setVar('block_type', 'C');
 }
 $myts =& MyTextSanitizer::getInstance();
 $myblock->setVar('title', $myts->stripSlashesGPC($btitle));
 $myblock->setVar('content', $myts->stripSlashesGPC($bcontent));
 $dummyhtml = '<html><head><meta http-equiv="content-type" content="text/html; charset=' . _CHARSET . '" />';
 $dummyhtml .= '<meta http-equiv="content-language" content="' . _LANGCODE . '" /><title>' . $xoopsConfig['sitename'] . '</title>';
 $dummyhtml .= '<link rel="stylesheet" type="text/css" media="all" href="' . xoops_getcss($xoopsConfig['theme_set']) . '" />';
 $dummyhtml .= '</head><body><table><tr><th>' . $myblock->getVar('title') . '</th></tr><tr><td>';
 $dummyhtml .= $myblock->getContent('S', $bctype) . '</td></tr></table></body></html>';
 $block['groups'] = $bgroups;
 $block['edit_form'] = false;
 $block['template'] = '';
 $block['op'] = $op;
 $block['side'] = $bside;
 $block['weight'] = $bweight;
 $block['visible'] = $bvisible;
 $block['title'] = $myblock->getVar('title', 'E');
 $block['content'] = $myblock->getVar('content', 'E');
 $block['modules'] =& $bmodule;
 $block['ctype'] = isset($bctype) ? $bctype : $myblock->getVar('c_type');
 $block['is_custom'] = true;
 $block['cachetime'] = intval($bcachetime);
 echo '<a href="admin.php?fct=blocksadmin">' . _AM_BADMIN . '</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;' . $block['form_title'] . '<br /><br />';
 include XOOPS_ROOT_PATH . '/modules/system/admin/blocksadmin/blockform.php';
开发者ID:gauravsaxena21,项目名称:simantz,代码行数:31,代码来源:main.php

示例5: intval

  $block['cachetime'] = intval($bcachetime);
  echo '<a href="myblocksadmin.php">'. _AM_BADMIN .'</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;'.$block['form_title'].'<br /><br />';
  include dirname(__FILE__).'/../admin/myblockform.php'; //GIJ
  //echo '<a href="admin.php?fct=blocksadmin">'. _AM_BADMIN .'</a>&nbsp;<span style="font-weight:bold;">&raquo;&raquo;</span>&nbsp;'.$block['form_title'].'<br /><br />';
  //include XOOPS_ROOT_PATH.'/modules/system/admin/blocksadmin/blockform.php';
  $form->addElement( $xoopsGTicket->getTicketXoopsForm( __LINE__ ) );//GIJ
  $form->display();

  $original_level = error_reporting( E_ALL ) ;
  echo "
    <table width='100%' class='outer' cellspacing='1'>
      <tr>
        <th>".$myblock->getVar('title')."</th>
      </tr>
      <tr>
        <td class='odd'>".$myblock->getContent('S', $bctype)."</td>
      </tr>
    </table>\n" ;
  error_reporting( $original_level ) ;

  xoops_cp_footer();
  /* echo '<script type="text/javascript">
  preview_window = openWithSelfMain("'.XOOPS_URL.'/modules/system/admin.php?fct=blocksadmin&op=previewpopup&file='.$dummyfile.'", "popup", 250, 200);
  </script>';*/

  exit();
}

/* if ($op == 'previewpopup') {
  if ( !admin_refcheck("/modules/$admin_mydirname/admin/") ) {
    exit('Invalid Referer');
开发者ID:nunoluciano,项目名称:uxcl,代码行数:31,代码来源:blocksadmin.inc.php

示例6: previewContent

 function previewContent($block_data)
 {
     $bid = intval($block_data['bid']);
     if (!$block_data['is_custom']) {
         return '';
     }
     if (empty($this->preview_request)) {
         return '';
     }
     $block = new XoopsBlock($bid);
     if ($block->getVar('mid')) {
         return '';
     }
     $block->setVar('title', $block_data['title']);
     $block->setVar('content', $block_data['content']);
     restore_error_handler();
     $original_level = error_reporting(E_ALL);
     $ret = $block->getContent('S', $block_data['ctype']);
     error_reporting($original_level);
     return $ret;
 }
开发者ID:BackupTheBerlios,项目名称:peakxoops-svn,代码行数:21,代码来源:MyBlocksAdmin.class.php

示例7: previewContent

 function previewContent($block_data)
 {
     $bid = intval($block_data['bid']);
     if (!$block_data['is_custom']) {
         return '';
     }
     if (empty($this->preview_request)) {
         return '';
     }
     //HACK by domifara
     //TODO : need no hook block at this
     $block = new XoopsBlock($bid);
     /*
     	$handler =& xoops_gethandler('block');
     	$block =& $handler->create(false) ;
     	$block->load($bid) ;
     */
     if ($block->getVar('mid')) {
         return '';
     }
     $block->setVar('title', $block_data['title']);
     $block->setVar('content', $block_data['content']);
     restore_error_handler();
     $original_level = error_reporting(E_ALL);
     $ret = $block->getContent('S', $block_data['ctype']);
     error_reporting($original_level);
     return $ret;
 }
开发者ID:hiro1173,项目名称:legacy,代码行数:28,代码来源:MyBlocksAdmin.class.php


注:本文中的XoopsBlock::getContent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。