Пример #1
0
 function form($form)
 {
     if (qa_opt('embed_smileys') && isset($form['hidden']) && isset($form['id'])) {
         $id = substr($form['id'], 0, 1);
         if ($id == 'c') {
             $id = $form['id'];
         }
         $editor = @$form['hidden'][$id . '_editor'];
         if ($editor === null) {
             return qa_html_theme_base::form($form);
         }
         if ($editor == "" && qa_opt('embed_smileys_editor_button')) {
             @($form['fields']['content']['tags'] .= ' index="' . $this->idx . '"');
             $smileybox = $this->makeSmileyBox();
             $form['fields'] = array_merge(array('smileys' => array("type" => "custom", "html" => '<div class="smiley-button" id="smiley-button' . $this->idx . '" title="Add emoticon" onclick="toggleSmileyBox(' . $this->idx . ')"><img src="' . QA_HTML_THEME_LAYER_URLTOROOT . 'images/emoticon-00100-smile.gif"/></div>' . $smileybox)), $form['fields']);
             $this->idx++;
         } else {
             if ($editor == "Markdown Editor" && qa_opt('embed_smileys_markdown_button')) {
                 @($form['fields']['content']['tags'] .= ' index="' . $this->idx . '"');
                 $smileybox = $this->makeSmileyBox();
                 $form['fields']['content']['html'] = str_replace('class="wmd-button-bar"></div>', 'class="wmd-button-bar"><div class="smiley-button" id="smiley-button' . $this->idx . '" title="Add emoticon" onclick="toggleSmileyBox(' . $this->idx . ')"><img src="' . QA_HTML_THEME_LAYER_URLTOROOT . 'images/emoticon-00100-smile.gif"/></div>' . $smileybox . '</div>', $form['fields']['content']['html']);
                 $form['fields']['content']['html'] = str_replace('<textarea', '<textarea index="' . $this->idx . '"', $form['fields']['content']['html']);
                 $this->idx++;
             }
         }
     }
     qa_html_theme_base::form($form);
 }
 function form($form)
 {
     if (qa_opt('ajax_comment_enable') && !$this->qa_state && !empty($form) && isset($form['ajax_comment']) && $this->can_comment) {
         $this->output('<div class="ajax-comment"' . (isset($form['ajax_comment_comments']) ? ' comments="true"' : '') . ' style="display:none" value="' . $form['ajax_comment'] . '" id="ajax-comment-' . $this->idx++ . '">');
         unset($form['ajax_comment']);
         unset($form['ajax_comment_comments']);
         qa_html_theme_base::form($form);
         $this->output('</div>');
     } else {
         qa_html_theme_base::form($form);
     }
 }
Пример #3
0
 function profile_page()
 {
     $handle = $this->content['raw']['account']['handle'];
     $userid = $this->content['raw']['account']['userid'];
     $about = cs_user_profile($handle, 'about');
     $this->output('<div class="user-cols content-sidebar">');
     $this->cs_user_nav($handle);
     $this->output('<div class="user-cols-right">');
     if (isset($about) && strlen($about)) {
         $this->output('<div class="about-me widget">', '<h3 class="widget-title">' . qa_lang_html('cleanstrap/about_me') . '</h3>', $about, '</div>');
     }
     $this->cs_user_activity_count($handle);
     $this->output('<div class="about-me widget">', '<h3 class="widget-title">' . qa_lang_html('cleanstrap/user_profile') . '</h3>');
     qa_html_theme_base::form($this->content['form_profile']);
     $this->output('</div>');
     $this->cs_user_qa($handle);
     $this->output('</div>');
     $this->output('</div>');
 }