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


PHP convert_wysiwyg_html_to_bbcode函数代码示例

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


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

示例1: parse_wysiwyg_html

function parse_wysiwyg_html($html, $ishtml = 0, $forumid = 0, $allowsmilie = 1)
{
    global $vbulletin;
    if ($ishtml) {
        // parse HTML into vbcode
        // I DON'T THINK THIS IS EVER USED NOW - KIER
        $html = convert_wysiwyg_html_to_bbcode($html);
    } else {
        $html = unhtmlspecialchars($html, 0);
    }
    // parse the message back into WYSIWYG-friendly HTML
    require_once DIR . '/includes/class_bbcode_alt.php';
    $wysiwyg_parser =& new vB_BbCodeParser_Wysiwyg($vbulletin, fetch_tag_list());
    $wysiwyg_parser->set_parse_userinfo($vbulletin->userinfo);
    return $wysiwyg_parser->parse($html, $forumid, $allowsmilie);
}
开发者ID:benyamin20,项目名称:vbregistration,代码行数:16,代码来源:functions_wysiwyg.php

示例2: intval

			default:
				if (intval($vbulletin->GPC['parsetype']))
				{
					$parsetype = intval($vbulletin->GPC['parsetype']);
					$foruminfo = fetch_foruminfo($parsetype);
					$dohtml = $foruminfo['allowhtml']; break;
				}
				else
				{
					$dohtml = false;
				}

				($hook = vBulletinHook::fetch_hook('editor_switch_wysiwyg_to_standard')) ? eval($hook) : false;
		}

		$xml->add_tag('message', process_replacement_vars(convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $dohtml)));
	}

	$xml->print_xml();
}

// #############################################################################
// mark forums read

