• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP strip_bbcode函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $messageinfo =& $this->content['visitormessage'][$activity['contentid']];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     $userinfo2 =& $this->content['user'][$messageinfo['userid']];
     $messageinfo['preview'] = strip_quotes($messageinfo['pagetext']);
     $messageinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($messageinfo['preview'], false, true, true, true), vb::$vbulletin->options['as_snippet'])));
     $userinfo = $this->fetchUser($activity['userid'], $messageinfo['postusername']);
     if ($fetchphrase) {
         if ($userinfo['userid']) {
             $phrase = construct_phrase($this->vbphrase['x_created_a_visitormessage_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']);
         } else {
             $phrase = construct_phrase($this->vbphrase['guest_x_created_a_visitormessage_y_in_z'], $userinfo['username'], fetch_seo_url('member', $userinfo2, $linkinfo), $messageinfo['vmid'], fetch_seo_url('member', $userinfo2), $userinfo2['username']);
         }
         return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('userinfo2', $userinfo2);
         $templater->register('linkinfo', array('vmid' => $messageinfo['vmid']));
         $templater->register('linkinfo2', array('tab' => 'visitor_messaging'));
         $templater->register('activity', $activity);
         $templater->register('messageinfo', $messageinfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:27,代码来源:visitormessage.php


示例2: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $postinfo =& $this->content['cms_post'][$activity['contentid']];
     $nodeinfo =& $this->content['cms_node'][$postinfo['nodeid']];
     $articleinfo =& $this->content['cms_article'][$nodeinfo['contentid']];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     $preview = strip_quotes($postinfo['pagetext']);
     $articleinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
     $articleinfo['fullurl'] = vB_Route::create('vBCms_Route_Content', $nodeinfo['nodeid'] . ($nodeinfo['url'] == '' ? '' : '-' . $nodeinfo['url']))->getCurrentURL();
     $nodeinfo['parenturl'] = $this->fetchParentUrl($nodeinfo['parentnode']);
     $nodeinfo['parenttitle'] = $this->fetchParentTitle($nodeinfo['parentnode']);
     $userinfo = $this->fetchUser($activity['userid'], $postinfo['username']);
     if ($fetchphrase) {
         if ($userinfo['userid']) {
             $phrase = construct_phrase($this->vbphrase['x_commented_on_an_article_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], $articleinfo['fullurl'], $nodeinfo['title'], $nodeinfo['parenturl'], $nodeinfo['parenttitle']);
         } else {
             $phrase = construct_phrase($this->vbphrase['guest_x_commented_on_an_article_y_in_z'], $userinfo['username'], $articleinfo['fullurl'], $nodeinfo['title'], $nodeinfo['parenturl'], $nodeinfo['parenttitle']);
         }
         return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('postinfo', $postinfo);
         $templater->register('activity', $activity);
         $templater->register('nodeinfo', $nodeinfo);
         $templater->register('articleinfo', $articleinfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:30,代码来源:comment.php


示例3: strip_code

 private function strip_code($text)
 {
     $text = censor_text($text);
     strip_bbcode($text);
     $text = str_replace(array(""", "/", "\n", "\t", "\r"), ' ', $text);
     $text = preg_replace(array("|http(.*)jpg|isU", "@(http(s)?://)?(([a-z0-9.-]+)?[a-z0-9-]+(!?\\.[a-z]{2,4}))@"), ' ', $text);
     return preg_replace("/[^A-ZА-ЯЁ.,-–?]+/ui", " ", $text);
 }
开发者ID:ezpz-cz,项目名称:web-plugins,代码行数:8,代码来源:listener.php


示例4: test_s9e

 public function test_s9e()
 {
     $phpbb_container = $this->get_test_case_helpers()->set_s9e_services();
     $original = '<r><B><s>[b]</s>bold<e>[/b]</e></B></r>';
     $expected = ' bold ';
     $actual = $original;
     strip_bbcode($actual);
     $this->assertSame($expected, $actual);
 }
开发者ID:MrAdder,项目名称:phpbb,代码行数:9,代码来源:strip_bbcode_test.php


示例5: mobiquo_chop

function mobiquo_chop($string)
{
    global $stylevar, $vbulletin;
    $string = preg_replace('/<br \\/\\>/', '', $string);
    $string = preg_replace('/(^\\s+)|(\\s+$)/', '', $string);
    $string = preg_replace('/\\n/', '', $string);
    $string = preg_replace('/\\r/', '', $string);
    $string = strip_quotes($string);
    $string = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($string, false, true), 200)));
    return $string;
}
开发者ID:patrickrolanddg,项目名称:dragonfly-tapatalk,代码行数:11,代码来源:common.php


示例6: prepareProperties

	/**
	 * Prepares properties for rendering.
	 */
	protected function prepareProperties()
	{
		parent::prepareProperties();

		// vB_View_Content has already htmlspecialchars_uni($this->title) so we should not htmlspecialchars_uni again here. Fixed bug #29663
		// $this->title = htmlspecialchars_uni($this->title);
		$this->css = new vB_View('vbcms_article_css');
		$this->author_phrase = new vB_Phrase('vbcms', 'author');

		if ($this->pagelist AND sizeof($this->pagelist) > 1)
		{
			// create a route
			$route = new vBCms_Route_Content();
			$route->setSegments(array('node' => $this->nodesegment, 'action' => vB_Router::getUserAction('vBCms_Controller_Content', 'View')));

			$pagelist = $this->pagelist;
			$pagelist[1] = $this->title;
			$this->pagelist = $pagelist;

			$pages = array();
			foreach ($this->pagelist AS $pagenum => $title)
			{
				$route->setParameter(0, $pagenum);
				$title = $title ? $title : new vB_Phrase('vbcms', 'page_x', $pagenum);

				// undo the 'stop_parse' from the [page] bbcode and strip bbcode and html
				$title = vbchop(strip_tags(strip_bbcode(str_replace(array('&#91;', '&#93;'), array('[', ']'), $title))), 75);

				$pages[$pagenum] = array(
					'url'      => $route->getCurrentURL(null, array($pagenum)),
					'title'    => htmlspecialchars_uni($title),
					'selected' => ($pagenum == $this->current_page) ? 1 : 0
				);
			}

			if ($this->current_page > 1)
			{
				$this->prev_page_url = $pages[$this->current_page - 1]['url'];
				$this->prev_page_phrase = new vB_Phrase('vbcms', 'previous');
			}

			if ($this->current_page < sizeof($pages))
			{
				$this->next_page_url = $pages[$this->current_page + 1]['url'];
				$this->next_page_phrase = new vB_Phrase('vbcms', 'next');
			}

			$this->pagelist = $pages;
		}
		else
		{
			$this->pagelist = false;
		}
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:57,代码来源:article.php


示例7: get_short_content

function get_short_content($post_id, $length = 200)
{
    global $db;
    list($txt) = $db->sql_ufetchrow('SELECT post_text FROM ' . POSTS_TEXT_TABLE . ' WHERE post_id=' . $post_id);
    $txt = preg_replace('/\\[url.*?\\].*?\\[\\/url.*?\\]/', '[url]', $txt);
    $txt = preg_replace('/\\[img.*?\\].*?\\[\\/img.*?\\]/', '[img]', $txt);
    $txt = preg_replace('/[\\n\\r\\t]+/', ' ', $txt);
    strip_bbcode($txt);
    $txt = html_entity_decode($txt, ENT_QUOTES, 'UTF-8');
    $txt = function_exists('mb_substr') ? mb_substr($txt, 0, $length) : substr($txt, 0, $length);
    return $txt;
}
开发者ID:patrickrolanddg,项目名称:dragonfly-tapatalk,代码行数:12,代码来源:mobiquo_common.php


示例8: construct_threaded_post_link

function construct_threaded_post_link($post, $imageString, $depth, $haschildren, $highlightpost = false)
{
    global $vbulletin, $stylevar, $bgclass, $curpostid, $parent_postids, $morereplies, $threadedmode, $vbphrase, $postattach;
    global $threadinfo;
    // ugly
    static $lasttitle;
    //print_array($post);
    if ($threadedmode == 2 and $highlightpost) {
        $highlightpost = 1;
    } else {
        $highlightpost = 0;
    }
    // write 'more replies below' link
    if ($vbulletin->options['threaded_listdepth'] != 0 and $depth == $vbulletin->options['threaded_listdepth'] and $post['postid'] != $curpostid and $haschildren and ($vbulletin->options['threaded_listdepth'] != 0 and $depth == $vbulletin->options['threaded_listdepth'] and !strpos(' ,' . $curpostid . $parent_postids . ',', ',' . $post['postid'] . ','))) {
        $morereplies[$post['postid']] = 1;
        return "writeLink({$post['postid']}, " . fetch_statusicon_from_child_posts($post['postid']) . ", 0, 0, \"{$imageString}\", \"\", \"more\", \"\", {$highlightpost});\n";
    }
    // get time fields
    $post['date'] = vbdate($vbulletin->options['dateformat'], $post['dateline'], 1);
    $post['time'] = vbdate($vbulletin->options['timeformat'], $post['dateline']);
    // get status icon and paperclip
    $post['statusicon'] = iif($post['dateline'] > $threadinfo['threadview'], 1, 0);
    // get paperclip
    $post['paperclip'] = 0;
    if (is_array($postattach["{$post['postid']}"])) {
        foreach ($postattach["{$post['postid']}"] as $attachment) {
            if ($attachment['visible']) {
                $post['paperclip'] = 1;
                break;
            }
        }
    }
    // echo some text from the post if no title
    if ($post['isdeleted']) {
        $post['title'] = $vbphrase['post_deleted'];
    } else {
        if (empty($post['title'])) {
            $pagetext = htmlspecialchars_uni($post['pagetext']);
            $pagetext = strip_bbcode($pagetext, 1);
            if (trim($pagetext) == '') {
                $post['title'] = $vbphrase['reply_prefix'] . ' ' . fetch_trimmed_title($lasttitle, $vbulletin->options['threaded_trimtitle']);
            } else {
                $post['title'] = '<i>' . fetch_trimmed_title($pagetext, $vbulletin->options['threaded_trimtitle']) . '</i>';
            }
        } else {
            $lasttitle = $post['title'];
            $post['title'] = fetch_trimmed_title($post['title'], $vbulletin->options['threaded_trimtitle']);
        }
    }
    ($hook = vBulletinHook::fetch_hook('showthread_threaded_construct_link')) ? eval($hook) : false;
    return "writeLink({$post['postid']}, {$post['statusicon']}, {$post['paperclip']}, " . intval($post['userid']) . ", \"{$imageString}\", \"" . addslashes_js($post['title'], '"') . "\", \"" . addslashes_js($post['date'], '"') . "\", \"" . addslashes_js($post['time'], '"') . "\", {$highlightpost});\n";
}
开发者ID:holandacz,项目名称:nb4,代码行数:52,代码来源:functions_threadedmode.php


示例9: submit_post_vk

 public function submit_post_vk($event)
 {
     $mode = $event['mode'];
     if ($mode == 'post' && !isset($_POST['vkrepost']) && !empty($this->config['vk_repost_group']) && !empty($this->config['vk_token'])) {
         $data = $event['data'];
         if (!$this->exclude_forum($data['forum_id'], $this->config['vk_repost_forum'])) {
             include_once $this->phpbb_root_path . 'includes/bbcode.' . $this->php_ext;
             $text = $data['message'];
             strip_bbcode($text);
             $this->vkRepost($text, generate_board_url() . '/viewtopic.' . $this->php_ext . '?t=' . $data['topic_id'], $event['subject']);
         }
     }
 }
开发者ID:bb3mobi,项目名称:vkRepost,代码行数:13,代码来源:listener.php


示例10: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     $userinfo =& $this->content['user'][$activity['userid']];
     $bloginfo =& $this->content['blog'][$activity['contentid']];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     $preview = strip_quotes($bloginfo['pagetext']);
     $bloginfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
     if ($fetchphrase) {
         return array('phrase' => construct_phrase($this->vbphrase['x_created_a_blog_entry_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('entry', $bloginfo), $bloginfo['title'], fetch_seo_url('blog', $bloginfo), $bloginfo['blog_title']), 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('activity', $activity);
         $templater->register('bloginfo', $bloginfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:18,代码来源:entry.php


示例11: fetchTemplate

 public function fetchTemplate($templatename, $activity, $skipgroup = false, $fetchphrase = false)
 {
     global $show;
     $postinfo =& $this->content['post'][$activity['contentid']];
     $threadinfo =& $this->content['thread'][$postinfo['threadid']];
     $foruminfo =& vB::$vbulletin->forumcache[$threadinfo['forumid']];
     $threadinfo['prefix_plain_html'] = htmlspecialchars_uni($this->vbphrase["prefix_{$threadinfo['prefixid']}_title_plain"]);
     $threadinfo['prefix_rich'] = $this->vbphrase["prefix_{$threadinfo['prefixid']}_title_rich"];
     $activity['postdate'] = vbdate(vB::$vbulletin->options['dateformat'], $activity['dateline'], true);
     $activity['posttime'] = vbdate(vB::$vbulletin->options['timeformat'], $activity['dateline']);
     $preview = strip_quotes($postinfo['pagetext']);
     $postinfo['preview'] = htmlspecialchars_uni(fetch_censored_text(fetch_trimmed_title(strip_bbcode($preview, false, true, true, true), vb::$vbulletin->options['as_snippet'])));
     $forumperms = fetch_permissions($threadinfo['forumid']);
     $show['threadcontent'] = $forumperms & vB::$vbulletin->bf_ugp_forumpermissions['canviewthreads'] ? true : false;
     $userinfo = $this->fetchUser($activity['userid'], $postinfo['username']);
     if ($fetchphrase) {
         if ($threadinfo['pollid']) {
             if ($userinfo['userid']) {
                 $phrase = construct_phrase($this->vbphrase['x_replied_to_a_poll_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
             } else {
                 $phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_poll_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
             }
         } else {
             if ($userinfo['userid']) {
                 $phrase = construct_phrase($this->vbphrase['x_replied_to_a_thread_y_in_z'], fetch_seo_url('member', $userinfo), $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
             } else {
                 $phrase = construct_phrase($this->vbphrase['guest_x_replied_to_a_thread_y_in_z'], $userinfo['username'], fetch_seo_url('thread', $threadinfo), $threadinfo['prefix_rich'], $threadinfo['title'], fetch_seo_url('forum', $foruminfo), $foruminfo['title']);
             }
         }
         return array('phrase' => $phrase, 'userinfo' => $userinfo, 'activity' => $activity);
     } else {
         $templater = vB_Template::create($templatename);
         $templater->register('userinfo', $userinfo);
         $templater->register('activity', $activity);
         $templater->register('threadinfo', $threadinfo);
         $templater->register('postinfo', $postinfo);
         $templater->register('pageinfo', array('p' => $postinfo['postid']));
         $templater->register('foruminfo', $foruminfo);
         return $templater->render();
     }
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:41,代码来源:post.php


示例12: handle_bbcode_goldbrick

 /**
  * Handles BBCode [media] (or whatever $tag is)
  *
  * @param	object		vB_BbCodeParser
  * @param	string		Media URL or attachment ID
  * @param	string		Custom media options
  * 
  * @return	string		Rendered media HTML
  */
 function handle_bbcode_goldbrick(vB_BbCodeParser $parser, $text, $options = '')
 {
     global $vbphrase, $vbulletin;
     if ($parser->registry->userinfo['permissions']['gb_permissions'] & $parser->registry->bf_ugp['gb_permissions']['canuse']) {
         $text = str_replace(array('&#91;', '&#93;'), array('[', ']'), $text);
         $text = strip_bbcode($text, true, true, false);
         if ($parser->is_wysiwyg()) {
             return sprintf('[%1$s%2$s]%3$s[/%1$s]', $parser->registry->options['gb_tag'], $options ? "&quot;{$options}&quot;" : '', $text);
         }
         require_once DIR . '/goldbrick/includes/functions_public.php';
         //$goldbrick = new goldbrick_media($vbulletin);
         $media = goldbrick_start_delivery($text, $options);
         if ($media) {
             return $media;
         } else {
             $media = goldbrick_process_bbcode($text, $options);
             $info = goldbrick_start_delivery($text, $options);
             return $info;
         }
     }
     return $vbphrase['gb_no_permissions'];
 }
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:bbcode_create.php


示例13: fetch_no_shouting_text

/**
 * Stops text being all UPPER CASE
 *
 * @param	string	The text to apply 'anti-shouting' to
 *
 * @return	string The text with 'anti-shouting' applied
 *
 */
function fetch_no_shouting_text($text)
{
    global $vbulletin;
    $effective_string = preg_replace('#[^a-z0-9\\s]#i', '\\2', strip_bbcode($text, true, false));
    if ($vbulletin->options['stopshouting'] and vbstrlen($effective_string) >= $vbulletin->options['stopshouting'] and $effective_string == strtoupper($effective_string)) {
        return fetch_sentence_case($text);
    } else {
        return $text;
    }
}
开发者ID:holandacz,项目名称:nb4,代码行数:18,代码来源:functions_newpost.php


示例14: fetch_permissions

         $forum_active_cache["{$current_forum['forumid']}"] = true;
         $current_forum = $vbulletin->forumcache["{$current_forum['parentid']}"];
     }
 }
 if (!$forum_active_cache["{$simthread['forumid']}"]) {
     continue;
 }
 $fperms = fetch_permissions($simthread['forumid']);
 if ($fperms & $vbulletin->bf_ugp_forumpermissions['canview'] and ($fperms & $vbulletin->bf_ugp_forumpermissions['canviewothers'] or $vbulletin->userinfo['userid'] != 0 and $simthread['postuserid'] == $vbulletin->userinfo['userid'])) {
     // format thread preview if there is one
     if (isset($ignore["{$simthread['postuserid']}"])) {
         $simthread['preview'] = '';
     } else {
         if (isset($simthread['preview']) and $vbulletin->options['threadpreview'] > 0) {
             $simthread['preview'] = strip_quotes($simthread['preview']);
             $simthread['preview'] = htmlspecialchars_uni(fetch_trimmed_title(strip_bbcode($simthread['preview'], false, true), $vbulletin->options['threadpreview']));
         }
     }
     $simthread['lastreplydate'] = vbdate($vbulletin->options['dateformat'], $simthread['lastpost'], true);
     $simthread['lastreplytime'] = vbdate($vbulletin->options['timeformat'], $simthread['lastpost']);
     if ($simthread['prefixid']) {
         $simthread['prefix_plain_html'] = htmlspecialchars_uni($vbphrase["prefix_{$simthread['prefixid']}_title_plain"]);
         $simthread['prefix_rich'] = $vbphrase["prefix_{$simthread['prefixid']}_title_rich"];
     } else {
         $simthread['prefix_plain_html'] = '';
         $simthread['prefix_rich'] = '';
     }
     $simthread['title'] = fetch_censored_text($simthread['title']);
     ($hook = vBulletinHook::fetch_hook('showthread_similarthreadbit')) ? eval($hook) : false;
     $templater = vB_Template::create('showthread_similarthreadbit');
     $templater->register('simthread', $simthread);
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:showthread.php


示例15: array

		{
			$bbcode_bitfield = $text_only_message = '';
			$attach_list = array();

			while ($row = $db->sql_fetchrow($result))
			{
				// We pre-process some variables here for later usage
				$row['post_text'] = censor_text($row['post_text']);

				$text_only_message = $row['post_text'];
				// make list items visible as such
				if ($row['bbcode_uid'])
				{
					$text_only_message = str_replace('[*:' . $row['bbcode_uid'] . ']', '&sdot;&nbsp;', $text_only_message);
					// no BBCode in text only message
					strip_bbcode($text_only_message, $row['bbcode_uid']);
				}

				if ($return_chars == -1 || utf8_strlen($text_only_message) < ($return_chars + 3))
				{
					$row['display_text_only'] = false;
					$bbcode_bitfield = $bbcode_bitfield | base64_decode($row['bbcode_bitfield']);

					// Does this post have an attachment? If so, add it to the list
					if ($row['post_attachment'] && $config['allow_attachments'])
					{
						$attach_list[$row['forum_id']][] = $row['post_id'];
					}
				}
				else
				{
开发者ID:renemilk,项目名称:spring-website,代码行数:31,代码来源:search.php


示例16: preg_replace

             $post['posticonpath'] = $vbulletin->options['showdeficon'];
             $post['posticontitle'] = '';
         } else {
             $post['posticon'] = false;
             $post['posticonpath'] = '';
             $post['posticontitle'] = '';
         }
     }
 } else {
     $post['posticon'] = false;
     $post['posticonpath'] = '';
     $post['posticontitle'] = '';
 }
 $post['pagetext'] = preg_replace('#\\[quote(=(&quot;|"|\'|)??.*\\2)?\\](((?>[^\\[]*?|(?R)|.))*)\\[/quote\\]#siU', '', $post['pagetext']);
 // get first 200 chars of page text
 $post['pagetext'] = htmlspecialchars_uni(fetch_censored_text(trim(fetch_trimmed_title(strip_bbcode($post['pagetext'], 1), 200))));
 // get post title
 if ($post['posttitle'] == '') {
     $post['posttitle'] = fetch_trimmed_title($post['pagetext'], 50);
 } else {
     $post['posttitle'] = fetch_censored_text($post['posttitle']);
 }
 // format post text
 $post['pagetext'] = nl2br($post['pagetext']);
 // get info from post
 $post = process_thread_array($post, $lastread["{$post['forumid']}"], $post['allowicons']);
 $show['managepost'] = (can_moderate($post['forumid'], 'candeleteposts') or can_moderate($post['forumid'], 'canremoveposts')) ? true : false;
 $show['approvepost'] = can_moderate($post['forumid'], 'canmoderateposts') ? true : false;
 $show['managethread'] = can_moderate($post['forumid'], 'canmanagethreads') ? true : false;
 $show['disabled'] = ($show['managethread'] or $show['managepost'] or $show['approvepost']) ? false : true;
 $show['moderated'] = (!$post['visible'] or !$post['thread_visible'] and $post['postid'] == $post['firstpostid']) ? true : false;
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:moderation.php


示例17: while

 $first = $itemcount + 1;
 if ($db->num_rows($getevents)) {
     $show['haveevents'] = true;
     while ($event = $db->fetch_array($getevents)) {
         if (empty($reminders["{$event['reminder']}"])) {
             $event['reminder'] = 3600;
         }
         $event['reminder'] = $vbphrase[$reminders[$event['reminder']]];
         $offset = $event['dst'] ? $vbulletin->userinfo['timezoneoffset'] : $vbulletin->userinfo['tzoffset'];
         $event = array_merge($event, convert_bits_to_array($event['options'], $vbulletin->bf_misc_useroptions));
         $event = array_merge($event, convert_bits_to_array($event['adminoptions'], $vbulletin->bf_misc_adminoptions));
         cache_permissions($event, false);
         fetch_avatar_from_userinfo($event, true);
         $event['dateline_from_user'] = $event['dateline_from'] + $offset * 3600;
         $event['dateline_to_user'] = $event['dateline_to'] + $offset * 3600;
         $event['preview'] = htmlspecialchars_uni(strip_bbcode(fetch_trimmed_title(strip_quotes($event['event']), 300), false, true));
         $event = fetch_event_date_time($event);
         $event['calendar'] = $calendarcache["{$event['calendarid']}"];
         $show['singleday'] = !empty($event['singleday']) ? true : false;
         ($hook = vBulletinHook::fetch_hook('calendar_viewreminder_event')) ? eval($hook) : false;
         $oppositesort = $sortorder == 'asc' ? 'desc' : 'asc';
         $templater = vB_Template::create('calendar_reminder_eventbit');
         $templater->register('date1', $date1);
         $templater->register('date2', $date2);
         $templater->register('daterange', $daterange);
         $templater->register('event', $event);
         $templater->register('eventdate', $eventdate);
         $templater->register('recurcriteria', $recurcriteria);
         $templater->register('time1', $time1);
         $templater->register('time2', $time2);
         $eventbits .= $templater->render();
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:calendar.php


示例18: get_display_title

 /**
  * Return title string for display
  *
  * If there is no title given, we'll construct one from the post text
  */
 public function get_display_title()
 {
     $title = $this->get_field('title');
     if ($title == '') {
         $title = fetch_trimmed_title(strip_bbcode($this->get_field('pagetext'), true, false, true), 50);
     } else {
         $title = fetch_censored_text($title);
     }
     return $title;
 }
开发者ID:0hyeah,项目名称:yurivn,代码行数:15,代码来源:post.php


示例19: verify_pagetext

 /**
  * 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


示例20: lotusjeff_socialshare_strip_code

 /**
  * Clean up post_text and forum_desc for non text data
  *
  * @return $text
  * @access private
  */
 private function lotusjeff_socialshare_strip_code($text)
 {
     $text = censor_text($text);
     strip_bbcode($text);
     $text = str_replace(array("&quot;", "/", "\n", "\t", "\r"), ' ', $text);
     $text = preg_replace(array("|http(.*)jpg|isU", "@(http(s)?://)?(([a-z0-9.-]+)?[a-z0-9-]+(!?\\.[a-z]{2,4}))@"), ' ', $text);
     $text = preg_replace("/[^A-ZА-ЯЁ.,-–?]+/ui", " ", $text);
     $text = preg_replace("/\\[(.*)?\\](.*)?\\[(.*)?\\]/", ' ', $text);
     if (strlen($text) > 180) {
         $text_ar = explode("\n", wordwrap($text, 180));
         $text = $text_ar[0] . '...';
     }
     return $text;
 }
开发者ID:3D-I,项目名称:socialshare,代码行数:20,代码来源:listener.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP strip_bracket函数代码示例发布时间:2022-05-23
下一篇:
PHP strip_accents函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap