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


PHP fetch_no_shouting_text函数代码示例

本文整理汇总了PHP中fetch_no_shouting_text函数的典型用法代码示例。如果您正苦于以下问题:PHP fetch_no_shouting_text函数的具体用法?PHP fetch_no_shouting_text怎么用?PHP fetch_no_shouting_text使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: verify_title

 /**
  * Verifies the title is valid and sets up the title for saving (wordwrap, censor, etc).
  *
  * @param	string	Title text
  *
  * @param	bool	Whether the title is valid
  */
 function verify_title(&$title)
 {
     // replace html-encoded spaces with actual spaces
     $title = preg_replace('/&#(0*32|x0*20);/', ' ', $title);
     $title = trim($title);
     if ($this->registry->options['titlemaxchars'] and $title != $this->existing['title']) {
         if (!empty($this->info['show_title_error'])) {
             if (($titlelen = vbstrlen($title)) > $this->registry->options['titlemaxchars']) {
                 // title too long
                 $this->error('title_toolong', $titlelen, $this->registry->options['titlemaxchars']);
                 return false;
             }
         } else {
             if (empty($this->info['is_automated'])) {
                 // not showing the title length error, just chop it
                 $title = vbchop($title, $this->registry->options['titlemaxchars']);
             }
         }
     }
     require_once DIR . '/includes/functions_newpost.php';
     // censor, remove all caps subjects, and htmlspecialchars title
     $title = fetch_no_shouting_text(fetch_censored_text($title));
     // do word wrapping
     $title = fetch_word_wrapped_string($title);
     return true;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:33,代码来源:class_dm_visitormessage.php

示例2: verify_pagetext

 /**
  * Basic options to perform on all pagetext type fields
  *
  * @param	string	Page text
  *
  * @param	bool	Whether the text is valid
  * @param	bool	Whether to run the case stripper
  */
 function verify_pagetext(&$pagetext, $noshouting = true)
 {
     require_once DIR . '/includes/functions_newpost.php';
     $pagetext = preg_replace('/&#(0*32|x0*20);/', ' ', $pagetext);
     $pagetext = trim($pagetext);
     // remove empty bbcodes
     //$pagetext = $this->strip_empty_bbcode($pagetext);
     // add # to color tags using hex if it's not there
     $pagetext = preg_replace('#\\[color=("|"|\'|)([a-f0-9]{6})\\1]#i', '[color=\\1#\\2\\1]', $pagetext);
     // strip alignment codes that are closed and then immediately reopened
     $pagetext = preg_replace('#\\[/(left|center|right)\\]([\\r\\n]*)\\[\\1\\]#i', '\\2', $pagetext);
     // remove [/list=x remnants
     if (stristr($pagetext, '[/list=') != false) {
         $pagetext = preg_replace('#\\[/list=[a-z0-9]+\\]#siU', '[/list]', $pagetext);
     }
     // remove extra whitespace between [list] and first element
     // -- unnecessary now, bbcode parser handles leading spaces after a list tag
     //$pagetext = preg_replace('#(\[list(=("|"|\'|)([^\]]*)\\3)?\])\s+#i', "\\1\n", $pagetext);
     // censor main message text
     $pagetext = fetch_censored_text($pagetext);
     // parse URLs in message text
     if ($this->info['parseurl']) {
         $pagetext = convert_url_to_bbcode($pagetext);
     }
     // remove sessionhash from urls:
     require_once DIR . '/includes/functions_login.php';
     $pagetext = fetch_removed_sessionhash($pagetext);
     if ($noshouting) {
         $pagetext = fetch_no_shouting_text($pagetext);
     }
     require_once DIR . '/includes/functions_video.php';
     $pagetext = parse_video_bbcode($pagetext);
     return true;
 }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:42,代码来源:datamanager.php

示例3: eval

 if (empty($vbulletin->GPC['message'])) {
     eval(standard_error(fetch_error('nosubject')));
 }
 $vbulletin->GPC['title'] = fetch_censored_text($vbulletin->GPC['title']);
 if ($vbulletin->options['wordwrap'] != 0) {
     $vbulletin->GPC['title'] = fetch_word_wrapped_string($vbulletin->GPC['title']);
 }
 // remove all caps subjects
 $vbulletin->GPC['title'] = fetch_no_shouting_text($vbulletin->GPC['title']);
 $vbulletin->GPC['message'] = fetch_censored_text($vbulletin->GPC['message']);
 if ($vbulletin->GPC['parseurl'] and $vbulletin->options['unallowvbcode']) {
     $vbulletin->GPC['message'] = convert_url_to_bbcode($vbulletin->GPC['message']);
 }
 // remove sessionhash from urls:
 $vbulletin->GPC['message'] = preg_replace('/(s|sessionhash)=[a-z0-9]{32}&{0,1}/', '', $vbulletin->GPC['message']);
 $vbulletin->GPC['message'] = fetch_no_shouting_text($vbulletin->GPC['message']);
 if (vbstrlen($vbulletin->GPC['message']) > $vbulletin->options['postmaxchars'] and $vbulletin->options['postmaxchars'] != 0) {
     eval(standard_error(fetch_error('toolong', $postlength, $vbulletin->options['postmaxchars'])));
 }
 if (vbstrlen($vbulletin->GPC['message']) < $vbulletin->options['postminchars'] or $vbulletin->GPC['message'] == '') {
     eval(standard_error(fetch_error('tooshort', $vbulletin->options['postminchars'])));
 }
 ($hook = vBulletinHook::fetch_hook('usernote_donote')) ? eval($hook) : false;
 if ($vbulletin->GPC['usernoteid']) {
     // Edited note.
     $db->query_write("\r\n\t\t\tUPDATE " . TABLE_PREFIX . "usernote\r\n\t\t\tSET message = '" . $db->escape_string($vbulletin->GPC['message']) . "',\r\n\t\t\t\ttitle = '" . $db->escape_string($vbulletin->GPC['title']) . "',\r\n\t\t\t\tallowsmilies = {$allowsmilies}\r\n\t\t\tWHERE usernoteid = " . $vbulletin->GPC['usernoteid'] . "\r\n\t\t");
 } else {
     /*insert query*/
     $db->query_write("\r\n\t\t\tINSERT INTO " . TABLE_PREFIX . "usernote (message, dateline, userid, posterid, title, allowsmilies)\r\n\t\t\tVALUES ('" . $db->escape_string($vbulletin->GPC['message']) . "', " . TIMENOW . ", {$userinfo['userid']}, " . $vbulletin->userinfo['userid'] . ", '" . $db->escape_string($vbulletin->GPC['title']) . "', {$allowsmilies})\r\n\t\t");
 }
 if (!$canview) {
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:usernote.php

示例4: verify_description

	/**
	* Verifies the description is valid and sets up the title for saving (wordwrap, censor, etc).
	*
	* @param	string	Title text
	*
	* @param	bool	Whether the title is valid
	*/
	function verify_description(&$desc)
	{
		// replace html-encoded spaces with actual spaces
		$desc = preg_replace('/&#(0*32|x0*20);/', ' ', $desc);

		require_once(DIR . '/includes/functions_newpost.php');
		// censor, remove all caps subjects, and htmlspecialchars post title
		$desc = htmlspecialchars_uni(fetch_no_shouting_text(fetch_censored_text(trim($desc))));

		// do word wrapping
		$desc = fetch_word_wrapped_string($desc, $this->registry->options['blog_wordwrap']);

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

示例5: verify_title

 /**
  * Verifies that the title is valid
  *
  * @param	String	Title
  *
  * @return 	boolean	Returns true if title is valid
  */
 function verify_title(&$title)
 {
     // replace html-encoded spaces with actual spaces
     $title = preg_replace('/&#(0*32|x0*20);/', ' ', $title);
     // do word wrapping
     if ($this->registry->options['wordwrap'] != 0) {
         $title = fetch_word_wrapped_string($title);
     }
     require_once DIR . '/includes/functions_newpost.php';
     // censor, remove all caps subjects, and htmlspecialchars post title
     $title = htmlspecialchars_uni(fetch_no_shouting_text(fetch_censored_text($title)));
     $title = trim($title);
     if (empty($title)) {
         $this->error('invalid_title_specified');
         return false;
     }
     return true;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:25,代码来源:class_dm_event.php

示例6: verify_cleantext

 /**
  * Verify a clean (no markup) bit of text
  *
  * @param	string	Text
  */
 function verify_cleantext(&$clean_text)
 {
     $clean_text = trim(preg_replace('/&#(0*32|x0*20);/', ' ', $clean_text));
     // censor, remove all caps subjects
     require_once DIR . '/includes/functions_newpost.php';
     $clean_text = fetch_no_shouting_text(fetch_censored_text($clean_text));
     // do word wrapping
     if ($this->registry->options['wordwrap'] != 0) {
         $clean_text = fetch_word_wrapped_string($clean_text);
     }
     return true;
 }
开发者ID:holandacz,项目名称:nb4,代码行数:17,代码来源:class_dm_pt_issue.php

示例7: verify_title

	/**
	* Verifies the title is valid and sets up the title for saving (wordwrap, censor, etc).
	*
	* @param	string	Title text
	*
	* @param	bool	Whether the title is valid
	*/
	function verify_title(&$title)
	{
		// replace html-encoded spaces with actual spaces
		$title = preg_replace('/&#(0*32|x0*20);/', ' ', $title);

		// censor, remove all caps subjects, and htmlspecialchars post title
		$title = htmlspecialchars_uni(fetch_no_shouting_text(fetch_censored_text(trim($title))));

		// do word wrapping
		$title = fetch_word_wrapped_string($title, $this->registry->options['blog_wordwrap']);

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

示例8: photoplog_process_text

function photoplog_process_text($text, $catid, $is_title = false, $add_dots = false)
{
    global $vbulletin, $vbphrase, $photoplog_categoryoptions, $photoplog_ds_catopts;
    static $photoplog_parser = false;
    $do_html = false;
    $do_smilies = false;
    $do_bbcode = false;
    $do_imgcode = false;
    $do_parseurl = false;
    $catid = intval($catid);
    if (!is_array($photoplog_ds_catopts)) {
        $photoplog_ds_catopts = array();
    }
    if (in_array($catid, array_keys($photoplog_ds_catopts))) {
        $photoplog_categorybit = $photoplog_ds_catopts[$catid]['options'];
        $photoplog_catoptions = convert_bits_to_array($photoplog_categorybit, $photoplog_categoryoptions);
        $do_html = $photoplog_catoptions['allowhtml'] ? true : false;
        $do_smilies = $photoplog_catoptions['allowsmilies'] ? true : false;
        $do_bbcode = $photoplog_catoptions['allowbbcode'] ? true : false;
        $do_imgcode = $photoplog_catoptions['allowimgcode'] ? true : false;
        $do_parseurl = $photoplog_catoptions['allowparseurl'] ? true : false;
    }
    $text = fetch_censored_text($text);
    $text = fetch_word_wrapped_string($text);
    require_once DIR . '/includes/functions_newpost.php';
    if ($is_title) {
        $text = fetch_no_shouting_text($text);
        $max_len = 255;
        if (vbstrlen($text) > $max_len) {
            $text = fetch_trimmed_title($text, $max_len);
            $text = photoplog_regexp_text($text);
        }
        if (empty($text)) {
            $text = $vbphrase['photoplog_untitled'];
        }
        $text = htmlspecialchars_uni($text);
        return $text;
    }
    if ($add_dots) {
        $max_len = 100;
        if ($vbulletin->options['lastthreadchars'] != 0) {
            $max_len = $vbulletin->options['lastthreadchars'] * 2;
        }
    } else {
        $max_len = min(vbstrlen($text), 15360000);
        if ($vbulletin->options['postmaxchars'] != 0) {
            $max_len = $vbulletin->options['postmaxchars'];
        }
    }
    if (vbstrlen($text) > $max_len) {
        $text = fetch_trimmed_title($text, $max_len);
        $text = photoplog_regexp_text($text);
    }
    if ($do_parseurl) {
        $text = convert_url_to_bbcode($text);
    }
    if (empty($text)) {
        $text = $vbphrase['photoplog_not_available'];
    }
    $text = fetch_no_shouting_text($text);
    if (!$photoplog_parser) {
        require_once DIR . '/includes/class_bbcode.php';
        $photoplog_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
    }
    $text = $photoplog_parser->do_parse($text, $do_html, $do_smilies, $do_bbcode, $do_imgcode, true, false);
    return $text;
}
开发者ID:holandacz,项目名称:nb4,代码行数:67,代码来源:functions.php


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