Exemplo n.º 1
0
         require_once DIR . '/includes/functions_newpost.php';
         construct_checkboxes(array('disablesmilies' => !$messageinfo['allowsmilie'], 'parseurl' => 1));
         $message['message'] = htmlspecialchars_uni($messageinfo['pagetext']);
     } else {
         $message['message'] = '';
     }
 }
 $navbits['group.php?' . $vbulletin->session->vars['sessionurl'] . "groupid={$group['groupid']}"] = $group['name'];
 if ($messageinfo) {
     $show['edit'] = true;
     $show['delete'] = (fetch_socialgroup_modperm('candeletegroupmessages', $group) or fetch_socialgroup_modperm('canremovegroupmessages') or $messageinfo['postuserid'] == $vbulletin->userinfo['userid'] and $vbulletin->userinfo['permissions']['socialgrouppermissions'] & $vbulletin->bf_ugp_socialgrouppermissions['canmanagemessages']);
     $navbits[] = $vbphrase['edit_group_message'];
 } else {
     $navbits[] = $vbphrase['post_new_group_message'];
 }
 $istyles_js = construct_editor_styles_js();
 $editorid = construct_edit_toolbar($message['message'], false, 'groupmessage', $vbulletin->options['allowsmilies'], true, false);
 eval('$usernamecode = "' . fetch_template('newpost_usernamecode') . '";');
 // auto-parse URL
 if (!isset($checked['parseurl'])) {
     $checked['parseurl'] = 'checked="checked"';
 }
 $show['parseurl'] = $vbulletin->options['allowbbcode'];
 $show['misc_options'] = ($show['parseurl'] or !empty($disablesmiliesoption));
 $show['additional_options'] = ($show['misc_options'] or !empty($attachmentoption));
 $show['physicaldeleteoption'] = can_moderate(0, 'canremovegroupmessages');
 $navbits = construct_navbits($navbits);
 eval('$navbar = "' . fetch_template('navbar') . '";');
 ($hook = vBulletinHook::fetch_hook('group_message_form_complete')) ? eval($hook) : false;
 // complete
 eval('print_output("' . fetch_template('socialgroups_editor') . '");');
Exemplo n.º 2
0
function quickReply()
{
    global $vbulletin;
    // *********************************************************************************
    // build quick reply if appropriate
    if ($show['quickreply']) {
        require_once DIR . '/includes/functions_editor.php';
        $show['wysiwyg'] = $forum['allowbbcode'] ? is_wysiwyg_compatible() : 0;
        $istyles_js = construct_editor_styles_js();
        // set show signature hidden field
        $showsig = iif($vbulletin->userinfo['signature'], 1, 0);
        // set quick reply initial id
        if ($threadedmode == 1) {
            $qrpostid = $curpostid;
            $show['qr_require_click'] = 0;
        } else {
            if ($vbulletin->options['quickreply'] == 2) {
                $qrpostid = 0;
                $show['qr_require_click'] = 1;
            } else {
                $qrpostid = 'who cares';
                $show['qr_require_click'] = 0;
            }
        }
        $editorid = construct_edit_toolbar('', 0, $foruminfo['forumid'], $foruminfo['allowsmilies'] ? 1 : 0, 1, false, 'qr');
        $messagearea = "\n\t\t\t<script type=\"text/javascript\">\n\t\t\t<!--\n\t\t\t\tvar threaded_mode = {$threadedmode};\n\t\t\t\tvar require_click = {$show['qr_require_click']};\n\t\t\t\tvar is_last_page = {$show['allow_ajax_qr']}; // leave for people with cached JS files\n\t\t\t\tvar allow_ajax_qr = {$show['allow_ajax_qr']};\n\t\t\t\tvar ajax_last_post = " . intval($effective_lastpost) . ";\n\t\t\t// -->\n\t\t\t</script>\n\t\t\t{$messagearea}\n\t\t";
        if (is_browser('mozilla') and $show['wysiwyg'] == 2) {
            // Mozilla WYSIWYG can't have the QR collapse button,
            // so remove that and force QR to be expanded
            $show['quickreply_collapse'] = false;
            unset($vbcollapse["collapseobj_quickreply"], $vbcollapse["collapseimg_quickreply"], $vbcollapse["collapsecel_quickreply"]);
        } else {
            $show['quickreply_collapse'] = true;
        }
    } else {
        if ($show['ajax_js']) {
            require_once DIR . '/includes/functions_editor.php';
            $vBeditJs = construct_editor_js_arrays();
            eval('$vBeditTemplate[\'clientscript\'] = "' . fetch_template('editor_clientscript') . '";');
        }
    }
}
Exemplo n.º 3
0
eval('$spacer_open = "' . fetch_template('spacer_open') . '";');
eval('$spacer_close = "' . fetch_template('spacer_close') . '";');
($hook = vBulletinHook::fetch_hook('parse_templates')) ? eval($hook) : false;
// parse headinclude, header & footer
$admincpdir =& $vbulletin->config['Misc']['admincpdir'];
$modcpdir =& $vbulletin->config['Misc']['modcpdir'];
// advertising location setup
eval('$ad_location[\'ad_header_logo\'] = "' . fetch_template('ad_header_logo') . '";');
eval('$ad_location[\'ad_header_end\'] = "' . fetch_template('ad_header_end') . '";');
eval('$ad_location[\'ad_navbar_below\'] = "' . fetch_template('ad_navbar_below') . '";');
eval('$ad_location[\'ad_footer_start\'] = "' . fetch_template('ad_footer_start') . '";');
eval('$ad_location[\'ad_footer_end\'] = "' . fetch_template('ad_footer_end') . '";');
// process editor css if required
if ($show['editor_css']) {
    require_once DIR . '/includes/functions_editor.php';
    construct_editor_styles_js($style['editorstyles']);
    eval('$editor_css = "' . fetch_template('editor_css') . '";');
}
// #############################################################################
// handle notices
if (!empty($vbulletin->noticecache) and is_array($vbulletin->noticecache)) {
    $notices = '';
    require_once DIR . '/includes/functions_notice.php';
    if ($vbulletin->userinfo['userid'] == 0) {
        $vbulletin->userinfo['musername'] = fetch_musername($vbulletin->userinfo);
    }
    foreach (fetch_relevant_notice_ids() as $_noticeid) {
        $show['notices'] = true;
        $notice_html = str_replace(array('{musername}', '{username}', '{userid}', '{sessionurl}'), array($vbulletin->userinfo['musername'], $vbulletin->userinfo['username'], $vbulletin->userinfo['userid'], $vbulletin->session->vars['sessionurl']), $vbphrase["notice_{$_noticeid}_html"]);
        ($hook = vBulletinHook::fetch_hook('notices_noticebit')) ? eval($hook) : false;
        eval('$notices .= "' . fetch_template('navbar_noticebit') . '";');
Exemplo n.º 4
0
/**
* Builds the javascript arrays used by the editor system
*
* @return	array
*/
function construct_editor_js_arrays()
{
    global $vbulletin;
    // extract the variables from the vbcode_font_options and vbcode_size_options templates
    foreach (array('editor_jsoptions_font', 'editor_jsoptions_size') as $template) {
        $string = fetch_template($template, 1, 0);
        ${$template} = preg_split('#\\r?\\n#s', $string, -1, PREG_SPLIT_NO_EMPTY);
    }
    // get the javascript vars to drive the editor
    $vBeditJs = array('font_options_array' => '"' . implode('", "', $editor_jsoptions_font) . '"', 'size_options_array' => implode(", ", $editor_jsoptions_size), 'istyle_array' => construct_editor_styles_js());
    return $vBeditJs;
}