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


PHP vB_AJAX_XML_Builder::add_group方法代码示例

本文整理汇总了PHP中vB_AJAX_XML_Builder::add_group方法的典型用法代码示例。如果您正苦于以下问题:PHP vB_AJAX_XML_Builder::add_group方法的具体用法?PHP vB_AJAX_XML_Builder::add_group怎么用?PHP vB_AJAX_XML_Builder::add_group使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vB_AJAX_XML_Builder的用法示例。


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

示例1: checkUrlAvailable

	public static function checkUrlAvailable()
	{
		global $vbulletin;
		global $vbphrase;
		require_once DIR . '/includes/functions_databuild.php';
		require_once DIR . '/includes/functions_misc.php';
		fetch_phrase_group('cpcms');
		$vbulletin->input->clean_array_gpc('r', array(
			'url' => TYPE_STR,
			'nodeid' => TYPE_INT));

		$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
		$xml->add_group('root');
		$url_conflict = '';

		if (strlen($vbulletin->GPC['url'])
			and $row = $vbulletin->db->query_first($sql="SELECT nodeid FROM " . TABLE_PREFIX .
			"cms_node WHERE new != 1 AND lower(url)='" . $vbulletin->db->escape_string(strtolower($vbulletin->GPC['url'])) ."'"
			. ($vbulletin->GPC_exists['nodeid'] ? " and nodeid <> " . $vbulletin->GPC['nodeid'] : "" ) )
			and intval($row['nodeid']))
		{
			$url_conflict = $vbphrase['url_in_use'];
		}

		$xml->add_tag('html', $url_conflict);
		$xml->close_group();
		$xml->print_xml();
		return '';
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:29,代码来源:contentmanager.php

示例2: min

         if ($user_tags_remain == null) {
             $user_tags_remain = $tags_remain;
         } else {
             $user_tags_remain = min($tags_remain, $user_tags_remain);
         }
     }
 }
 ($hook = vBulletinHook::fetch_hook('threadtag_manage_tagsremain')) ? eval($hook) : false;
 $show['tag_limit_phrase'] = $user_tags_remain !== null;
 $tags_remain = vb_number_format($user_tags_remain);
 $tag_delimiters = addslashes_js($vbulletin->options['tagdelimiter']);
 if ($vbulletin->GPC['ajax']) {
     eval('$html = "' . fetch_template('tag_edit_ajax') . '";');
     require_once DIR . '/includes/class_xml.php';
     $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
     $xml->add_group('tag');
     $xml->add_tag('html', process_replacement_vars($html));
     $xml->add_tag('delimiters', $vbulletin->options['tagdelimiter']);
     $xml->close_group();
     $xml->print_xml();
 }
 // navbar and output
 $navbits = array();
 $parentlist = array_reverse(explode(',', substr($foruminfo['parentlist'], 0, -3)));
 foreach ($parentlist as $forumid) {
     $forum_title = $vbulletin->forumcache["{$forumid}"]['title'];
     $navbits['forumdisplay.php?' . $vbulletin->session->vars['sessionurl'] . "f={$forumid}"] = $forum_title;
 }
 $navbits['showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadinfo['threadid']}"] = $threadinfo['prefix_plain_html'] . ' ' . $threadinfo['title'];
 $navbits[''] = $vbphrase['tag_management'];
 $navbits = construct_navbits($navbits);
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:threadtag.php

示例3: array

        mark_project_read($project['projectid'], $vbulletin->GPC['issuetypeid'], TIMENOW);
        $issuetypes = array($vbulletin->GPC['issuetypeid']);
    } else {
        $projectperms = fetch_project_permissions($vbulletin->userinfo, $project['projectid']);
        $issuetypes = array();
        foreach ($vbulletin->pt_issuetype as $issuetypeid => $typeinfo) {
            if ($projectperms["{$issuetypeid}"]['generalpermissions'] & $vbulletin->pt_bitfields['general']['canview']) {
                mark_project_read($project['projectid'], $issuetypeid, TIMENOW);
                $issuetypes[] = $issuetypeid;
            }
        }
    }
    if ($vbulletin->GPC['ajax']) {
        require_once DIR . '/includes/class_xml.php';
        $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
        $xml->add_group('readmarker');
        $xml->add_group('project', array('projectid' => $project['projectid']));
        foreach ($issuetypes as $issuetypeid) {
            $xml->add_tag('issuetype', $issuetypeid);
        }
        $xml->close_group();
        $xml->close_group();
        $xml->print_xml();
    } else {
        $vbulletin->url = 'project.php?' . $vbulletin->session->vars['sessionurl'] . 'projectid=' . $project['projectid'];
        eval(print_standard_redirect('project_markread'));
    }
}
// #######################################################################
if ($_REQUEST['do'] == 'notehistory') {
    $vbulletin->input->clean_array_gpc('r', array('issuenoteid' => TYPE_UINT));
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:project.php

示例4: array

	$vminfo = verify_visitormessage($vbulletin->GPC['vmid']);

	$editorid = construct_edit_toolbar(
		htmlspecialchars_uni($vminfo['pagetext']),
		false,
		'visitormessage',
		true,
		true,
		false,
		'qenr',
		$vbulletin->GPC['editorid']
	);

	$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');

	$xml->add_group('quickedit');
	$xml->add_tag('editor', process_replacement_vars($messagearea), array(
		'reason'       => '',
		'parsetype'    => 'visitormessage',
		'parsesmilies' => true,
		'mode'         => $show['is_wysiwyg_editor']
	));
	$xml->close_group();

	$xml->print_xml();
}

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

