本文整理汇总了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);
}
}
示例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);
}
}