$vbulletin->GPC['editorid'], array(), 'forum' ); $xml->add_group('quickedit'); $xml->add_tag('editor', process_replacement_vars($messagearea), array( 'reason' => $postinfo['edit_reason'], 'parsetype' => $foruminfo['forumid'], 'parsesmilies' => $editor_parsesmilies, 'mode' => $show['is_wysiwyg_editor'], 'content' => 'forum' )); if ($contenttypeid) { add_ajax_attachment_xml($xml, $contenttypeid, $posthash, $poststarttime, array('p' => $postinfo['postid'])); } $xml->close_group(); $xml->print_xml(); } } // ############################################################################# // handle editor mode switching if ($_POST['do'] == 'editorswitch') { $vbulletin->input->clean_array_gpc('p', array( 'towysiwyg' => TYPE_BOOL, 'message' => TYPE_STR, 'parsetype' => TYPE_STR, // string to support non-forum options
// Use our permission to attach or the person who owns the post? check what vB does in this situation if ($vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_canpostattach']) { $values = "values[blogid]={$bloginfo['blogid']}"; require_once DIR . '/packages/vbattach/attach.php'; $attach = new vB_Attach_Display_Content($vbulletin, 'vBBlog_BlogEntry'); $attachmentoption = $attach->fetch_edit_attachments($posthash, $poststarttime, $postattach, $bloginfo['blogid'], $values, $vbulletin->GPC['editorid'], $attachcount); $contenttypeid = $attach->fetch_contenttypeid(); } else { $attachmentoption = ''; $contenttypeid = 0; } $editorid = construct_edit_toolbar(htmlspecialchars_uni($bloginfo['pagetext']), false, 'blog_entry', $vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_allowsmilies'], $bloginfo['allowsmilie'], false, 'qe', $vbulletin->GPC['editorid']); require_once DIR . '/includes/functions_file.php'; $xml->add_group('quickedit'); $xml->add_tag('editor', $messagearea, array('reason' => $bloginfo['edit_reason'], 'parsetype' => 'blog_entry', 'parsesmilies' => $vbulletin->userinfo['permissions']['vbblog_comment_permissions'] & $vbulletin->bf_ugp_vbblog_comment_permissions['blog_allowsmilies'], 'mode' => $show['is_wysiwyg_editor'])); add_ajax_attachment_xml($xml, $contenttypeid, $posthash, $poststarttime, array('b' => $bloginfo['blogid'])); $xml->close_group(); $xml->print_xml(); } } // ############################################################################# // retrieve a calendar if ($_POST['do'] == 'calendar') { $vbulletin->input->clean_array_gpc('p', array('month' => TYPE_UINT, 'year' => TYPE_UINT, 'userid' => TYPE_UINT)); $xml = new vB_AJAX_XML_Builder($vbulletin, 'text/xml'); // can't view any blogs, no need for a calendar if (!($vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewown']) and !($vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewothers'])) { $xml->add_tag('error', 'nopermission'); $xml->print_xml(); exit; }