當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。