本文整理汇总了PHP中qa_cookie_get函数的典型用法代码示例。如果您正苦于以下问题:PHP qa_cookie_get函数的具体用法?PHP qa_cookie_get怎么用?PHP qa_cookie_get使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了qa_cookie_get函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: qa_cookie_get_create
function qa_cookie_get_create()
{
require_once QA_INCLUDE_DIR . 'qa-db-cookies.php';
$cookieid = qa_cookie_get();
if (isset($cookieid) && qa_db_cookie_exists($cookieid)) {
} else {
$cookieid = qa_db_cookie_create(qa_remote_ip_address());
}
setcookie('qa_id', $cookieid, time() + 86400 * 365, '/', QA_COOKIE_DOMAIN);
return $cookieid;
}
示例2: qa_q_list_page_content
function qa_q_list_page_content($questions, $pagesize, $start, $count, $sometitle, $nonetitle, $navcategories, $categoryid, $categoryqcount, $categorypathprefix, $feedpathprefix, $suggest, $pagelinkparams = null, $categoryparams = null, $dummy = null)
{
if (qa_to_override(__FUNCTION__)) {
$args = func_get_args();
return qa_call_override(__FUNCTION__, $args);
}
require_once QA_INCLUDE_DIR . 'app/format.php';
require_once QA_INCLUDE_DIR . 'app/updates.php';
$userid = qa_get_logged_in_userid();
// Chop down to size, get user information for display
if (isset($pagesize)) {
$questions = array_slice($questions, 0, $pagesize);
}
$usershtml = qa_userids_handles_html(qa_any_get_userids_handles($questions));
// Prepare content for theme
$qa_content = qa_content_prepare(true, array_keys(qa_category_path($navcategories, $categoryid)));
$qa_content['q_list']['form'] = array('tags' => 'method="post" action="' . qa_self_html() . '"', 'hidden' => array('code' => qa_get_form_security_code('vote')));
$qa_content['q_list']['qs'] = array();
if (count($questions)) {
$qa_content['title'] = $sometitle;
$defaults = qa_post_html_defaults('Q');
if (isset($categorypathprefix)) {
$defaults['categorypathprefix'] = $categorypathprefix;
}
foreach ($questions as $question) {
$fields = qa_any_to_q_html_fields($question, $userid, qa_cookie_get(), $usershtml, null, qa_post_html_options($question, $defaults));
if (!empty($fields['raw']['closedbyid'])) {
$fields['closed'] = array('state' => qa_lang_html('main/closed'));
}
$qa_content['q_list']['qs'][] = $fields;
}
} else {
$qa_content['title'] = $nonetitle;
}
if (isset($userid) && isset($categoryid)) {
$favoritemap = qa_get_favorite_non_qs_map();
$categoryisfavorite = @$favoritemap['category'][$navcategories[$categoryid]['backpath']];
$qa_content['favorite'] = qa_favorite_form(QA_ENTITY_CATEGORY, $categoryid, $categoryisfavorite, qa_lang_sub($categoryisfavorite ? 'main/remove_x_favorites' : 'main/add_category_x_favorites', $navcategories[$categoryid]['title']));
}
if (isset($count) && isset($pagesize)) {
$qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, $count, qa_opt('pages_prev_next'), $pagelinkparams);
}
if (empty($qa_content['page_links'])) {
$qa_content['suggest_next'] = $suggest;
}
if (qa_using_categories() && count($navcategories) && isset($categorypathprefix)) {
$qa_content['navigation']['cat'] = qa_category_navigation($navcategories, $categoryid, $categorypathprefix, $categoryqcount, $categoryparams);
}
if (isset($feedpathprefix) && (qa_opt('feed_per_category') || !isset($categoryid))) {
$qa_content['feed'] = array('url' => qa_path_html(qa_feed_request($feedpathprefix . (isset($categoryid) ? '/' . qa_category_path_request($navcategories, $categoryid) : ''))), 'label' => strip_tags($sometitle));
}
return $qa_content;
}
示例3: qa_favorite_q_list_view
function qa_favorite_q_list_view($questions, $usershtml)
{
$q_list = array('qs' => array());
if (count($questions) === 0) {
return $q_list;
}
$q_list['form'] = array('tags' => 'method="post" action="' . qa_self_html() . '"', 'hidden' => array('code' => qa_get_form_security_code('vote')));
$defaults = qa_post_html_defaults('Q');
foreach ($questions as $question) {
$q_list['qs'][] = qa_post_html_fields($question, qa_get_logged_in_userid(), qa_cookie_get(), $usershtml, null, qa_post_html_options($question, $defaults));
}
return $q_list;
}
示例4: qa_cookie_get_create
function qa_cookie_get_create()
{
if (qa_to_override(__FUNCTION__)) {
$args = func_get_args();
return qa_call_override(__FUNCTION__, $args);
}
require_once QA_INCLUDE_DIR . 'qa-db-cookies.php';
$cookieid = qa_cookie_get();
if (isset($cookieid) && qa_db_cookie_exists($cookieid)) {
} else {
$cookieid = qa_db_cookie_create(qa_remote_ip_address());
}
setcookie('qa_id', $cookieid, time() + 86400 * 365, '/', QA_COOKIE_DOMAIN);
$_COOKIE['qa_id'] = $cookieid;
return $cookieid;
}
示例5: qa_complete_reset_user
function qa_complete_reset_user($userid)
{
require_once QA_INCLUDE_DIR . 'qa-util-string.php';
require_once QA_INCLUDE_DIR . 'qa-app-options.php';
require_once QA_INCLUDE_DIR . 'qa-app-emails.php';
require_once QA_INCLUDE_DIR . 'qa-app-cookies.php';
require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
$password = qa_random_alphanum(max(QA_MIN_PASSWORD_LEN, QA_NEW_PASSWORD_LEN));
$userinfo = qa_db_select_with_pending(qa_db_user_account_selectspec($userid, true));
if (!qw_send_notification($userid, $userinfo['email'], $userinfo['handle'], qa_lang('emails/new_password_subject'), nl2br(qa_lang('emails/new_password_body')), array('^password' => $password, '^url' => qa_opt('site_url')))) {
qa_fatal_error('Could not send new password - password not reset');
}
qa_db_user_set_password($userid, $password);
// do this last, to be safe
qa_db_user_set($userid, 'emailcode', '');
// so can't be reused
qa_report_event('u_reset', $userid, $userinfo['handle'], qa_cookie_get(), array('email' => $userinfo['email']));
}
示例6: get_user_activity
function get_user_activity($handle, $limit = 10)
{
$userid = qa_handle_to_userid($handle);
require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
require_once QA_INCLUDE_DIR . 'qa-app-format.php';
$identifier = QA_FINAL_EXTERNAL_USERS ? $userid : $handle;
list($useraccount, $questions, $answerqs, $commentqs, $editqs) = qa_db_select_with_pending(QA_FINAL_EXTERNAL_USERS ? null : qa_db_user_account_selectspec($handle, false), qa_db_user_recent_qs_selectspec($userid, $identifier, $limit), qa_db_user_recent_a_qs_selectspec($userid, $identifier), qa_db_user_recent_c_qs_selectspec($userid, $identifier), qa_db_user_recent_edit_qs_selectspec($userid, $identifier));
if (!QA_FINAL_EXTERNAL_USERS && !is_array($useraccount)) {
// check the user exists
return include QA_INCLUDE_DIR . 'qa-page-not-found.php';
}
// Get information on user references
$questions = qa_any_sort_and_dedupe(array_merge($questions, $answerqs, $commentqs, $editqs));
$questions = array_slice($questions, 0, $limit);
$usershtml = qa_userids_handles_html(qa_any_get_userids_handles($questions), false);
$htmldefaults = qa_post_html_defaults('Q');
$htmldefaults['whoview'] = false;
$htmldefaults['voteview'] = false;
$htmldefaults['avatarsize'] = 0;
foreach ($questions as $question) {
$qa_content[] = qa_any_to_q_html_fields($question, $userid, qa_cookie_get(), $usershtml, null, array('voteview' => false) + qa_post_html_options($question, $htmldefaults));
}
$output = '<div class="user-activities">';
$output .= '<ul>';
if (isset($qa_content)) {
foreach ($qa_content as $qs) {
$icon = 'icon-time undefined';
$output .= '<li class="activity-item">';
$output .= '<div class="list-right">';
$output .= '<div class="type pull-left ' . $icon . '"></div>';
$output .= '<div class="what"><a class="what-task" href="' . @$qs['url'] . '">' . $qs['what'] . '</a>';
$output .= '<a href="' . $qs['url'] . '">' . $qs['title'] . '</a> </div>';
$output .= '<strong class="when">' . implode(' ', $qs['when']) . '</strong>';
$output .= '</div>';
$output .= '</li>';
}
} else {
$output .= '<li>' . qa_lang('cleanstrap/no_activity_yet') . '</li>';
}
$output .= '</ul>';
$output .= '</div>';
return $output;
}
示例7: output_widget
function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
{
$widget_opt = @$themeobject->current_widget['param']['options'];
require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
if (@$qa_content['q_view']['raw']['type'] != 'Q') {
// question might not be visible, etc...
return;
}
$questionid = $qa_content['q_view']['raw']['postid'];
$userid = qa_get_logged_in_userid();
$cookieid = qa_cookie_get();
$questions = qa_db_single_select(qa_db_related_qs_selectspec($userid, $questionid, (int) $widget_opt['count']));
$minscore = qa_match_to_min_score(qa_opt('match_related_qs'));
foreach ($questions as $key => $question) {
if ($question['score'] < $minscore) {
unset($questions[$key]);
}
}
$titlehtml = qa_lang_html(count($questions) ? 'main/related_qs_title' : 'main/no_related_qs_title');
if (@$themeobject->current_widget['param']['locations']['show_title']) {
$themeobject->output('<h3 class="widget-title">' . qa_lang('cleanstrap/related_questions') . '</h3>');
}
$themeobject->output('<div class="ra-rq-widget">');
$themeobject->output('<ul>');
foreach ($questions as $p) {
$timeCode = qa_when_to_html($p['created'], 7);
$when = @$timeCode['prefix'] . @$timeCode['data'] . @$timeCode['suffix'];
$themeobject->output('<li>' . cs_get_post_avatar($p, $p['userid'], 30, true));
$themeobject->output('<div class="post-content">');
$themeobject->output('<a class="title" href="' . qa_q_path_html($p['postid'], $p['title']) . '">' . qa_html($p['title']) . '</a>');
$themeobject->output('<div class="meta">');
$themeobject->output('<span>' . qa_lang_sub('cleanstrap/x_answers', $p['acount']) . '</span>');
$themeobject->output('<span class="time icon-time">' . $when . '</span>');
$themeobject->output('<span class="vote-count icon-thumbs-up2">' . qa_lang_sub('cleanstrap/x_votes', $p['netvotes']) . '</span>');
$themeobject->output('</div>');
$themeobject->output('</div>');
$themeobject->output('</li>');
}
$themeobject->output('</ul>');
$themeobject->output('</div>');
}
示例8: process_request
function process_request($request)
{
require_once QA_INCLUDE_DIR . 'qa-app-format.php';
require_once QA_INCLUDE_DIR . 'qa-app-posts.php';
require_once QA_INCLUDE_DIR . 'qa-db-post-create.php';
require_once QA_INCLUDE_DIR . 'mp-db-users.php';
// report that we entered this page
qa_report_event('page_enter', qa_get_logged_in_userid(), qa_get_logged_in_handle(), qa_cookie_get(), array('params' => $_SERVER['QUERY_STRING']));
// create the editor and update its content
qa_get_post_content('editor', 'content', $ineditor, $incontent, $informat, $intext);
$editorname = isset($ineditor) ? $ineditor : qa_opt('editor_for_qs');
$editor = qa_load_editor(@$incontent, @$informat, $editorname);
// retrieve variable data
$innotify = qa_post_text('notify') ? true : false;
// handle creation of annoucement
if (qa_post_text('docreate')) {
//retrieve data
$title = qa_post_text('title');
$content = $incontent;
$format = $informat;
// validate data
// handle create work
// actual create process is in file mp-app-posts.php
$postid = qa_post_create('AN', null, $title, $content, $format, mp_get_categoryid(), null, qa_get_logged_in_userid(), $innotify);
// redirect page
qa_redirect('mp-announcements-page');
// our work is done here
}
$qa_content = qa_content_prepare();
// if the user is not logged in, request user to login
if (!qa_get_logged_in_userid()) {
$qa_content['error'] = qa_insert_login_links('Please ^1log in^2 or ^3register^4 first.', $request);
return $qa_content;
}
$qa_content['title'] = 'Create Announcement';
$qa_content['form_newannouncement'] = array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"', 'style' => 'tall', 'fields' => array('title' => array('label' => qa_lang_html('announcements/a_title_label'), 'tags' => 'NAME="title"', 'value' => qa_html(qa_post_text('title')), 'error' => qa_html(@$errors['title'])), 'content' => array_merge($editor->get_field($qa_content, @$incontent, @$informat, 'content', 12, false), array('label' => qa_lang_html('announcements/a_content_label'), 'error' => qa_html(@$errors['content']))), 'notify' => array('label' => 'Send email notification to all registered students', 'tags' => 'NAME="notify"', 'type' => 'checkbox', 'value' => qa_html($innotify))), 'buttons' => array('ok' => array('tags' => 'NAME="docreate"', 'label' => 'Create Announcement', 'value' => '1')), 'hidden' => array('hiddenfield' => '1', 'editor' => qa_html($editorname)));
// create the sub menu for navigation
$qa_content['navigation']['sub'] = mp_announcements_sub_navigation();
$qa_content['navigation']['sub']['create']['selected'] = true;
return $qa_content;
}
示例9: output_widget
public function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
{
require_once QA_INCLUDE_DIR . 'db/selects.php';
if (!isset($qa_content['q_view']['raw']['type']) || $qa_content['q_view']['raw']['type'] != 'Q') {
// question might not be visible, etc...
return;
}
$questionid = $qa_content['q_view']['raw']['postid'];
$userid = qa_get_logged_in_userid();
$cookieid = qa_cookie_get();
$questions = qa_db_single_select(qa_db_related_qs_selectspec($userid, $questionid, qa_opt('page_size_related_qs')));
$minscore = qa_match_to_min_score(qa_opt('match_related_qs'));
foreach ($questions as $key => $question) {
if ($question['score'] < $minscore) {
unset($questions[$key]);
}
}
$titlehtml = qa_lang_html(count($questions) ? 'main/related_qs_title' : 'main/no_related_qs_title');
if ($region == 'side') {
$themeobject->output('<div class="qa-related-qs">', '<h2 style="margin-top:0; padding-top:0;">', $titlehtml, '</h2>');
$themeobject->output('<ul class="qa-related-q-list">');
foreach ($questions as $question) {
$themeobject->output('<li class="qa-related-q-item">' . '<a href="' . qa_q_path_html($question['postid'], $question['title']) . '">' . qa_html($question['title']) . '</a>' . '</li>');
}
$themeobject->output('</ul>', '</div>');
} else {
$themeobject->output('<h2>', $titlehtml, '</h2>');
$q_list = array('form' => array('tags' => 'method="post" action="' . qa_self_html() . '"', 'hidden' => array('code' => qa_get_form_security_code('vote'))), 'qs' => array());
$defaults = qa_post_html_defaults('Q');
$usershtml = qa_userids_handles_html($questions);
foreach ($questions as $question) {
$q_list['qs'][] = qa_post_html_fields($question, $userid, $cookieid, $usershtml, null, qa_post_html_options($question, $defaults));
}
$themeobject->q_list_and_form($q_list);
}
}
示例10: output_widget
function output_widget($region, $place, $themeobject, $template, $request, $qa_content)
{
require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
if (@$qa_content['q_view']['raw']['type'] != 'Q') {
// question might not be visible, etc...
return;
}
$questionid = $qa_content['q_view']['raw']['postid'];
$userid = qa_get_logged_in_userid();
$cookieid = qa_cookie_get();
$questions = qa_db_single_select(qa_db_related_qs_selectspec($userid, $questionid, qa_opt('page_size_related_qs')));
$minscore = qa_match_to_min_score(qa_opt('match_related_qs'));
foreach ($questions as $key => $question) {
if ($question['score'] < $minscore) {
unset($questions[$key]);
}
}
$titlehtml = qa_lang_html(count($questions) ? 'main/related_qs_title' : 'main/no_related_qs_title');
if ($region == 'side') {
$themeobject->output('<DIV CLASS="qa-related-qs">', '<H2 STYLE="margin-top:0; padding-top:0;">', $titlehtml, '</H2>');
$themeobject->output('<UL CLASS="qa-related-q-list">');
foreach ($questions as $question) {
$themeobject->output('<LI CLASS="qa-related-q-item"><A HREF="' . qa_q_path_html($question['postid'], $question['title']) . '">' . qa_html($question['title']) . '</A></LI>');
}
$themeobject->output('</UL>', '</DIV>');
} else {
$themeobject->output('<H2>', $titlehtml, '</H2>');
$q_list = array('form' => array('tags' => 'METHOD="POST" ACTION="' . qa_self_html() . '"'), 'qs' => array());
$options = qa_post_html_defaults('Q');
$usershtml = qa_userids_handles_html($questions);
foreach ($questions as $question) {
$q_list['qs'][] = qa_post_html_fields($question, $userid, $cookieid, $usershtml, null, $options);
}
$themeobject->q_list_and_form($q_list);
}
}
示例11: qa_page_q_add_c_submit
function qa_page_q_add_c_submit($question, $parent, $commentsfollows, $usecaptcha, &$in, &$errors)
{
$parentid = $parent['postid'];
$prefix = 'c' . $parentid . '_';
$in = array('name' => qa_post_text($prefix . 'name'), 'notify' => qa_post_text($prefix . 'notify') !== null, 'email' => qa_post_text($prefix . 'email'), 'queued' => qa_user_moderation_reason(qa_user_level_for_post($parent)) !== false);
qa_get_post_content($prefix . 'editor', $prefix . 'content', $in['editor'], $in['content'], $in['format'], $in['text']);
$errors = array();
if (!qa_check_form_security_code('comment-' . $parent['postid'], qa_post_text($prefix . 'code'))) {
$errors['content'] = qa_lang_html('misc/form_security_again');
} else {
$filtermodules = qa_load_modules_with('filter', 'filter_comment');
foreach ($filtermodules as $filtermodule) {
$oldin = $in;
$filtermodule->filter_comment($in, $errors, $question, $parent, null);
qa_update_post_text($in, $oldin);
}
if ($usecaptcha) {
qa_captcha_validate_post($errors);
}
if (empty($errors)) {
$testwords = implode(' ', qa_string_to_words($in['content']));
foreach ($commentsfollows as $comment) {
if ($comment['basetype'] == 'C' && $comment['parentid'] == $parentid && !$comment['hidden']) {
if (implode(' ', qa_string_to_words($comment['content'])) == $testwords) {
$errors['content'] = qa_lang_html('question/duplicate_content');
}
}
}
}
if (empty($errors)) {
$userid = qa_get_logged_in_userid();
$handle = qa_get_logged_in_handle();
$cookieid = isset($userid) ? qa_cookie_get() : qa_cookie_get_create();
// create a new cookie if necessary
$commentid = qa_comment_create($userid, $handle, $cookieid, $in['content'], $in['format'], $in['text'], $in['notify'], $in['email'], $question, $parent, $commentsfollows, $in['queued'], $in['name']);
return $commentid;
}
}
return null;
}
示例12: qa_lang_html
$qa_content['title'] = qa_lang_html('admin/recent_hidden_title');
$qa_content['error'] = isset($pageerror) ? $pageerror : qa_admin_page_error();
$qa_content['q_list'] = array('form' => array('tags' => 'method="post" action="' . qa_self_html() . '"', 'hidden' => array('code' => qa_get_form_security_code('admin/click'))), 'qs' => array());
if (count($questions)) {
foreach ($questions as $key => $question) {
$elementid = 'p' . $qhiddenpostid[$key];
$htmloptions = qa_post_html_options($question);
$htmloptions['voteview'] = false;
$htmloptions['tagsview'] = !isset($question['opostid']);
$htmloptions['answersview'] = false;
$htmloptions['viewsview'] = false;
$htmloptions['updateview'] = false;
$htmloptions['contentview'] = true;
$htmloptions['flagsview'] = true;
$htmloptions['elementid'] = $elementid;
$htmlfields = qa_any_to_q_html_fields($question, $userid, qa_cookie_get(), $usershtml, null, $htmloptions);
if (isset($htmlfields['what_url'])) {
// link directly to relevant content
$htmlfields['url'] = $htmlfields['what_url'];
}
$htmlfields['what_2'] = qa_lang_html('main/hidden');
if (@$htmloptions['whenview']) {
$updated = @$question[isset($question['opostid']) ? 'oupdated' : 'updated'];
if (isset($updated)) {
$htmlfields['when_2'] = qa_when_to_html($updated, @$htmloptions['fulldatedays']);
}
}
$buttons = array();
$posttype = qa_strtolower(isset($question['obasetype']) ? $question['obasetype'] : $question['basetype']);
if (!qa_user_post_permit_error('permit_hide_show', $question)) {
// Possible values for popup: reshow_q_popup, reshow_a_popup, reshow_c_popup
示例13: array
}
$qa_content['q_list']['form'] = array('tags' => 'method="post" action="' . qa_self_html() . '"', 'hidden' => array('code' => qa_get_form_security_code('vote')));
$qa_content['q_list']['qs'] = array();
$qdefaults = qa_post_html_defaults('Q');
foreach ($results as $result) {
if (!isset($result['question'])) {
// if we have any non-question results, display with less statistics
$qdefaults['voteview'] = false;
$qdefaults['answersview'] = false;
$qdefaults['viewsview'] = false;
break;
}
}
foreach ($results as $result) {
if (isset($result['question'])) {
$fields = qa_post_html_fields($result['question'], $userid, qa_cookie_get(), $usershtml, null, qa_post_html_options($result['question'], $qdefaults));
} elseif (isset($result['url'])) {
$fields = array('what' => qa_html($result['url']), 'meta_order' => qa_lang_html('main/meta_order'));
} else {
continue;
}
// nothing to show here
if (isset($qdefaults['blockwordspreg'])) {
$result['title'] = qa_block_words_replace($result['title'], $qdefaults['blockwordspreg']);
}
$fields['title'] = qa_html($result['title']);
$fields['url'] = qa_html($result['url']);
$qa_content['q_list']['qs'][] = $fields;
}
$qa_content['page_links'] = qa_html_page_links(qa_request(), $start, $pagesize, $start + $gotcount, qa_opt('pages_prev_next'), array('q' => $inquery), $gotcount >= $count);
if (qa_opt('feed_for_search')) {
示例14: qa_post_text
More about this license: http://www.question2answer.org/license.php
*/
require_once QA_INCLUDE_DIR . 'app/messages.php';
require_once QA_INCLUDE_DIR . 'app/users.php';
require_once QA_INCLUDE_DIR . 'app/cookies.php';
require_once QA_INCLUDE_DIR . 'db/selects.php';
$message = qa_post_text('message');
$tohandle = qa_post_text('handle');
$morelink = qa_post_text('morelink');
$touseraccount = qa_db_select_with_pending(qa_db_user_account_selectspec($tohandle, false));
$loginuserid = qa_get_logged_in_userid();
$errorhtml = qa_wall_error_html($loginuserid, $touseraccount['userid'], $touseraccount['flags']);
if ($errorhtml || !strlen($message) || !qa_check_form_security_code('wall-' . $tohandle, qa_post_text('code'))) {
echo "QA_AJAX_RESPONSE\n0";
} else {
$messageid = qa_wall_add_post($loginuserid, qa_get_logged_in_handle(), qa_cookie_get(), $touseraccount['userid'], $touseraccount['handle'], $message, '');
$touseraccount['wallposts']++;
// won't have been updated
$usermessages = qa_db_select_with_pending(qa_db_recent_messages_selectspec(null, null, $touseraccount['userid'], true, qa_opt('page_size_wall')));
$usermessages = qa_wall_posts_add_rules($usermessages, 0);
$themeclass = qa_load_theme_class(qa_get_site_theme(), 'wall', null, null);
echo "QA_AJAX_RESPONSE\n1\n";
echo 'm' . $messageid . "\n";
// element in list to be revealed
foreach ($usermessages as $message) {
$themeclass->message_item(qa_wall_post_view($message));
}
if ($morelink && $touseraccount['wallposts'] > count($usermessages)) {
$themeclass->message_item(qa_wall_view_more_link($tohandle, count($usermessages)));
}
}
示例15: or
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
More about this license: http://www.question2answer.org/license.php
*/
if (!defined('QA_VERSION')) {
// don't allow this page to be requested directly from browser
header('Location: ../');
exit;
}
// report that we entered this page
qa_report_event('page_enter', qa_get_logged_in_userid(), qa_get_logged_in_handle(), qa_cookie_get(), array('params' => $_SERVER['QUERY_STRING'], 'path' => $_SERVER['SCRIPT_NAME']));
require_once QA_INCLUDE_DIR . 'qa-db-selects.php';
require_once QA_INCLUDE_DIR . 'qa-app-format.php';
// Get popular tags
$populartags = qa_db_select_with_pending(qa_db_popular_tags_selectspec($qa_start));
$tagcount = qa_opt('cache_tagcount');
$pagesize = qa_opt('page_size_tags');
// Prepare content for theme
$qa_content = qa_content_prepare();
$qa_content['title'] = qa_lang_html('main/popular_tags');
$qa_content['ranking'] = array('items' => array(), 'rows' => ceil($pagesize / qa_opt('columns_tags')), 'type' => 'tags');
if (count($populartags)) {
$output = 0;
foreach ($populartags as $word => $count) {
$qa_content['ranking']['items'][] = array('label' => qa_tag_html($word), 'count' => number_format($count));
if (++$output >= $pagesize) {