if ($_POST['do'] == 'markread')
{
	$vbulletin->input->clean_gpc('p', 'forumid', TYPE_UINT);

	require_once(DIR . '/includes/functions_misc.php');
	$mark_read_result = mark_forums_read($foruminfo['forumid']);
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:ajax.php

示例3: foreach

 foreach ($xml->fetch_items() as $item) {
     if ($vbulletin->GPC['maxresults'] and $count++ >= $vbulletin->GPC['maxresults']) {
         break;
     }
     if (!empty($item['content:encoded'])) {
         $content_encoded = true;
     }
     $title = $bbcode_parser->parse(strip_bbcode(convert_wysiwyg_html_to_bbcode($xml->parse_template($vbulletin->GPC['titletemplate'], $item))), 0, false);
     if ($vbulletin->GPC['options']['html2bbcode']) {
         $body_template = nl2br($vbulletin->GPC['bodytemplate']);
     } else {
         $body_template = $vbulletin->GPC['bodytemplate'];
     }
     $body = $xml->parse_template($body_template, $item);
     if ($vbulletin->GPC['options']['html2bbcode']) {
         $body = convert_wysiwyg_html_to_bbcode($body, false, true);
     }
     $body = $bbcode_parser->parse($body, 0, false);
     $output .= '<div class="alt2" style="border:inset 1px; padding:5px; width:400px; height: 175px; margin:10px; overflow: auto;"><h3><em>' . $title . '</em></h3>' . $body . '</div>';
 }
 $feed = array();
 foreach ($input_vars as $varname => $foo) {
     $feed["{$varname}"] = $vbulletin->GPC["{$varname}"];
 }
 define('FEED_SAVE_ERROR', true);
 $_REQUEST['do'] = 'edit';
 print_form_header('', '');
 print_table_header($vbphrase['preview_feed']);
 if ($content_encoded) {
     print_description_row($vbphrase['feed_supports_content_encoded']);
 }
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:rssposter.php

示例4: datamanager_init

     // insert item as thread
 // insert item as thread
 case 'thread':
 default:
     // init thread/firstpost datamanager
     $itemdata =& datamanager_init('Thread_FirstPost', $vbulletin, $error_type, 'threadpost');
     $itemdata->set_info('forum', fetch_foruminfo($feed['forumid']));
     $itemdata->set_info('user', $feed);
     $itemdata->set_info('is_automated', 'rss');
     $itemdata->set_info('chop_title', true);
     $itemdata->set('iconid', $feed['iconid']);
     $itemdata->set('sticky', $feed['rssoptions'] & $vbulletin->bf_misc_feedoptions['stickthread'] ? 1 : 0);
     $itemdata->set('forumid', $feed['forumid']);
     $itemdata->set('prefixid', $feed['prefixid']);
     $itemdata->set('userid', $feed['userid']);
     $itemdata->set('title', strip_bbcode(convert_wysiwyg_html_to_bbcode($feed['xml']->parse_template($feed['titletemplate'], $item))));
     $itemdata->set('pagetext', $pagetext);
     $itemdata->set('visible', $feed['rssoptions'] & $vbulletin->bf_misc_feedoptions['moderatethread'] ? 0 : 1);
     $itemdata->set('allowsmilie', $feed['rssoptions'] & $vbulletin->bf_misc_feedoptions['allowsmilies'] ? 1 : 0);
     $itemdata->set('showsignature', $feed['rssoptions'] & $vbulletin->bf_misc_feedoptions['showsignature'] ? 1 : 0);
     $itemdata->set('ipaddress', '');
     $threadactiontime = $feed['threadactiondelay'] > 0 ? TIMENOW + $feed['threadactiondelay'] * 3600 : 0;
     if ($itemid = $itemdata->save()) {
         $itemtype = 'thread';
         $itemtitle = $itemdata->fetch_field('title');
         $itemlink = "../showthread.php?t={$itemid}";
         if (defined('IN_CONTROL_PANEL')) {
             echo "<li><a href=\"{$itemlink}\" target=\"feed\">{$itemtitle}</a></li>";
         }
         $rsslog_insert_sql[] = "({$item['rssfeedid']}, {$itemid}, '{$itemtype}', '" . $vbulletin->db->escape_string($uniquehash) . "', '" . $vbulletin->db->escape_string($item['contenthash']) . "', " . TIMENOW . ", {$threadactiontime})";
         $cronlog_items["{$item['rssfeedid']}"][] = "\t<li>{$vbphrase[$itemtype]} <a href=\"{$itemlink}\" target=\"logview\"><em>{$itemtitle}</em></a></li>";
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:rssposter.php

示例5: construct_edit_toolbar


//.........这里部分代码省略.........
                $editor_height = $vbulletin->input->clean_gpc('c', 'editor_height', vB_Cleaner::TYPE_UINT);
                $editor_height = $editor_height > 100 ? $editor_height : 250;
                $editor_template_name = $toolbartype ? 'editor_toolbar_on' : 'editor_toolbar_off';
            }
            break;
    }
    // init the variables used by the templates built by this function
    $vBeditJs = array('normalmode' => 'false');
    $vBeditTemplate = array('clientscript' => '', 'fontfeedback' => '', 'sizefeedback' => '', 'smiliepopup' => '');
    $extrabuttons = '';
    // Legacy Hook 'editor_toolbar_start' Removed //
    // show a post editing toolbar of some sort
    if ($show['editor_toolbar']) {
        if ($can_attach) {
            $show['attach'] = true;
        }
        // get extra buttons... experimental at the moment
        $extrabuttons = construct_editor_extra_buttons($editorid, $allow_custom_bbcode);
        if ($toolbartype == 2 or defined('VB_API') and VB_API === true) {
            // got to parse the message to be displayed from bbcode into HTML
            if ($text !== '') {
                if ($editor_override) {
                    $newpost['message'] = $editor_override->parse_for_wysiwyg($text, array('allowsmilies' => $allowsmilie and $parsesmilie, 'ishtml' => $ishtml));
                } else {
                    require_once DIR . '/includes/functions_wysiwyg.php';
                    $newpost['message'] = parse_wysiwyg_html($text, $ishtml, $forumid, iif($allowsmilie and $parsesmilie, 1, 0));
                }
            } else {
                $newpost['message'] = '';
            }
            $newpost['message'] = htmlspecialchars($newpost['message']);
            if (defined('VB_API') and VB_API === true) {
                if ($ishtml) {
                    $newpost['message_bbcode'] = convert_wysiwyg_html_to_bbcode($text);
                } else {
                    $newpost['message_bbcode'] = $text;
                }
            }
        } else {
            $newpost['message'] = $text;
            // set mode based on cookie set by javascript
            /*$vbulletin->input->clean_gpc('c', COOKIE_PREFIX . 'vbcodemode', vB_Cleaner::TYPE_INT);
            		$modechecked[$vbulletin->GPC[COOKIE_PREFIX . 'vbcodemode']] = 'checked="checked"';*/
        }
    } else {
        // do not show a post editing toolbar
        $newpost['message'] = $text;
    }
    // disable smilies option and clickable smilie
    $show['smiliebox'] = false;
    $smiliebox = '';
    $smiliepopup = '';
    $disablesmiliesoption = '';
    if ($editor_type == 'qr' or $editor_type == 'qr_small') {
        // no smilies
    } else {
        if ($allowsmilie and $show['editor_toolbar']) {
            // deal with disable smilies option
            if (!isset($checked['disablesmilies'])) {
                $vbulletin->input->clean_gpc('r', 'disablesmilies', vB_Cleaner::TYPE_BOOL);
                $checked['disablesmilies'] = iif($vbulletin->GPC['disablesmilies'], 'checked="checked"');
            }
            $templater = vB_Template::create('newpost_disablesmiliesoption');
            $templater->register('checked', $checked);
            $disablesmiliesoption = $templater->render();
            if ($toolbartype and $vbulletin->options['wysiwyg_smtotal'] > 0) {
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:67,代码来源:functions_editor.php

示例6: array

// ############################### start update post ###############################
if ($_POST['do'] == 'updatepost') {
    // Variables reused in templates
    $posthash = $vbulletin->input->clean_gpc('p', 'posthash', TYPE_NOHTML);
    $poststarttime = $vbulletin->input->clean_gpc('p', 'poststarttime', TYPE_UINT);
    $vbulletin->input->clean_array_gpc('p', array('stickunstick' => TYPE_BOOL, 'openclose' => TYPE_BOOL, 'wysiwyg' => TYPE_BOOL, 'message' => TYPE_STR, 'title' => TYPE_STR, 'prefixid' => TYPE_NOHTML, 'iconid' => TYPE_UINT, 'parseurl' => TYPE_BOOL, 'signature' => TYPE_BOOL, 'disablesmilies' => TYPE_BOOL, 'reason' => TYPE_NOHTML, 'preview' => TYPE_STR, 'folderid' => TYPE_UINT, 'emailupdate' => TYPE_UINT, 'ajax' => TYPE_BOOL, 'advanced' => TYPE_BOOL, 'postcount' => TYPE_UINT, 'podcasturl' => TYPE_STR, 'podcastsize' => TYPE_UINT, 'podcastexplicit' => TYPE_BOOL, 'podcastkeywords' => TYPE_STR, 'podcastsubtitle' => TYPE_STR, 'podcastauthor' => TYPE_STR, 'quickeditnoajax' => TYPE_BOOL));
    // Make sure the posthash is valid
    ($hook = vBulletinHook::fetch_hook('editpost_update_start')) ? eval($hook) : false;
    if (md5($poststarttime . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt']) != $posthash) {
        $posthash = 'invalid posthash';
        // don't phrase me
    }
    // ### PREP INPUT ###
    if ($vbulletin->GPC['wysiwyg']) {
        require_once DIR . '/includes/functions_wysiwyg.php';
        $edit['message'] = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $foruminfo['allowhtml']);
    } else {
        $edit['message'] =& $vbulletin->GPC['message'];
    }
    $cansubscribe = true;
    // Are we editing someone else's post? If so load that users subscription info for this thread.
    if ($vbulletin->userinfo['userid'] != $postinfo['userid']) {
        if ($postinfo['userid']) {
            $userinfo = fetch_userinfo($postinfo['userid']);
            cache_permissions($userinfo);
        }
        $cansubscribe = ($userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canview'] and $userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canviewthreads'] and ($threadinfo['postuserid'] == $userinfo['userid'] or $userinfo['forumpermissions']["{$foruminfo['forumid']}"] & $vbulletin->bf_ugp_forumpermissions['canviewothers']));
        if ($cansubscribe and $otherthreadinfo = $db->query_first_slave("\n\t\t\tSELECT emailupdate, folderid\n\t\t\tFROM " . TABLE_PREFIX . "subscribethread\n\t\t\tWHERE threadid = {$threadinfo['threadid']} AND\n\t\t\t\tuserid = {$postinfo['userid']} AND\n\t\t\t\tcanview = 1")) {
            $threadinfo['issubscribed'] = true;
            $threadinfo['emailupdate'] = $otherthreadinfo['emailupdate'];
            $threadinfo['folderid'] = $otherthreadinfo['folderid'];
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:editpost.php

示例7: intval

                break;
            case 'signature':
                $dohtml = $vbulletin->userinfo['permissions']['signaturepermissions'] & $vbulletin->bf_ugp_signaturepermissions['allowhtml'];
                break;
            default:
                if (intval($vbulletin->GPC['parsetype'])) {
                    $parsetype = intval($vbulletin->GPC['parsetype']);
                    $foruminfo = fetch_foruminfo($parsetype);
                    $dohtml = $foruminfo['allowhtml'];
                    break;
                } else {
                    $dohtml = false;
                }
                ($hook = vBulletinHook::fetch_hook('editor_switch_wysiwyg_to_standard')) ? eval($hook) : false;
        }
        $xml->add_tag('message', convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $dohtml));
    }
    $xml->print_xml();
}
// #############################################################################
// mark forums read
if ($_POST['do'] == 'markread') {
    $vbulletin->input->clean_gpc('p', 'forumid', TYPE_UINT);
    require_once DIR . '/includes/functions_misc.php';
    $mark_read_result = mark_forums_read($foruminfo['forumid']);
    $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
    $xml->add_group('readmarker');
    $xml->add_tag('phrase', $mark_read_result['phrase']);
    $xml->add_tag('url', $mark_read_result['url']);
    $xml->add_group('forums');
    if (is_array($mark_read_result['forumids'])) {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:ajax.php

示例8: eval

			'humanverify'      => TYPE_ARRAY,
			'loggedinuser'     => TYPE_UINT,
			'fromquickcomment' => TYPE_BOOL,
			'preview'          => TYPE_STR,
			'advanced'         => TYPE_BOOL,
			'fromconverse'     => TYPE_BOOL,
			'u2'               => TYPE_UINT,
		));

		($hook = vBulletinHook::fetch_hook('visitor_message_post_start')) ? eval($hook) : false;

		// unwysiwygify the incoming data
		if ($vbulletin->GPC['wysiwyg'])
		{
			require_once(DIR . '/includes/functions_wysiwyg.php');
			$vbulletin->GPC['message'] = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'],  $vbulletin->options['allowhtml']);
		}

		// parse URLs in message text
		if ($vbulletin->options['allowbbcode'] AND $vbulletin->GPC['parseurl'])
		{
			require_once(DIR . '/includes/functions_newpost.php');
			$vbulletin->GPC['message'] = convert_url_to_bbcode($vbulletin->GPC['message']);
		}

		$message = array(
			'message'        =>& $vbulletin->GPC['message'],
			'userid'         =>& $userinfo['userid'],
			'postuserid'     =>& $vbulletin->userinfo['userid'],
			'disablesmilies' =>& $vbulletin->GPC['disablesmilies'],
			'parseurl'       =>& $vbulletin->GPC['parseurl'],
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:visitormessage.php

示例9: array

         $itemtype = 'announcement';
         $threadactiontime = 0;
         if (defined('IN_CONTROL_PANEL')) {
             echo "<li><a href=\"{$itemlink}\" target=\"feed\">{$itemtitle}</a></li>";
         }
         $rsslog_insert_sql[] = array('rssfeedid' => $item['rssfeedid'], 'itemid' => $itemid, 'itemtype' => $itemtype, 'uniquehash' => vB::getDbAssertor()->escape_string($uniquehash), 'contenthash' => vB::getDbAssertor()->escape_string($item['contenthash']), 'dateline' => vB::getRequest()->getTimeNow(), 'topicactiontime' => $threadactiontime);
         $cronlog_items["{$item['rssfeedid']}"][] = "\t<li>{$vbphrase[$itemtype]} <a href=\"{$itemlink}\" target=\"logview\"><em>{$itemtitle}</em></a></li>";
         $announcementCache[$feed['nodeid']] = 'vB_Announcements_' . $feed['nodeid'];
     }
     break;
     // insert item as thread
 // insert item as thread
 case 'thread':
 default:
     $pagetext = $feed['xml']->parse_template($feed['bodytemplate'], $item);
     $itemtitle = strip_bbcode(convert_wysiwyg_html_to_bbcode($feed['xml']->parse_template($feed['titletemplate'], $item)));
     if (empty($itemtitle)) {
         $itemtitle = vB_Phrase::fetchSinglePhrase('rssposter_post_from_x', array($feed['title']));
     }
     $itemAddResult = vB_Library::instance('content_text')->add(array('userid' => $feed['userid'], 'sticky' => $feed['rssoptions'] & $bf_misc_feedoptions['stickthread'] ? 1 : 0, 'parentid' => $feed['nodeid'], 'title' => $itemtitle, 'rawtext' => $pagetext, 'approved' => $feed['rssoptions'] & $bf_misc_feedoptions['moderatethread'] ? 0 : 1, 'showapproved' => $feed['rssoptions'] & $bf_misc_feedoptions['moderatethread'] ? 0 : 1, 'iconid' => !empty($feed['iconid']) ? $feed['iconid'] : 0), array('autoparselinks' => 1, 'nl2br' => $nl2br, 'skipDupCheck' => 1), $convertHtmlToBbcode);
     $itemid = !empty($itemAddResult['nodeid']) ? $itemAddResult['nodeid'] : false;
     $threadactiontime = $feed['topicactiondelay'] > 0 ? vB::getRequest()->getTimeNow() + $feed['topicactiondelay'] * 3600 : 0;
     if ($itemid) {
         $itemtype = 'topic';
         $itemlink = vB_Api::instanceInternal('route')->getAbsoluteNodeUrl($itemid);
         if (defined('IN_CONTROL_PANEL')) {
             echo "<li><a href=\"{$itemlink}\" target=\"feed\">{$itemtitle}</a></li>";
         }
         $rsslog_insert_sql[] = array('rssfeedid' => $item['rssfeedid'], 'itemid' => $itemid, 'itemtype' => $itemtype, 'uniquehash' => vB::getDbAssertor()->escape_string($uniquehash), 'contenthash' => vB::getDbAssertor()->escape_string($item['contenthash']), 'dateline' => vB::getRequest()->getTimeNow(), 'topicactiontime' => $threadactiontime);
         $cronlog_items["{$item['rssfeedid']}"][] = "\t<li>{$vbphrase[$itemtype]} <a href=\"{$itemlink}\" target=\"logview\"><em>{$itemtitle}</em></a></li>";
     }
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:rssposter.php

示例10: convert_wysiwyg_html_to_bbcode

         if ($_GET['do'] != 'edit') {
             $errors['upload'] = 'color=#FF0000"';
             //$errors['link'] = 'color=#FF0000"';
             $errors['message'] .= '<center>' . $vbphrase['ecdownloads_must_submit_file'] . '</center><br />';
         }
     }
 }
 if ($upload == true) {
     if (!strstr("|" . str_replace(" ", "|", $dl->ext) . "|", $ext)) {
         $errors['message'] .= '<center>' . $vbphrase['ecdownloads_invalid_extension'] . ': ' . $dl->ext . '</center><br />';
     }
 }
 if (!isset($errors)) {
     $_POST['desc'] = $_POST['message'];
     if ($_POST['wysiwyg'] == 1) {
         $_POST['desc'] = convert_wysiwyg_html_to_bbcode($_POST['message'], 0);
     } else {
         $_POST['desc'] =& $_POST['message'];
     }
     $_POST['desc'] = convert_url_to_bbcode($_POST['desc']);
     if ($upload) {
         $newfilename = TIMENOW % 100000 . '-' . $_FILES['upload']['name'];
         if (move_uploaded_file($_FILES['upload']['tmp_name'], $dl->url . $newfilename)) {
             chmod($dl->url . $newfilename, 0666);
             $size = @filesize($dl->url . $newfilename);
         } else {
             $errors['message'] .= '<center><span style="color: red;">The upload failed!  Upload error.</span></center><br />';
         }
     } else {
         if ($link) {
             $newfilename = $_POST['link'];
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:downloads.php

示例11: eval

        eval(print_standard_redirect(''));
    }
    $title = $vbulletin->input->clean_gpc('p', 'title', TYPE_STR);
    $title = addslashes($title);
    if (!$title) {
        $vbulletin->url = "cannedreplies.php?do=edit&id=" . $id;
        eval(print_standard_redirect(''));
    }
    $vbulletin->input->clean_array_gpc('p', array('message' => TYPE_STR, 'wysiwyg' => TYPE_BOOL));
    if ($vbulletin->GPC['wysiwyg']) {
        $reply = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], 1);
    } else {
        $reply = $vbulletin->GPC['message'];
    }
    if ($vbulletin->GPC['wysiwyg']) {
        $reply = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], 1);
    } else {
        $reply = $vbulletin->GPC['message'];
    }
    $db->query_write("UPDATE " . TABLE_PREFIX . "cannedreplies SET title = '" . $title . "', reply = '" . addslashes($reply) . "' WHERE id='" . $id . "' AND userid='" . $userid . "' ");
    $vbulletin->url = "cannedreplies.php";
    eval(print_standard_redirect(''));
}
// #############################################################################
if ($_REQUEST['do'] == 'edit') {
    $id = $vbulletin->input->clean_gpc('g', 'id', TYPE_UINT);
    if (!$id) {
        $vbulletin->url = "cannedreplies.php";
        eval(print_standard_redirect(''));
    }
    $userid = $vbulletin->userinfo['userid'];
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:cannedreplies.php

示例12: vB_BbCodeParser

     }
 }
 require_once DIR . '/includes/class_bbcode.php';
 $bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
 $output = '';
 $count = 0;
 $bbcodeApi = vB_Api::instanceInternal('bbcode');
 $bbcodeLibrary = vB_Library::instance('bbcode');
 foreach ($xml->fetch_items() as $item) {
     if ($vbulletin->GPC['maxresults'] and $count++ >= $vbulletin->GPC['maxresults']) {
         break;
     }
     if (!empty($item['content:encoded'])) {
         $content_encoded = true;
     }
     $title = $bbcode_parser->parse(strip_bbcode(convert_wysiwyg_html_to_bbcode($xml->parse_template($vbulletin->GPC['titletemplate'], $item))), 0, false);
     $body = $xml->parse_template($vbulletin->GPC['bodytemplate'], $item);
     $dobbcode = false;
     if ($vbulletin->GPC['options']['html2bbcode']) {
         $dobbcode = true;
         $body = nl2br($body);
         $body = $bbcodeApi->convertWysiwygTextToBbcode($body, array('autoparselinks' => 1));
     }
     $body = $bbcodeLibrary->doParse($body, true, false, $dobbcode);
     $output .= '<div class="alt2" style="border:inset 1px; padding:5px; width:400px; height: 175px; margin:10px; overflow: auto;"><h3><em>' . $title . '</em></h3>' . $body . '</div>';
 }
 $feed = array();
 foreach ($input_vars as $varname => $foo) {
     $feed["{$varname}"] = $vbulletin->GPC["{$varname}"];
 }
 define('FEED_SAVE_ERROR', true);
