Exemple #1
0
 require_once DIR . '/includes/class_rss_poster.php';
 require_once DIR . '/includes/functions_wysiwyg.php';
 $xml = new vB_RSS_Poster($vbulletin);
 $xml->fetch_xml($vbulletin->GPC['url']);
 if (empty($xml->xml_string)) {
     print_stop_message('unable_to_open_url');
 } else {
     if ($xml->parse_xml() === false) {
         print_stop_message('xml_error_x_at_line_y', $xml->feedtype == 'unknown' ? 'Unknown Feed Type' : $xml->xml_object->error_string(), $xml->xml_object->error_line());
     }
 }
 require_once DIR . '/includes/class_bbcode.php';
 $bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());
 $output = '';
 $count = 0;
 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);
Exemple #2
0
	if (empty($xml->xml_string))
	{
		print_stop_message('unable_to_open_url');
	}
	else if ($xml->parse_xml() === false)
	{
		print_stop_message('xml_error_x_at_line_y', ($xml->feedtype == 'unknown' ? 'Unknown Feed Type' : $xml->xml_object->error_string()), $xml->xml_object->error_line());
	}

	require_once(DIR . '/includes/class_bbcode.php');
	$bbcode_parser = new vB_BbCodeParser($vbulletin, fetch_tag_list());

	$output = '';
	$count = 0;
	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']);