当前位置: 首页>>代码示例>>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;未经允许,请勿转载。