示例#1
0
文件: blog.php 项目: Kheros/MMOver
        if (!can_moderate_blog('caneditcustomblocks')) {
            print_no_permission();
        }
        $show['reportlink'] = false;
    } else {
        $show['reportlink'] = true;
    }
    track_blog_visit($blockinfo['userinfo']['userid']);
    $show['reportlink'] = ($show['reportlink'] and $vbulletin->userinfo['userid'] and ($vbulletin->options['rpforumid'] or $vbulletin->options['enableemail'] and $vbulletin->options['rpemail']));
    $show['edit'] = (can_moderate_blog('caneditcustomblocks') or $vbulletin->userinfo['userid'] == $blockinfo['userid']);
    // Parse Content here
    require_once DIR . '/includes/class_bbcode_blog.php';
    $bbcode = new vB_BbCodeParser_Blog($vbulletin, fetch_tag_list());
    $bbcode->set_parse_userinfo($blockinfo['userinfo'], $blockinfo['userinfo']['permissions']);
    $blockinfo['page'] = $bbcode->parse($blockinfo['pagetext'], 'blog_user', $blockinfo['allowsmilie'] ? 1 : 0);
    $blogheader = parse_blog_description($blockinfo['userinfo'], $blockinfo);
    $sidebar =& build_user_sidebar($blockinfo['userinfo']);
    $navbits[] = $blockinfo['title'];
    $templater = vB_Template::create('blog_custompage');
    $templater->register('blogheader', $blogheader);
    $templater->register('blockinfo', $blockinfo);
    $content = $templater->render();
}
// build navbar
if (empty($navbits)) {
    $navbits = array('blog.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['blogs'], '' => '');
} else {
    $navbits = array_merge(array('blog.php' . $vbulletin->session->vars['sessionurl_q'] => $vbphrase['blogs']), $navbits);
}
$navbits = construct_navbits($navbits);
$navbar = render_navbar_template($navbits);
示例#2
0
		$checked['parseurl'] = ($vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowbbcode'] AND $vbulletin->GPC['parseurl']) ? 'checked="checked"' : '';
		$blogheader = parse_blog_description($vbulletin->userinfo);
		$postpreview = $blogheader['description'];
	}
	else
	{
		$bloguserinfo['message'] = $vbulletin->userinfo['blog_description'];
		$bloguserinfo['title'] = ($vbulletin->userinfo['blog_title'] == $vbulletin->userinfo['username']) ? '' : $vbulletin->userinfo['blog_title'];
		$checked['parseurl'] = 'checked="checked"';
		if (!$vbulletin->userinfo['blog_allowsmilie'] AND $vbulletin->userinfo['blog_description'])
		{
			$checked['disablesmilies'] = 'checked="checked"';
		}

		$postpreview = '';
		$blogheader = parse_blog_description($vbulletin->userinfo);
	}

	// get decent textarea size for user's browser
	require_once(DIR . '/includes/functions_editor.php');

	$editorid = construct_edit_toolbar($bloguserinfo['message'], false, 'blog_user', $vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowsmilies']);

	// build forum rules
	$bbcodeon = ($vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowbbcode']) ? $vbphrase['on'] : $vbphrase['off'];
	$imgcodeon = ($vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowimages']) ? $vbphrase['on'] : $vbphrase['off'];
	$htmlcodeon = ($vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowhtml']) ? $vbphrase['on'] : $vbphrase['off'];
	$smilieson = ($vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowsmilies']) ? $vbphrase['on'] : $vbphrase['off'];

	if ($vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowsmilies'])
	{