开发者ID:cedwards-reisys,项目名称:nexus-web,代码行数:31,代码来源:rssposter.php

示例13: str_replace

        $photoplog_html_output = str_replace("src=\"images/smilies/", "src=\"" . $vbulletin->options['bburl'] . "/images/smilies/", $photoplog_html_output);
        if ($photoplog_fileversion == 6) {
            $xml->add_tag('message', $photoplog_html_output);
        } else {
            echo $photoplog_html_output;
        }
    } else {
        switch ($vbulletin->GPC['parsetype']) {
            case 'nonforum':
                $dohtml = $do_html;
                break;
            default:
                $dohtml = 0;
        }
        $vbulletin->GPC['message'] = str_replace("src=\"" . $vbulletin->options['bburl'] . "/images/smilies/", "src=\"images/smilies/", $vbulletin->GPC['message']);
        if ($photoplog_fileversion == 6) {
            $xml->add_tag('message', convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $dohtml));
        } else {
            echo convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $dohtml);
        }
    }
    if ($photoplog_fileversion == 6) {
        $xml->print_xml();
    }
}
// ##################### REQUIRE VB AJAX IF NEEDED ########################
if (!$photoplog_ajax_flag && 1 == 2) {
    chdir(PHOTOPLOG_FWD);
    require_once DIR . '/ajax.php';
    chdir(PHOTOPLOG_BWD);
}
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:ajax.php