/*======================================================================*\
|| ####################################################################
开发者ID:hungnv0789,项目名称:vhtm,代码行数:31,代码来源:visitormessage.php

示例5: eval

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

		$templater = vB_Template::create('lightbox');
			$templater->register('attachmentinfo', $attachmentinfo);
			$templater->register('current', $current);
			$templater->register('first', $first);
			$templater->register('height', $height);
			$templater->register('imagelink', $imagelink);
			$templater->register('last', $last);
			$templater->register('total', $total);
			$templater->register('uniqueid', $uniqueid);
			$templater->register('width', $width);
		$html = $templater->render(true);

		$xml->add_group('img');
		$xml->add_tag('html', process_replacement_vars($html));
		$xml->add_tag('link', $imagelink);
		$xml->add_tag('name', $attachmentinfo['filename']);
		$xml->add_tag('date', $attachmentinfo['date_string']);
		$xml->add_tag('time', $attachmentinfo['time_string']);
		$xml->close_group();
	}
	else
	{
		$xml->add_group('errormessage');
		$xml->add_tag('error', 'notimage');
		$xml->add_tag('extension', $attachmentinfo['extension']);
		$xml->close_group();
	}
	$xml->print_xml();
开发者ID:hungnv0789,项目名称:vhtm,代码行数:30,代码来源:attachment.php

示例6: array

	}
	else
	{
		vB_Search_Searchtools::getUiXml(vB_Search_Core::TYPE_COMMON,
			vB_Search_Searchtools::searchIntroFetchPrefs($current_user, vB_Search_Core::TYPE_COMMON));
	}
}

if ($_POST['do'] == 'loadimageconfig')
{
	$vbulletin->input->clean_array_gpc('p', array(
		'attachmentid' => TYPE_UINT,
	));

	$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
	$xml->add_group('settings');

		if ($attachment = $db->query_first("
			SELECT settings
			FROM " . TABLE_PREFIX . "attachment
			WHERE attachmentid = " . $vbulletin->GPC['attachmentid'] . "
		"))
		{
			$settings = unserialize($attachment['settings']);
			foreach ($settings AS $key => $value)
			{
				$xml->add_tag($key, $value);
			}
		}

开发者ID:hungnv0789,项目名称:vhtm,代码行数:29,代码来源:ajax.php

示例7: render

 /**
  * Renders the view to a string and returns it.
  *
  * @return string
  */
 public function render($send_content_headers = false)
 {
     require_once DIR . '/includes/class_xml.php';
     $xml = new vB_AJAX_XML_Builder(vB::$vbulletin, 'text/xml');
     $xml->add_group('container');
     $xml->add_tag('success', 1);
     if ($this->content) {
         $xml->add_tag('html', $this->content->render());
     }
     $xml->add_tag('title', $this->title);
     $xml->add_tag('status', $this->status);
     $xml->add_tag('message', $this->feedback);
     if (sizeof($this->errors)) {
         $xml->add_group('errors');
         foreach ($this->errors as $error) {
             $xml->add_tag('error', $error['message'], array('errcode' => $error['code']));
         }
         $xml->close_group();
     }
     if (sizeof($this->urls)) {
         $xml->add_group('urls');
         foreach ($this->urls as $type => $url) {
             $xml->add_tag('url', $url, array('type' => $type));
         }
         $xml->close_group();
     }
     $xml->close_group();
     if ($send_content_headers and !vB::contentHeadersSent()) {
         $xml->send_content_type_header();
         $xml->send_content_length_header();
         vB::contentHeadersSent(true);
     }
     return $xml->fetch_xml();
 }
