本文整理匯總了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);
}
}