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


PHP vB_DataManager::verify_pagetext方法代码示例

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


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

示例1: intval

 /**
  * Verifies the page text is valid and sets it up for saving.
  *
  * @param	string	Page text
  *
  * @param	bool	Whether the text is valid
  */
 function verify_pagetext(&$pagetext)
 {
     if (empty($this->info['is_automated'])) {
         if ($this->registry->options['postmaxchars'] != 0 and ($postlength = vbstrlen($pagetext)) > $this->registry->options['postmaxchars']) {
             $this->error('toolong', $postlength, $this->registry->options['postmaxchars']);
             return false;
         }
         $this->registry->options['postminchars'] = intval($this->registry->options['postminchars']);
         if ($this->registry->options['postminchars'] <= 0) {
             $this->registry->options['postminchars'] = 1;
         }
         if (vbstrlen(strip_bbcode($pagetext, $this->registry->options['ignorequotechars'])) < $this->registry->options['postminchars']) {
             $this->error('tooshort', $this->registry->options['postminchars']);
             return false;
         }
     }
     return parent::verify_pagetext($pagetext);
 }
开发者ID:benyamin20,项目名称:vbregistration,代码行数:25,代码来源:class_dm_threadpost.php

示例2: intval

	/**
	* Verifies the page text is valid and sets it up for saving.
	*
	* @param	string	Page text
	*
	* @param	bool	Whether the text is valid
	*/
	function verify_pagetext(&$pagetext)
	{
		if (empty($this->info['skip_charcount']))
		{
			$maxchars = $this->table == 'blog' ? $this->registry->options['vbblog_entrymaxchars'] : $this->registry->options['vbblog_commentmaxchars'];
			if ($maxchars != 0 AND ($postlength = vbstrlen($pagetext)) > $maxchars)
			{
				$this->error('toolong', $postlength, $maxchars);
				return false;
			}

			$this->registry->options['postminchars'] = intval($this->registry->options['postminchars']);
			if ($this->registry->options['postminchars'] <= 0)
			{
				$this->registry->options['postminchars'] = 1;
			}
			if (vbstrlen(strip_bbcode($pagetext)) < $this->registry->options['postminchars'])
			{
				$this->error('tooshort', $this->registry->options['postminchars']);
				return false;
			}
		}

		return parent::verify_pagetext($pagetext, false);
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:32,代码来源:class_dm_blog.php

示例3: intval

	/**
	* Verifies the page text is valid and sets it up for saving.
	*
	* @param	string	Page text
	*
	* @param	bool	Whether the text is valid
	*/
	function verify_pagetext(&$pagetext)
	{
		if (empty($this->info['skip_charcount']))
		{
			if (!$this->fetch_field('type'))
			{
				trigger_error('vB_Datamanager_Blog_Custom_Block(): \'type\' must be set.', E_USER_ERROR);
			}
			if ($this->fetch_field('type'))
			{
				$maxchars = $this->registry->options['vbblog_blockmaxchars'];
			}
			else
			{
				$maxchars = $this->registry->options['vbblog_pagemaxchars'];
			}
			if ($maxchars != 0 AND ($postlength = vbstrlen($pagetext)) > $maxchars)
			{
				$this->error('toolong', $postlength, $maxchars);
				return false;
			}

			$this->registry->options['postminchars'] = intval($this->registry->options['postminchars']);
			if ($this->registry->options['postminchars'] <= 0)
			{
				$this->registry->options['postminchars'] = 1;
			}
			if (vbstrlen(strip_bbcode($pagetext, $this->registry->options['ignorequotechars'])) < $this->registry->options['postminchars'])
			{
				$this->error('tooshort', $this->registry->options['postminchars']);
				return false;
			}
		}

		return parent::verify_pagetext($pagetext, false);

	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:44,代码来源:class_dm_blog_custom_block.php

示例4:

 /**
  * Verifies the page text is valid and sets it up for saving.
  *
  * @param	string	Page text
  *
  * @param	bool	Whether the text is valid
  */
 function verify_pagetext(&$pagetext)
 {
     if (vbstrlen(strip_bbcode($pagetext, $this->registry->options['ignorequotechars'])) < 1) {
         $this->error('tooshort', 1);
         return false;
     }
     return parent::verify_pagetext($pagetext);
 }
开发者ID:holandacz,项目名称:nb4,代码行数:15,代码来源:class_dm_pt_issuenote.php

示例5:

	/**
	* Verifies the page text is valid and sets it up for saving.
	*
	* @param	string	Page text
	*
	* @param	bool	Whether the text is valid
	*/
	function verify_pagetext(&$pagetext)
	{
		if (empty($this->info['skip_charcount']))
		{
			if ($this->registry->options['vbblog_usermaxchars'] != 0 AND ($postlength = vbstrlen($pagetext)) > $this->registry->options['vbblog_usermaxchars'])
			{
				$this->error('toolong', $postlength, $this->registry->options['vbblog_usermaxchars']);
				return false;
			}
		}

		return parent::verify_pagetext($pagetext);

	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:21,代码来源:class_dm_blog_user.php


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