示例#1
0
 $newpost['humanverify'] =& $vbulletin->GPC['humanverify'];
 $newpost['poststarttime'] = $poststarttime;
 $newpost['posthash'] = $posthash;
 // moderation options
 $newpost['stickunstick'] =& $vbulletin->GPC['stickunstick'];
 $newpost['openclose'] =& $vbulletin->GPC['openclose'];
 $newpost['podcasturl'] =& $vbulletin->GPC['podcasturl'];
 $newpost['podcastsize'] =& $vbulletin->GPC['podcastsize'];
 $newpost['podcastexplicit'] =& $vbulletin->GPC['podcastexplicit'];
 $newpost['podcastkeywords'] =& $vbulletin->GPC['podcastkeywords'];
 $newpost['podcastsubtitle'] =& $vbulletin->GPC['podcastsubtitle'];
 $newpost['podcastauthor'] =& $vbulletin->GPC['podcastauthor'];
 $newpost['subscribe'] =& $vbulletin->GPC['subscribe'];
 if ($foruminfo['allowhtml']) {
     $htmlchecked = fetch_htmlchecked($vbulletin->GPC['htmlstate']);
     $newpost['htmlstate'] = array_pop($array = array_keys(fetch_htmlchecked($vbulletin->GPC['htmlstate'])));
 } else {
     $newpost['htmlstate'] = 'on_nl2br';
 }
 if ($vbulletin->GPC_exists['emailupdate']) {
     $newpost['emailupdate'] =& $vbulletin->GPC['emailupdate'];
 } else {
     $newpost['emailupdate'] = array_pop($array = array_keys(fetch_emailchecked(array(), $vbulletin->userinfo)));
 }
 if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])) {
     $newpost['emailupdate'] = 0;
 }
 if (!$vbulletin->GPC['subscribe']) {
     $newpost['emailupdate'] = 9999;
 }
 build_new_post('thread', $foruminfo, array(), array(), $newpost, $errors);
示例#2
0
     $newpost['message'] = htmlspecialchars_uni($postinfo['pagetext']);
 }
 // handle checkboxes
 if ($previewpost) {
     $checked['parseurl'] = $edit['parseurl'] ? 'checked="checked"' : '';
     $checked['signature'] = $edit['signature'] ? 'checked="checked"' : '';
     $checked['disablesmilies'] = $edit['disablesmilies'] ? 'checked="checked"' : '';
     $checked['stickunstick'] = $edit['stickunstick'] ? 'checked="checked"' : '';
     $checked['openclose'] = $edit['openclose'] ? 'checked="checked"' : '';
 } else {
     $checked['parseurl'] = 'checked="checked"';
     $checked['signature'] = $postinfo['showsignature'] ? 'checked="checked"' : '';
     $checked['disablesmilies'] = !$postinfo['allowsmilie'] ? 'checked="checked"' : '';
 }
 if ($foruminfo['allowhtml']) {
     $htmlchecked = fetch_htmlchecked($previewpost ? $edit['htmlstate'] : $postinfo['htmlstate']);
     $templater = vB_Template::create('newpost_html');
     $templater->register('htmlchecked', $htmlchecked);
     $htmloption = $templater->render();
 }
 // Are we editing someone else's post? If so load that users folders and subscription info for this thread.
 if ($vbulletin->userinfo['userid'] != $postinfo['userid']) {
     $userfolders = $db->query_first_slave("\n\t\t\tSELECT subfolders, signature\n\t\t\tFROM " . TABLE_PREFIX . "usertextfield\n\t\t\tWHERE userid = {$postinfo['userid']}\n\t\t");
     // temporarily assign this user's signature to $vbulletin->userinfo so we can see whether or not to show the sig checkbox option
     $vbulletin->userinfo['signature'] = $userfolders['signature'];
     if ($userfolders['subfolders'] == '') {
         $folders = array();
     } else {
         $folders = unserialize($userfolders['subfolders']);
     }
     if (empty($folders)) {
示例#3
0
 $newpost['humanverify'] =& $vbulletin->GPC['humanverify'];
 $newpost['poststarttime'] = $poststarttime;
 $newpost['posthash'] = $posthash;
 // moderation options
 $newpost['stickunstick'] =& $vbulletin->GPC['stickunstick'];
 $newpost['openclose'] =& $vbulletin->GPC['openclose'];
 $newpost['podcasturl'] =& $vbulletin->GPC['podcasturl'];
 $newpost['podcastsize'] =& $vbulletin->GPC['podcastsize'];
 $newpost['podcastexplicit'] =& $vbulletin->GPC['podcastexplicit'];
 $newpost['podcastkeywords'] =& $vbulletin->GPC['podcastkeywords'];
 $newpost['podcastsubtitle'] =& $vbulletin->GPC['podcastsubtitle'];
 $newpost['podcastauthor'] =& $vbulletin->GPC['podcastauthor'];
 $newpost['subscribe'] =& $vbulletin->GPC['subscribe'];
 if ($foruminfo['allowhtml']) {
     $htmlchecked = fetch_htmlchecked($vbulletin->GPC['htmlstate']);
     $array = array_keys(fetch_htmlchecked($vbulletin->GPC['htmlstate']));
     $newpost['htmlstate'] = array_pop($array);
 } else {
     $newpost['htmlstate'] = 'on_nl2br';
 }
 if ($vbulletin->GPC_exists['emailupdate']) {
     $newpost['emailupdate'] =& $vbulletin->GPC['emailupdate'];
 } else {
     $array = array_keys(fetch_emailchecked(array(), $vbulletin->userinfo));
     $newpost['emailupdate'] = array_pop($array);
 }
 if (!($forumperms & $vbulletin->bf_ugp_forumpermissions['canviewthreads'])) {
     $newpost['emailupdate'] = 0;
 }
 if (!$vbulletin->GPC['subscribe']) {
     $newpost['emailupdate'] = 9999;
示例#4
0
		$postpreview =& $preview;
		$blog['message'] = htmlspecialchars_uni($blog['message']);
		$blog['allowsmilie'] = !($blog['disablesmilies']);
		// falls down from preview blog entry and has already been sent through htmlspecialchars()
		$title = $blog['title'];
		$reason = $blog['reason'];
		construct_checkboxes($blog, array('allowcomments', 'allowpingback', 'moderatecomments', 'private'));
		construct_publish_select($blog, $blog['dateline']);
		$notification = array($vbulletin->GPC['emailupdate'] => 'selected="selected"');
	}
	else if (!$vbulletin->GPC['advanced'])
	{ // defaults in here if we're doing a quote etc
		$blog['message'] = htmlspecialchars_uni($bloginfo['pagetext']);
		if ($vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowhtml'])
		{
			$htmlchecked = fetch_htmlchecked($bloginfo['htmlstate']);
			$show['htmloption'] = true;
		}
	}

	require_once(DIR . '/includes/functions_file.php');
	$attachinfo = fetch_attachmentinfo($posthash, $poststarttime, $contenttypeid, array('blogid' => $bloginfo['blogid']));

	$vbulletin->options['ignorequotechars'] = 0;

	$editorid = construct_edit_toolbar(
		$blog['message'],
		false,
		'blog_entry',
		$vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowsmilies'],
		$blog['allowsmilie'],