當前位置: 首頁>>代碼示例>>PHP>>正文


PHP qa_html_theme_base::form_button_data方法代碼示例

本文整理匯總了PHP中qa_html_theme_base::form_button_data方法的典型用法代碼示例。如果您正苦於以下問題:PHP qa_html_theme_base::form_button_data方法的具體用法?PHP qa_html_theme_base::form_button_data怎麽用?PHP qa_html_theme_base::form_button_data使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在qa_html_theme_base的用法示例。


在下文中一共展示了qa_html_theme_base::form_button_data方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: form_button_data

 function form_button_data($button, $key, $style)
 {
     if ($this->forbid_new_tag() && $key === 'ask') {
         $baseclass = 'qa-form-' . $style . '-button qa-form-' . $style . '-button-' . $key;
         $hoverclass = 'qa-form-' . $style . '-hover qa-form-' . $style . '-hover-' . $key;
         $this->output('<INPUT' . rtrim(' ' . @$button['tags']) . ' onclick="qa_tag_verify();" VALUE="' . @$button['label'] . '" TITLE="' . @$button['popup'] . '" TYPE="button" CLASS="' . $baseclass . '" onmouseover="this.className=\'' . $hoverclass . '\';" onmouseout="this.className=\'' . $baseclass . '\';"/>');
     } else {
         qa_html_theme_base::form_button_data($button, $key, $style);
     }
 }
開發者ID:NoahY,項目名稱:Q2A-Tag-Synonyms,代碼行數:10,代碼來源:qa-tag-synonyms-layer.php

示例2: form_button_data

 function form_button_data($button, $key, $style)
 {
     if (qa_opt('ajax_comment_enable') && !$this->qa_state && $this->can_comment) {
         if ($key === 'comment') {
             // insert username
             $handle = '';
             if (qa_opt('ajax_comment_username') && isset($button['comment_username']) && $button['comment_username'] != qa_get_logged_in_handle()) {
                 $handle = ",'" . $button['comment_username'] . "'";
             }
             // flash star if we are the questioner commenting on an answer
             $star = '';
             $ourid = qa_get_logged_in_userid();
             if (qa_opt('ajax_comment_flash_star') && !$this->content['q_view']['raw']['selchildid'] && $this->idx > 0 && @$button['popup'] == qa_lang_html('question/comment_a_popup') && $this->content['q_view']['raw']['userid'] == $ourid && @$this->content['a_list']['as'][$this->idx - 1]['raw']['userid'] != $ourid) {
                 $star = ',' . $this->idx;
             }
             $toggle_opts = $handle ? $handle . $star : ',null' . $star;
             $baseclass = 'qa-form-' . $style . '-button qa-form-' . $style . '-button-' . $key;
             $hoverclass = 'qa-form-' . $style . '-hover qa-form-' . $style . '-hover-' . $key;
             if (isset($button['ajax_comment'])) {
                 $this->output('<INPUT' . rtrim(' ' . @$button['tags']) . ' VALUE="' . @$button['label'] . '" TITLE="' . @$button['popup'] . '" TYPE="button" CLASS="' . $baseclass . '" onmouseover="this.className=\'' . $hoverclass . '\';" onmouseout="this.className=\'' . $baseclass . '\';"/>');
             } else {
                 $this->output('<INPUT' . rtrim(' ' . @$button['tags']) . ' onclick="toggleComment(' . (isset($_POST['ajax_id']) ? $_POST['ajax_id'] : $this->idx) . $toggle_opts . ');" VALUE="' . @$button['label'] . '" TITLE="' . @$button['popup'] . '" TYPE="button" CLASS="' . $baseclass . '" onmouseover="this.className=\'' . $hoverclass . '\';" onmouseout="this.className=\'' . $baseclass . '\';"/>');
             }
         } else {
             if ($key === 'cancel' && isset($button['ajax_comment'])) {
                 $baseclass = 'qa-form-' . $style . '-button qa-form-' . $style . '-button-' . $key;
                 $hoverclass = 'qa-form-' . $style . '-hover qa-form-' . $style . '-hover-' . $key;
                 $this->output('<INPUT' . rtrim(' ' . @$button['tags']) . ' onclick="toggleComment(false);" VALUE="' . @$button['label'] . '" TITLE="' . @$button['popup'] . '" TYPE="button" CLASS="' . $baseclass . '" onmouseover="this.className=\'' . $hoverclass . '\';" onmouseout="this.className=\'' . $baseclass . '\';"/>');
             } else {
                 qa_html_theme_base::form_button_data($button, $key, $style);
             }
         }
     } else {
         qa_html_theme_base::form_button_data($button, $key, $style);
     }
 }
開發者ID:microbye,項目名稱:q2a-comment-ajax,代碼行數:36,代碼來源:qa-comment-layer.php


注:本文中的qa_html_theme_base::form_button_data方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。