开发者ID:Kheros,项目名称:MMOver,代码行数:39,代码来源:ajaxhtml.php

示例8: showCommentsXml

	public static function showCommentsXml($nodeid, $userinfo, $pageno = 1,
		$perpage = 20, $target_url = '')
	{
		require_once DIR . '/includes/functions_misc.php';
		global $show;


		$xml = new vB_AJAX_XML_Builder( vB::$vbulletin, 'text/xml');
		$xml->add_group('root');

		//todo handle prefs for xml types
		$xml->add_tag('html', $check_val = self::showComments($nodeid, $userinfo,  $pageno,
		$perpage, $target_url));

		$xml->close_group();
		$xml->print_xml();
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:17,代码来源:comments.php

示例9: array

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
$vbulletin->input->clean_array_gpc('r', array('poststarttime' => TYPE_UINT, 'posthash' => TYPE_NOHTML, 'userid' => TYPE_UINT));
if (!$vbulletin->userinfo['userid'] or empty($vbulletin->userinfo['attachmentextensions']) or $vbulletin->GPC['posthash'] != md5($vbulletin->GPC['poststarttime'] . $vbulletin->userinfo['userid'] . $vbulletin->userinfo['salt'])) {
    print_no_permission();
}
if ($_POST['ajax']) {
    require_once DIR . '/includes/class_xml.php';
    $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
    // Still undecided about this
    // $userinfo = verify_id('user', $vbulletin->GPC['userid'], 1, 1);
    $userinfo = $vbulletin->userinfo;
    if ($_POST['do'] == 'loadnode') {
        $vbulletin->input->clean_array_gpc('p', array('parentid' => TYPE_UINT));
        $xml->add_group('categories');
        $categories = $db->query_read_slave("\r\n\t\t\tSELECT categoryid, title\r\n\t\t\tFROM " . TABLE_PREFIX . "attachmentcategory\r\n\t\t\tWHERE\r\n\t\t\t\tuserid = {$userinfo['userid']}\r\n\t\t\t\t\tAND\r\n\t\t\t\tparentid = {$vbulletin->GPC['parentid']}\r\n\t\t\tORDER BY displayorder\r\n\t\t");
        while ($category = $db->fetch_array($categories)) {
            $xml->add_tag('category', $category['title'], array('categoryid' => $category['categoryid']));
        }
        // Update posthash if this is the root node.
        if ($vbulletin->GPC['parentid'] == 0) {
            $userdm =& datamanager_init('User', $vbulletin, ERRTYPE_SILENT);
            $userdm->set_existing($userinfo);
            $userdm->set('assetposthash', $vbulletin->GPC['posthash']);
            $userdm->save();
            $userinfo['assetposthash'] = $vbulletin->GPC['posthash'];
        }
        $xml->close_group();
        $xml->print_xml();
    }
开发者ID:Kheros,项目名称:MMOver,代码行数:31,代码来源:assetmanage.php

示例10: array

// get special data templates from the datastore
$specialtemplates = array();
// pre-cache templates used by all actions  - build
$globaltemplates = array();
// pre-cache templates used by specific actions
$actiontemplates = array();
// ######################### REQUIRE BACK-END ############################
require_once './global.php';
require_once DIR . '/includes/class_xml.php';
// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################
header('Pragma:');
// VBIV-8269
header('Cache-control: max-age=31536000, private');
header('Expires: ' . gmdate("D, d M Y H:i:s", TIMENOW + 31536000) . ' GMT');
// When were the CKEditor phrases last modified? Good Question.
header('Last-Modified: ' . gmdate('D, d M Y H:i:s', 0) . ' GMT');
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
$xml->add_group('phrases');
foreach ($vbphrase as $key => $phrase) {
    $xml->add_tag('phrase', $phrase, array('name' => $key));
}
$xml->close_group('group');
$xml->print_xml();
/*======================================================================*\
|| ####################################################################
|| # Downloaded: 03:13, Sat Sep 7th 2013
|| # CVS: $RCSfile$ - $Revision: 30573 $
|| ####################################################################
\*======================================================================*/
开发者ID:0hyeah,项目名称:yurivn,代码行数:31,代码来源:ckeditor.php

示例11: outputError

function outputError($errors)
{
    global $vbulletin;
    if (!is_array($errors)) {
        $errors = array($errors);
        //create array with 1 item
    }
    if ($vbulletin->GPC['ajax']) {
        require_once DIR . '/includes/class_xml.php';
        $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
        $xml->add_group('response');
        $html = '';
        $xml->add_tag('error', implode(',', $errors));
        $xml->close_group();
        $xml->print_xml(true);
    } else {
        eval(standard_error(implode('<br/>', $errors)));
    }
    exit;
    //just in case...
}
开发者ID:0hyeah,项目名称:yurivn,代码行数:21,代码来源:award_functions.php

示例12: eval

                    $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'])) {
        foreach ($mark_read_result['forumids'] as $forumid) {
            $xml->add_tag('forum', $forumid);
        }
    }
    $xml->close_group();
    $xml->close_group();
    $xml->print_xml();
}
// ###########################################################################
// Image Verification
if ($_POST['do'] == 'imagereg') {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:ajax.php

示例13: getDefaultUiXml

/**
 * vb_Search_Searchtools::getDefaultUiXml()
 * This gets the xml which will be passed to the ajax function. It just wraps
 * get_ui in html
 *
 * @param integer $contenttypeid
 * @return the appropriate user interface wrapped in XML
 */
	public static function getDefaultUiXml($contenttypeid, $prefs)
	{
		global $vbulletin;
		$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
		$xml->add_group('root');

		$xml->add_tag('html', self::makeDefaultSearch($contenttypeid, $prefs));

		$xml->close_group();
		$xml->print_xml();
	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:19,代码来源:searchtools.php

示例14: eval

            $threadrate->set('userid', 0);
            $threadrate->set('vote', $vbulletin->GPC['vote']);
            $threadrate->set('ipaddress', IPADDRESS);
            ($hook = vBulletinHook::fetch_hook('threadrate_add')) ? eval($hook) : false;
            $threadrate->save();
            $update = true;
            if (!$vbulletin->GPC['ajax']) {
                $vbulletin->url = 'showthread.php?' . $vbulletin->session->vars['sessionurl'] . "t={$threadinfo['threadid']}&amp;page=" . $vbulletin->GPC['pagenumber'] . "&amp;pp=" . $vbulletin->GPC['perpage'];
                eval(print_standard_redirect('redirect_threadrate_add'));
            }
        }
    }
}
require_once DIR . '/includes/class_xml.php';
$xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
$xml->add_group('threadrating');
if ($update) {
    $thread = $db->query_first_slave("\n\t\tSELECT votetotal, votenum\n\t\tFROM " . TABLE_PREFIX . "thread\n\t\tWHERE threadid = {$threadinfo['threadid']}\n\t");
    if ($thread['votenum'] >= $vbulletin->options['showvotes']) {
        // Show Voteavg
        $thread['voteavg'] = vb_number_format($thread['votetotal'] / $thread['votenum'], 2);
        $thread['rating'] = round($thread['votetotal'] / $thread['votenum']);
        $xml->add_tag('voteavg', process_replacement_vars("{$vbphrase['rating']}: <img class=\"inlineimg\" src=\"{$stylevar['imgdir_rating']}/rating_{$thread['rating']}.gif\" alt=\"" . construct_phrase($vbphrase['thread_rating_x_votes_y_average'], $thread['votenum'], $thread['voteavg']) . "\" border=\"0\" />"));
    } else {
        $xml->add_tag('voteavg', '');
    }
    if (!function_exists('fetch_phrase')) {
        require_once DIR . '/includes/functions_misc.php';
    }
    $xml->add_tag('message', fetch_phrase('redirect_threadrate_add', 'frontredirect', 'redirect_'));
} else {
开发者ID:holandacz,项目名称:nb4,代码行数:31,代码来源:threadrate.php

示例15: actionRate


//.........这里部分代码省略.........
						$ratedm->save();
					}
					$update = true;
				}
			}
			else
			{
				$ratedm = new vBCms_DM_Rate();
				$ratedm->set('nodeid', $nodeid);
				$ratedm->set('userid', vB::$vbulletin->userinfo['userid']);
				$ratedm->set('vote', intval($vote));
				$ratedm->save();

				$update = true;
			}
		}
		else
		{
			// Check for cookie on user's computer for this blogid
			if ($rated AND !vB::$vbulletin->options['votechange'])
			{

			}
			else
			{
				// Check for entry in Database for this Ip Addr/blogid
				if ($rating = vB::$db->query_first("
					SELECT *
					FROM " . TABLE_PREFIX . "cms_rate
					WHERE ipaddress = '" . vB::$db->escape_string(IPADDRESS) . "'
						AND nodeid = $nodeid
				"))
				{
					if (vB::$vbulletin->options['votechange'])
					{
						if ($vote != $rating['vote'])
						{
							$rateitem = new vBCms_Item_Rate($rating['rateid']);
							$ratedm = new vBCms_DM_Rate($rateitem);
							$ratedm->set('nodeid', $nodeid);
							$ratedm->set('vote', intval($vote));
							$ratedm->save();
						}
						$update = true;
					}
				}
				else
				{
					$ratedm = new vBCms_DM_Rate();
					$ratedm->set('nodeid', $nodeid);
					$ratedm->set('userid', 0);
					$ratedm->set('vote', intval($vote));
					$ratedm->save();

					$update = true;

				}
			}
		}

		require_once(DIR . '/includes/class_xml.php');
		$xml = new vB_AJAX_XML_Builder(vB::$vbulletin, 'text/xml');
		$xml->add_group('threadrating');
		if ($update)
		{
			$node = vB::$db->query_first_slave("
				SELECT ratingtotal, ratingnum
				FROM " . TABLE_PREFIX . "cms_nodeinfo
				WHERE nodeid = $nodeid
			");

			if ($node['ratingnum'] > 0 AND $node['ratingnum'] >= vB::$vbulletin->options['showvotes'])
			{	// Show Voteavg
				$node['ratingavg'] = vb_number_format($node['ratingtotal'] / $node['ratingnum'], 2);
				$node['rating'] = intval(round($node['ratingtotal'] / $node['ratingnum']));
				$xml->add_tag('voteavg', "<img class=\"inlineimg\" src=\"" . vB_Template_Runtime::fetchStyleVar('imgdir_rating') . "/rating-15_$node[rating].png\" alt=\"" . construct_phrase($vbphrase['rating_x_votes_y_average'], $node['ratingnum'], $node['ratingavg']) . "\" border=\"0\" />");
			}
			else
			{
				$xml->add_tag('voteavg', '');
			}

			if (!function_exists('fetch_phrase'))
			{
				require_once(DIR . '/includes/functions_misc.php');
			}
			$xml->add_tag('message', fetch_phrase('redirect_blog_rate_add', 'frontredirect', 'redirect_'));
		}
		else	// Already voted error...
		{
			if (!empty($rating['nodeid']))
			{
				set_bbarray_cookie('cms_rate', $rating['nodeid'], $rating['vote'], 1);
			}
			$xml->add_tag('error', fetch_error('blog_rate_voted'));
		}
		$xml->close_group();
		$xml->print_xml();

	}
开发者ID:hungnv0789,项目名称:vhtm,代码行数:101,代码来源:content.php


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