本文整理匯總了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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}