本文整理汇总了PHP中qa_html_theme_base类的典型用法代码示例。如果您正苦于以下问题:PHP qa_html_theme_base类的具体用法?PHP qa_html_theme_base怎么用?PHP qa_html_theme_base使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了qa_html_theme_base类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: c_item_content
function c_item_content($c_item)
{
if (qa_opt('embed_smileys') && isset($c_item['content'])) {
$c_item['content'] = $this->smiley_replace($c_item['content']);
}
qa_html_theme_base::c_item_content($c_item);
}
开发者ID:NoahY,项目名称:q2a-smilies,代码行数:7,代码来源:qa-smilies-layer.php
示例2: head_css
function head_css()
{
qa_html_theme_base::head_css();
if (strlen(qa_opt('facebook_app_id')) && strlen(qa_opt('facebook_app_secret'))) {
$this->output('<style><!--', '.fb-login-button.fb_iframe_widget.fb_hide_iframes span {display:none;}', '--></style>');
}
}
开发者ID:gogupe,项目名称:question2answer-releases,代码行数:7,代码来源:qa-facebook-layer.php
示例3: head_custom
function head_custom()
{
qa_html_theme_base::head_custom();
if (in_array($this->template, array('question', 'ask', 'not-found')) && qa_opt('confirm_close_plugin')) {
$this->output('<script type="text/javascript">
jQuery("document").ready(function() {
jQuery("form").submit(function(event) {
window.onbeforeunload = null;
});
window.onbeforeunload = function(event) {
var content = false
jQuery("textarea:visible").each( function() {
if(this.value) {
content = true;
return false;
}
});
if (content)
return "You have entered text; are you sure you wish to leave this page?";
}
});
</script>');
}
}
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:27,代码来源:qa-confirm-layer.php
示例4: body_prefix
function body_prefix()
{
qa_html_theme_base::body_prefix();
if ($this->notify) {
$this->output($this->notify);
}
}
开发者ID:NoahY,项目名称:q2a-privileges,代码行数:7,代码来源:qa-priv-layer.php
示例5: head_custom
function head_custom()
{
if ($this->template == 'admin') {
$this->output("\n\t<script>\t\t\t\n\tfunction mergePluginGetPosts() {\n\t\tvar from=jQuery('#merge_from').val();\n\t\tvar to=jQuery('#merge_to').val();\n\n\t\tvar dataString = 'ajax_merge_get_from='+from+'&ajax_merge_get_to='+to; \n\t\tjQuery.ajax({ \n\t\t type: 'POST', \n\t\t url: '" . qa_self_html() . "', \n\t\t data: dataString, \n\t\t dataType: 'json', \n\t\t success: function(json) {\n\t\t\t\tjQuery('#merge_from_out').html('Merging from: <a href=\"'+json.from_url+'\">'+json.from+'</a>');\n\t\t\t\tjQuery('#merge_to_out').html('To: <a href=\"'+json.to_url+'\">'+json.to+'</a>');\n\t\t\t} \n\t\t});\n\t\treturn false;\n\t}\n\t</script>");
}
qa_html_theme_base::head_custom();
}
开发者ID:NoahY,项目名称:q2a-post-merge,代码行数:7,代码来源:qa-merge-layer.php
示例6: q_list
public function q_list($q_list)
{
if (!empty($q_list['qs']) && qa_opt('mouseover_content_on')) {
// first check it is not an empty list and the feature is turned on
// Collect the question ids of all items in the question list (so we can do this in one DB query)
$postids = array();
foreach ($q_list['qs'] as $question) {
if (isset($question['raw']['postid'])) {
$postids[] = $question['raw']['postid'];
}
}
if (!empty($postids)) {
// Retrieve the content for these questions from the database and put into an array fetching
// the minimal amount of characters needed to determine the string should be shortened or not
$maxlength = qa_opt('mouseover_content_max_len');
$result = qa_db_query_sub('SELECT postid, LEFT(content, #) content, format FROM ^posts WHERE postid IN (#)', $maxlength + 1, $postids);
$postinfo = qa_db_read_all_assoc($result, 'postid');
// Get the regular expression fragment to use for blocked words and the maximum length of content to show
$blockwordspreg = qa_get_block_words_preg();
// Now add the popup to the title for each question
foreach ($q_list['qs'] as $index => $question) {
if (isset($postinfo[$question['raw']['postid']])) {
$thispost = $postinfo[$question['raw']['postid']];
$text = qa_viewer_text($thispost['content'], $thispost['format'], array('blockwordspreg' => $blockwordspreg));
$text = qa_shorten_string_line($text, $maxlength);
$title = isset($question['title']) ? $question['title'] : '';
$q_list['qs'][$index]['title'] = sprintf('<span title="%s">%s</span>', qa_html($text), $title);
}
}
}
}
qa_html_theme_base::q_list($q_list);
// call back through to the default function
}
开发者ID:GitFuture,项目名称:bmf,代码行数:34,代码来源:qa-mouseover-layer.php
示例7: c_item_content
function c_item_content($c_item)
{
if (isset($c_item['content'])) {
$c_item['content'] = $this->embed_replace($c_item['content']);
}
qa_html_theme_base::c_item_content($c_item);
}
开发者ID:JoZ3,项目名称:q2a-embed,代码行数:7,代码来源:qa-embed-layer.php
示例8: q_list
function q_list($q_list)
{
if (count(@$q_list['qs']) && qa_opt('mouseover_content_on')) {
// first check it is not an empty list and the feature is turned on
// Collect the question ids of all items in the question list (so we can do this in one DB query)
$postids = array();
foreach ($q_list['qs'] as $question) {
if (isset($question['raw']['postid'])) {
$postids[] = $question['raw']['postid'];
}
}
if (count($postids)) {
// Retrieve the content for these questions from the database and put into an array
$result = qa_db_query_sub('SELECT postid, content, format FROM ^posts WHERE postid IN (#)', $postids);
$postinfo = qa_db_read_all_assoc($result, 'postid');
// Get the regular expression fragment to use for blocked words and the maximum length of content to show
$blockwordspreg = qa_get_block_words_preg();
$maxlength = qa_opt('mouseover_content_max_len');
// Now add the popup to the title for each question
foreach ($q_list['qs'] as $index => $question) {
$thispost = @$postinfo[$question['raw']['postid']];
if (isset($thispost)) {
$text = qa_viewer_text($thispost['content'], $thispost['format'], array('blockwordspreg' => $blockwordspreg));
$text = qa_shorten_string_line($text, $maxlength);
$q_list['qs'][$index]['title'] = '<SPAN TITLE="' . qa_html($text) . '">' . @$question['title'] . '</SPAN>';
}
}
}
}
qa_html_theme_base::q_list($q_list);
// call back through to the default function
}
开发者ID:mathjoy,项目名称:math-duodaa,代码行数:32,代码来源:qa-mouseover-layer.php
示例9: attribution
function attribution()
{
// Please see the license at the top of this file before changing this link. Thank you.
qa_html_theme_base::attribution();
// modxclub [start] Please erase. Use this theme according to license of Question2Answer.
$this->output('<DIV CLASS="qa-designedby">', 'Designed by <A HREF="http://www.axiologic.ro">Axiologic SaaS</A>', '</DIV>');
// modxclub [end]
}
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:8,代码来源:qa-theme.php
示例10: main_parts
function main_parts($content)
{
if ($this->template == 'user' && qa_get('tab') == 'history' && qa_opt('event_logger_to_database') && qa_opt('user_act_list_active')) {
$content = array();
$content['form-activity-list'] = $this->user_activity_form();
}
qa_html_theme_base::main_parts($content);
}
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:8,代码来源:qa-history-layer.php
示例11: doctype
function doctype()
{
qa_html_theme_base::doctype();
$qw_notification_id = qa_get('ra_notification');
if (isset($qw_notification_id)) {
qw_set_notification_as_read($qw_notification_id);
}
}
开发者ID:rahularyan,项目名称:dude-theme,代码行数:8,代码来源:notification-layer.php
示例12: nav_list
function nav_list($navigation, $navtype, $level = null)
{
// remove the registration link unless normal login AND allow registration booleans are set in options
if (!(qa_opt('ldap_login_allow_normal') && qa_opt('ldap_login_allow_registration'))) {
unset($navigation['register']);
}
qa_html_theme_base::nav_list($navigation, $navtype);
}
开发者ID:neobubbaloo82,项目名称:qa-ldap-login,代码行数:8,代码来源:ldap-login-layer.php
示例13: body_script
function body_script()
{
qa_html_theme_base::body_script();
if ($this->jsTOS) {
$error = qa_opt('tos_error');
$this->output('<script type="text/javascript">', "\n\t\t\t\t\$(document).ready(function(e) { \n\t\t\t\t\t\$('#register').click(function() {\n\t\t\t\t\t\tif (jQuery('#TOS').is(':checked')){\n\t\t\t\t\t\t\t\$('.qa-waiting').show();\n\t\t\t\t\t\t\t\$('#TOSvalidation').remove();\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\$('#TOSvalidation').parent().parent().remove();\n\t\t\t\t\t\t\t\$('#TOS').parent().parent().append( '<tr><td class=\"qa-form-tall-data\"><div id=\"TOSvalidation\" class=\"qa-form-tall-error\">" . $error . "</div></td></tr>' );\n\t\t\t\t\t\t\t\$('.qa-waiting').hide();\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\t", '</script>');
}
}
开发者ID:mavencode01,项目名称:Q2A-Terms-of-Service,代码行数:8,代码来源:qa-tos-layer.php
示例14: body_prefix
function body_prefix()
{
if (!qa_get_logged_in_userid() && !@$_COOKIE['qa_faq_noshow'] && qa_opt('faq_notify_show')) {
setcookie('qa_faq_noshow', 'true', 0, '/', QA_COOKIE_DOMAIN);
$this->faq_notify();
}
qa_html_theme_base::body_prefix();
}
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:8,代码来源:qa-faq-layer.php
示例15: main_parts
function main_parts($content)
{
$userid = qa_get_logged_in_userid();
if (qa_opt('news_plugin_active') && $this->template == 'user' && qa_opt('news_plugin_send') && !qa_get('tab') && $content['raw']['userid'] == $userid) {
$content['form-newsletter'] = $this->newsletterForm();
}
qa_html_theme_base::main_parts($content);
}
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:8,代码来源:qa-news-layer.php
示例16: doctype
public function doctype()
{
$main = new qa_caching_main();
if ($main->now_caching()) {
if (isset($this->content['notices'])) {
unset($this->content['notices']);
}
}
qa_html_theme_base::doctype();
}
开发者ID:stevenev,项目名称:q2a-caching,代码行数:10,代码来源:qa-caching-layer.php
示例17: 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
示例18: ranking_label
function ranking_label($item, $class)
{
if (qa_opt('marker_plugin_w_users') && $class == 'qa-top-users') {
$handle = strip_tags($item['label']);
$uid = $this->getuserfromhandle($handle);
$image = $this->get_role_marker($uid, 2);
$item['label'] = $image . $item['label'];
}
qa_html_theme_base::ranking_label($item, $class);
}
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:10,代码来源:qa-marker-layer.php
示例19: form_field
function form_field($field, $style)
{
if (@$field['type'] == 'ra_qaads_multi_text') {
$this->form_prefix($field, $style);
$this->ra_qaads_form_multi_text($field, $style);
$this->form_suffix($field, $style);
} else {
qa_html_theme_base::form_field($field, $style);
// call back through to the default function
}
}
开发者ID:rahularyan,项目名称:dude-theme,代码行数:11,代码来源:ra-option-layer.php
示例20: q_view_clear
function q_view_clear()
{
// call default method output
qa_html_theme_base::q_view_clear();
// return if not admin!
if (qa_get_logged_in_level() < QA_USER_LEVEL_ADMIN) {
return;
}
// check if question is duplicate
$closed = @$this->content['q_view']['raw']['closedbyid'] !== null;
if ($closed) {
// check if duplicate
$duplicate = qa_db_read_one_value(qa_db_query_sub('SELECT postid FROM `^posts`
WHERE `postid` = #
AND `type` = "Q"
;', $this->content['q_view']['raw']['closedbyid']), true);
if ($duplicate) {
$this->output('<div id="mergeDup" style="margin:10px 0 0 120px;padding:5px 10px;background:#FCC;border:1px solid #AAA;"><h3>Merge Duplicate:</h3>');
// form output
$this->output('
<FORM METHOD="POST">
<TABLE>
<TR>
<TD CLASS="qa-form-tall-label">
From:
<INPUT NAME="merge_from" id="merge_from" TYPE="text" VALUE="' . $this->content['q_view']['raw']['postid'] . '" CLASS="qa-form-tall-number">
To:
<INPUT NAME="merge_to" id="merge_to" TYPE="text" VALUE="' . $this->content['q_view']['raw']['closedbyid'] . '" CLASS="qa-form-tall-number">
</TD>
</TR>
<TR>
<TD CLASS="qa-form-tall-label">
Text to show when redirecting from merged question:
</TD>
</TR>
<TR>
<TD CLASS="qa-form-tall-label">
<INPUT NAME="merge_question_merged" id="merge_question_merged" TYPE="text" VALUE="' . qa_opt('merge_question_merged') . '" CLASS="qa-form-tall-text">
</TD>
</TR>
<TR>
<TD style="text-align:right;">
<INPUT NAME="merge_question_process" VALUE="Merge" TITLE="" TYPE="submit" CLASS="qa-form-tall-button qa-form-tall-button-0">
</TD>
</TR>
</TABLE>
</FORM> ');
$this->output('</div>');
}
}
}
开发者ID:NoahY,项目名称:q2a-post-merge,代码行数:53,代码来源:qa-merge-layer-ondup.php
注:本文中的qa_html_theme_base类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论