示例14: print_no_permission

             } else {
                 if (!($vbulletin->userinfo['calendarpermissions']["{$calendarinfo['calendarid']}"] & $vbulletin->bf_ugp_calendarpermissions['caneditevent'])) {
                     print_no_permission();
                 }
             }
         }
     }
 } else {
     if (!($vbulletin->userinfo['calendarpermissions']["{$calendarinfo['calendarid']}"] & $vbulletin->bf_ugp_calendarpermissions['canpostevent'])) {
         print_no_permission();
     }
 }
 // unwysiwygify the incoming data
 if ($vbulletin->GPC['wysiwyg']) {
     require_once DIR . '/includes/functions_wysiwyg.php';
     $message = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $calendarinfo['allowhtml']);
 } else {
     $message = $vbulletin->GPC['message'];
 }
 // init event datamanager class
 $eventdata =& datamanager_init('Event', $vbulletin, ERRTYPE_STANDARD);
 ($hook = vBulletinHook::fetch_hook('calendar_update_process')) ? eval($hook) : false;
 $eventdata->set_info('parseurl', $vbulletin->GPC['parseurl'] and $calendarinfo['allowbbcode']);
 $eventdata->setr_info('fromtime', $vbulletin->GPC['fromtime']);
 $eventdata->setr_info('totime', $vbulletin->GPC['totime']);
 $eventdata->setr_info('fromdate', $vbulletin->GPC['fromdate']);
 $eventdata->setr_info('todate', $vbulletin->GPC['todate']);
 $eventdata->setr_info('type', $vbulletin->GPC['type']);
 $eventdata->setr_info('recur', $vbulletin->GPC['recur']);
 $eventdata->set('title', $vbulletin->GPC['title']);
 $eventdata->set('event', $message);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:calendar.php

