Beispiel #1
0
}
// *********************************************************************************
// save parsed post HTML
if (!empty($saveparsed)) {
    $db->shutdown_query("\n\t\tREPLACE INTO " . TABLE_PREFIX . "postparsed (postid, dateline, hasimages, pagetext_html, styleid, languageid)\n\t\tVALUES {$saveparsed}\n\t");
    unset($saveparsed);
}
if (!empty($save_parsed_sigs)) {
    $db->shutdown_query("\n\t\tREPLACE INTO " . TABLE_PREFIX . "sigparsed (userid, styleid, languageid, signatureparsed, hasimages)\n\t\tVALUES {$save_parsed_sigs}\n\t");
    unset($save_parsed_sigs);
}
// *********************************************************************************
// prepare tags
$show['tag_box'] = false;
if ($vbulletin->options['threadtagging']) {
    $tag_list = fetch_tagbits($thread['taglist']);
    if (!$foruminfo['allowposting']) {
        // forum closed - tags can't be added, so only show edit if have tags
        $show['manage_tag'] = ($thread['taglist'] and can_moderate($thread['forumid'], 'caneditthreads'));
    } else {
        if (!$thread['open'] and !can_moderate($thread['forumid'], 'canopenclose')) {
            // thread is closed and can't be opened by this person;
            $show['manage_tag'] = can_moderate($thread['forumid'], 'caneditthreads');
        } else {
            $show['manage_tag'] = ($forumperms & $vbulletin->bf_ugp_forumpermissions['cantagown'] and $thread['postuserid'] == $vbulletin->userinfo['userid'] or $forumperms & $vbulletin->bf_ugp_forumpermissions['cantagothers'] or $forumperms & $vbulletin->bf_ugp_forumpermissions['candeletetagown'] and $thread['postuserid'] == $vbulletin->userinfo['userid'] or can_moderate($thread['forumid'], 'caneditthreads'));
        }
    }
    $show['tag_box'] = ($show['manage_tag'] or $thread['taglist']);
}
// *********************************************************************************
// Get users browsing this thread
Beispiel #2
0
}
// *********************************************************************************
// save parsed post HTML
if (!empty($saveparsed)) {
    $db->shutdown_query("\n\t\tREPLACE INTO " . TABLE_PREFIX . "postparsed (postid, dateline, hasimages, pagetext_html, styleid, languageid)\n\t\tVALUES {$saveparsed}\n\t");
    unset($saveparsed);
}
if (!empty($save_parsed_sigs)) {
    $db->shutdown_query("\n\t\tREPLACE INTO " . TABLE_PREFIX . "sigparsed (userid, styleid, languageid, signatureparsed, hasimages)\n\t\tVALUES {$save_parsed_sigs}\n\t");
    unset($save_parsed_sigs);
}
// *********************************************************************************
// prepare tags
$show['tag_box'] = false;
if ($vbulletin->options['threadtagging']) {
    $tag_list = fetch_tagbits($thread);
    if (!$foruminfo['allowposting']) {
        // forum closed - tags can't be added, so only show edit if have tags
        $show['manage_tag'] = ($thread['taglist'] and can_moderate($thread['forumid'], 'caneditthreads'));
    } else {
        if (!$thread['open'] and !can_moderate($thread['forumid'], 'canopenclose')) {
            // thread is closed and can't be opened by this person;
            $show['manage_tag'] = can_moderate($thread['forumid'], 'caneditthreads');
        } else {
            $show['manage_tag'] = ($forumperms & $vbulletin->bf_ugp_forumpermissions['cantagown'] and $thread['postuserid'] == $vbulletin->userinfo['userid'] or $forumperms & $vbulletin->bf_ugp_forumpermissions['cantagothers'] or $forumperms & $vbulletin->bf_ugp_forumpermissions['candeletetagown'] and $thread['postuserid'] == $vbulletin->userinfo['userid'] or can_moderate($thread['forumid'], 'caneditthreads'));
        }
    }
    $show['tag_box'] = ($show['manage_tag'] or $thread['taglist']);
}
// *********************************************************************************
// Get users browsing this thread
Beispiel #3
0
     }
 }
 ($hook = vBulletinHook::fetch_hook('threadtag_domanage_postdelete')) ? eval($hook) : false;
 if ($vbulletin->GPC['taglist'] and $show['add_option']) {
     $errors = add_tags_to_thread($threadinfo, $vbulletin->GPC['taglist']);
 } else {
     $errors = array();
 }
 if ($vbulletin->GPC['ajax']) {
     $threadinfo = fetch_threadinfo($threadinfo['threadid'], false);
     // get updated tag list
     $tagcount = $threadinfo['taglist'] ? count(explode(',', $threadinfo['taglist'])) : 0;
     require_once DIR . '/includes/class_xml.php';
     $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml');
     $xml->add_group('tag');
     $xml->add_tag('taghtml', process_replacement_vars(fetch_tagbits($threadinfo)));
     if ($errors) {
         $errorlist = '';
         foreach ($errors as $error) {
             $errorlist .= "\n   * {$error}";
         }
         $xml->add_tag('warning', fetch_error('tag_add_failed_plain', $errorlist));
     }
     $xml->close_group();
     $xml->print_xml();
 } else {
     if ($errors) {
         $errorlist = '';
         foreach ($errors as $key => $errormessage) {
             eval('$errorlist .= "' . fetch_template('newpost_errormessage') . '";');
         }
	/**
	*	Get the html rendered tag list for this item.
	*
	*	Allows types to override the display of tags based on their own formatting
	*/
	public function fetch_rendered_tag_list()
	{
		$taglist = $this->fetch_existing_tag_list();
		return fetch_tagbits(implode(", ", $taglist));
	}
Beispiel #5
0
 /**
  *	Get the html rendered tag list for this item.
  *
  *	Allows types to override the display of tags based on their own formatting
  */
 public function fetchRenderedTagList()
 {
     $taglist = $this->fetchExistingTagList();
     return fetch_tagbits(implode(", ", $taglist));
 }