示例15: build_user_sidebar

			");
			if ($blocks['count'] >= $userinfo['permissions']['vbblog_custompages'])
			{
				print_no_permission();
			}
		}
	}

	// Sidebar
	$sidebar =& build_user_sidebar($userinfo, 0, 0, $rules);

	// unwysiwygify the incoming data
	if ($vbulletin->GPC['wysiwyg'])
	{
		require_once(DIR . '/includes/functions_wysiwyg.php');
		$vbulletin->GPC['message'] = convert_wysiwyg_html_to_bbcode($vbulletin->GPC['message'], $userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowhtml']);
	}

	// parse URLs in message text
	if ($userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowbbcode'] AND $vbulletin->GPC['parseurl'])
	{
		require_once(DIR . '/includes/functions_newpost.php');
		$vbulletin->GPC['message'] = convert_url_to_bbcode($vbulletin->GPC['message']);
	}

	$customblock = $sidebarinfo;
	$customblock['title']          = $vbulletin->GPC['title'];
	$customblock['disablesmilies'] = $vbulletin->GPC['disablesmilies'];
	$customblock['parseurl']       = ($userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowbbcode'] AND $vbulletin->GPC['parseurl']);
	$customblock['message']        = $vbulletin->GPC['message'];
	$customblock['type']           = $vbulletin->GPC['type'];
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:blog_usercp.php


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