本文整理汇总了PHP中get_profile_link函数的典型用法代码示例。如果您正苦于以下问题:PHP get_profile_link函数的具体用法?PHP get_profile_link怎么用?PHP get_profile_link使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_profile_link函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: trader_give_rep
function trader_give_rep($uid = 1)
{
global $mybb, $db, $tradefeedbackform, $mypostkey, $templates, $header, $headerinclude, $footer, $lang;
$lang->load("tradefeedback");
$uid = intval($uid);
$action = "give";
if ($mybb->user['uid'] == $uid) {
error($lang->feedback_give_self);
}
if (!$uid) {
error($lang->feedback_invalid_user);
}
if ($mybb->request_method == "post" && verify_post_check($mybb->input['my_post_key'])) {
// Make sure they haven't given the same user feedback within the last 24 hours
$cutoff = TIME_NOW - 86400;
$queryfirst = $db->simple_select("trade_feedback", "fid", "dateline >= {$cutoff} AND receiver={$uid} & giver=" . $mybb->user['uid']);
if ($db->num_rows($queryfirst) >= 1) {
error($lang->feedback_wait_24);
}
$new_rep = array("giver" => $mybb->user['uid'], "receiver" => $uid, "dateline" => TIME_NOW, "approved" => 1, "value" => intval($mybb->input['value']), "type" => $db->escape_string($mybb->input['type']), "threadlink" => $db->escape_string($mybb->input['threadlink']), "comments" => $db->escape_string($mybb->input['comments']));
if ($mybb->settings['trade_approval'] == 1 && $mybb->usergroup['canmodcp'] == 0) {
$new_rep['approved'] = 0;
}
$db->insert_query("trade_feedback", $new_rep);
$fid = $db->insert_id();
trader_send_pm($new_rep['receiver'], $fid);
trader_myalerts($new_rep['receiver'], $fid);
if ($new_rep['approved'] == 1) {
trader_rebuild_reputation($uid);
$message = $lang->give_feedback_added;
} else {
$message = $lang->give_feedback_approval_needed;
}
$url = $mybb->settings['bburl'] . "/tradefeedback.php?action=view&uid={$uid}";
redirect($url, $message, "", true);
} else {
// Check if we have a thread id
$tid = intval($mybb->input['tid']);
if ($tid) {
$threadlink_value = $mybb->settings['bburl'] . "/" . get_thread_link($tid);
$query = $db->simple_select("threads", "subject", "tid={$tid}");
$thread_subject = $db->fetch_field($query, "subject");
$breadcrumb = $lang->sprintf($lang->give_feedback_fromthread_breadcrumb, $thread_subject);
} else {
$threadlink_value = "";
}
// Get the member username for confirmation
$query = $db->simple_select("users", "uid, username", "uid={$uid}");
$member = $db->fetch_array($query);
$member['username'] = htmlspecialchars_uni($member['username']);
add_breadcrumb($lang->sprintf($lang->feedback_profile, $member['username']), get_profile_link($uid));
add_breadcrumb($lang->sprintf($lang->feedback_page_title, $member['username']), "tradefeedback.php?action=view&uid={$uid}");
add_breadcrumb($lang->give_feedback . $breadcrumb, "tradefeedback.php?action=give&uid={$uid}");
$feedback = array('comments' => htmlspecialchars_uni($mybb->input['comments']));
eval("\$tradefeedbackform = \"" . $templates->get("tradefeedback_give_form") . "\";");
output_page($tradefeedbackform);
}
}
开发者ID:jnschrag,项目名称:Trade-Feedback,代码行数:58,代码来源:tradefeedback.php
示例2: parse_alert
function parse_alert(MybbStuff_MyAlerts_Entity_Alert $alertToParse)
{
global $mybb, $lang, $plugins;
if (!isset($lang->myalerts)) {
$lang->load('myalerts');
}
/** @var MybbStuff_MyAlerts_Formatter_AbstractFormatter $formatter */
$formatter = MybbStuff_MyAlerts_AlertFormatterManager::getInstance()->getFormatterForAlertType($alertToParse->getType()->getCode());
$outputAlert = array();
if ($formatter != null) {
$plugins->run_hooks('myalerts_alerts_output_start', $alert);
$formatter->init();
$fromUser = $alertToParse->getFromUser();
$maxDimensions = str_replace('|', 'x', $mybb->settings['myalerts_avatar_size']);
$outputAlert['avatar'] = format_avatar($fromUser['avatar'], $mybb->settings['myalerts_avatar_size'], $maxDimensions);
$outputAlert['avatar']['image'] = htmlspecialchars_uni($outputAlert['avatar']['image']);
$outputAlert['id'] = $alertToParse->getId();
$outputAlert['username'] = htmlspecialchars_uni($fromUser['username']);
$outputAlert['from_user'] = format_name(htmlspecialchars_uni($fromUser['username']), $fromUser['usergroup'], $fromUser['displaygroup']);
$outputAlert['from_user_raw_profilelink'] = get_profile_link((int) $fromUser['uid']);
// htmlspecialchars_uni done by get_profile_link
$outputAlert['from_user_profilelink'] = build_profile_link($outputAlert['from_user'], $fromUser['uid']);
$outputAlert['alert_status'] = ' alert--read';
if ($alertToParse->getUnread()) {
$outputAlert['alert_status'] = ' alert--unread';
}
$outputAlert['message'] = $formatter->formatAlert($alertToParse, $outputAlert);
$outputAlert['alert_code'] = $alertToParse->getType()->getCode();
$outputAlert['received_at'] = htmlspecialchars_uni(my_date($mybb->settings['dateformat'], $alertToParse->getCreatedAt()->getTimestamp()));
$plugins->run_hooks('myalerts_alerts_output_end', $alert);
}
return $outputAlert;
}
开发者ID:harrygg,项目名称:MyAlerts,代码行数:33,代码来源:myalerts.php
示例3: my_mail
}
if (count($errors) == 0) {
if ($mybb->settings['mail_handler'] == 'smtp') {
$from = $mybb->input['fromemail'];
} else {
$from = "{$mybb->input['fromname']} <{$mybb->input['fromemail']}>";
}
$message = $lang->sprintf($lang->email_emailuser, $to_user['username'], $mybb->input['fromname'], $mybb->settings['bbname'], $mybb->settings['bburl'], $mybb->get_input('message'));
my_mail($to_user['email'], $mybb->get_input('subject'), $message, $from, "", "", false, "text", "", $mybb->input['fromemail']);
if ($mybb->settings['mail_logging'] > 0) {
// Log the message
$log_entry = array("subject" => $db->escape_string($mybb->get_input('subject')), "message" => $db->escape_string($mybb->get_input('message')), "dateline" => TIME_NOW, "fromuid" => $mybb->user['uid'], "fromemail" => $db->escape_string($mybb->input['fromemail']), "touid" => $to_user['uid'], "toemail" => $db->escape_string($to_user['email']), "tid" => 0, "ipaddress" => $db->escape_binary($session->packedip), "type" => 1);
$db->insert_query("maillogs", $log_entry);
}
$plugins->run_hooks("member_do_emailuser_end");
redirect(get_profile_link($to_user['uid']), $lang->redirect_emailsent);
} else {
$mybb->input['action'] = "emailuser";
}
}
if ($mybb->input['action'] == "emailuser") {
$plugins->run_hooks("member_emailuser_start");
// Guests or those without permission can't email other users
if ($mybb->usergroup['cansendemail'] == 0) {
error_no_permission();
}
// Check group limits
if ($mybb->usergroup['maxemails'] > 0) {
if ($mybb->user['uid'] > 0) {
$user_check = "fromuid='{$mybb->user['uid']}'";
} else {
开发者ID:nicopinto,项目名称:fantasitura.com,代码行数:31,代码来源:member.php
示例4: array
$doneusers = array();
$query = $db->query("\r\n\t\t\tSELECT s.ip, s.uid, s.time, u.username, u.invisible, u.usergroup, u.displaygroup\r\n\t\t\tFROM " . TABLE_PREFIX . "sessions s\r\n\t\t\tLEFT JOIN " . TABLE_PREFIX . "users u ON (s.uid=u.uid)\r\n\t\t\tWHERE s.time > '{$timecut}' AND location2='{$tid}' AND nopermission != 1\r\n\t\t\tORDER BY u.username ASC, s.time DESC\r\n\t\t");
while ($user = $db->fetch_array($query)) {
if ($user['uid'] == 0) {
++$guestcount;
} else {
if (empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time']) {
++$membercount;
$doneusers[$user['uid']] = $user['time'];
$invisiblemark = '';
if ($user['invisible'] == 1) {
$invisiblemark = "*";
++$inviscount;
}
if ($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid']) {
$user['profilelink'] = get_profile_link($user['uid']);
$user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
$user['reading'] = my_date($mybb->settings['timeformat'], $user['time']);
eval("\$onlinemembers .= \"" . $templates->get("showthread_usersbrowsing_user", 1, 0) . "\";");
$comma = $lang->comma;
}
}
}
}
$guestsonline = '';
if ($guestcount) {
$guestsonline = $lang->sprintf($lang->users_browsing_thread_guests, $guestcount);
}
$onlinesep = '';
if ($guestcount && $onlinemembers) {
$onlinesep = $lang->comma;
开发者ID:ThinhNguyenVB,项目名称:Gradient-Studios-Website,代码行数:31,代码来源:showthread.php
示例5: get_box_func
function get_box_func($xmlrpc_params)
{
global $db, $lang, $theme, $plugins, $mybb, $session, $settings, $cache, $time, $mybbgroups;
$input = Tapatalk_Input::filterXmlInput(array('box_id' => Tapatalk_Input::INT, 'start_num' => Tapatalk_Input::INT, 'last_num' => Tapatalk_Input::INT), $xmlrpc_params);
list($start, $limit) = process_page($input['start_num'], $input['last_num']);
$lang->load("private");
$parser = new postParser();
if ($mybb->settings['enablepms'] == 0) {
return xmlrespfalse($lang->pms_disabled);
}
if ($mybb->user['uid'] == '/' || $mybb->user['uid'] == 0 || $mybb->usergroup['canusepms'] == 0) {
return tt_no_permission();
}
if (!$mybb->user['pmfolders']) {
$mybb->user['pmfolders'] = "1**\$%%\$2**\$%%\$3**\$%%\$4**";
$sql_array = array("pmfolders" => $mybb->user['pmfolders']);
$db->update_query("users", $sql_array, "uid = " . $mybb->user['uid']);
}
$rand = my_rand(0, 9);
if ($rand == 5) {
update_pm_count();
}
$foldernames = array();
$foldersexploded = explode("\$%%\$", $mybb->user['pmfolders']);
foreach ($foldersexploded as $key => $folders) {
$folderinfo = explode("**", $folders, 2);
$folderinfo[1] = get_pm_folder_name($folderinfo[0], $folderinfo[1]);
$foldernames[$folderinfo[0]] = $folderinfo[1];
}
if (!$input['box_id'] || !array_key_exists($input['box_id'], $foldernames)) {
$input['box_id'] = 1;
}
$folder = $input['box_id'];
$foldername = $foldernames[$folder];
$lang->pms_in_folder = $lang->sprintf($lang->pms_in_folder, $foldername);
if ($folder == 2 || $folder == 3) {
$sender = $lang->sentto;
} else {
$sender = $lang->sender;
}
// Do Multi Pages
$query = $db->simple_select("privatemessages", "COUNT(*) AS total", "uid='" . $mybb->user['uid'] . "' AND folder='{$folder}'");
$count_total = $db->fetch_field($query, 'total');
$query = $db->simple_select("privatemessages", "COUNT(*) AS unread", "uid='" . $mybb->user['uid'] . "' AND folder='{$folder}' AND readtime = 0");
$count_unread = $db->fetch_field($query, 'unread');
// Get all recipients into an array
$cached_users = $get_users = array();
$users_query = $db->simple_select("privatemessages", "recipients", "folder='{$folder}' AND uid='{$mybb->user['uid']}'", array('limit_start' => $start, 'limit' => $limit, 'order_by' => 'dateline', 'order_dir' => 'DESC'));
while ($row = $db->fetch_array($users_query)) {
$recipients = unserialize($row['recipients']);
if (is_array($recipients['to']) && count($recipients['to'])) {
$get_users = array_merge($get_users, $recipients['to']);
}
if (is_array($recipients['bcc']) && count($recipients['bcc'])) {
$get_users = array_merge($get_users, $recipients['bcc']);
}
}
$get_users = implode(',', array_unique($get_users));
// Grab info
if ($get_users) {
$users_query = $db->simple_select("users", "uid, username, usergroup, displaygroup", "uid IN ({$get_users})");
while ($user = $db->fetch_array($users_query)) {
$cached_users[$user['uid']] = $user;
}
}
$user_online = $folder == 1 ? ', fu.lastactive, fu.invisible, fu.lastvisit ' : ', tu.lastactive, tu.invisible, tu.lastvisit ';
$query = $db->query("\n\t\tSELECT pm.*, fu.username AS fromusername, tu.username as tousername, fu.avatar as favatar, tu.avatar as tavatar {$user_online}\n\t\tFROM " . TABLE_PREFIX . "privatemessages pm\n\t\tLEFT JOIN " . TABLE_PREFIX . "users fu ON (fu.uid=pm.fromid)\n\t\tLEFT JOIN " . TABLE_PREFIX . "users tu ON (tu.uid=pm.toid)\n\t\tWHERE pm.folder='{$folder}' AND pm.uid='" . $mybb->user['uid'] . "'\n\t\tORDER BY pm.dateline DESC\n\t\tLIMIT {$start}, {$limit}\n\t");
$message_list = array();
if ($db->num_rows($query) > 0) {
while ($message = $db->fetch_array($query)) {
$status = 1;
if ($message['status'] == 0) {
$msgalt = $lang->new_pm;
} elseif ($message['status'] == 1) {
$msgalt = $lang->old_pm;
$status = 2;
} elseif ($message['status'] == 3) {
$msgalt = $lang->reply_pm;
$status = 3;
} elseif ($message['status'] == 4) {
$msgalt = $lang->fwd_pm;
$status = 4;
}
$msg_from = null;
$msg_to = array();
$avatar = "";
$outboxdisplayuserid = 0;
// Sent Items or Drafts Folder Check
$recipients = unserialize($message['recipients']);
if (count($recipients['to']) > 1 || count($recipients['to']) == 1 && count($recipients['bcc']) > 0) {
foreach ($recipients['to'] as $uid) {
$profilelink = get_profile_link($uid);
$user = $cached_users[$uid];
if (!empty($user['username'])) {
$msg_to[] = new xmlrpcval(array("username" => new xmlrpcval($user['username'], "base64"), "user_id" => new xmlrpcval($uid, "string"), "user_type" => check_return_user_type($user['username'])), "struct");
}
if (($folder == 2 or $folder == 3) && !$outboxdisplayuserid) {
$outboxdisplayuserid = $uid;
}
}
//.........这里部分代码省略.........
开发者ID:dthiago,项目名称:tapatalk-mybb,代码行数:101,代码来源:get_box.php
示例6: build_friendly_wol_location
//.........这里部分代码省略.........
case "editpost":
$location_name = $lang->editing_post;
break;
// forumdisplay.php functions
// forumdisplay.php functions
case "forumdisplay":
if (!empty($forums[$user_activity['fid']])) {
if ($forums_linkto[$user_activity['fid']]) {
$location_name = $lang->sprintf($lang->forum_redirect_to, get_forum_link($user_activity['fid']), $forums[$user_activity['fid']]);
} else {
$location_name = $lang->sprintf($lang->viewing_forum2, get_forum_link($user_activity['fid']), $forums[$user_activity['fid']]);
}
} else {
$location_name = $lang->viewing_forum;
}
break;
// index.php functions
// index.php functions
case "index":
$location_name = $lang->sprintf($lang->viewing_index, $mybb->settings['bbname']);
break;
// managegroup.php functions
// managegroup.php functions
case "managegroup":
$location_name = $lang->managing_group;
break;
// member.php functions
// member.php functions
case "member_activate":
$location_name = $lang->activating_account;
break;
case "member_profile":
if (!empty($usernames[$user_activity['uid']])) {
$location_name = $lang->sprintf($lang->viewing_profile2, get_profile_link($user_activity['uid']), $usernames[$user_activity['uid']]);
} else {
$location_name = $lang->viewing_profile;
}
break;
case "member_register":
$location_name = $lang->registering;
break;
case "member":
case "member_login":
// Guest or member?
if ($mybb->user['uid'] == 0) {
$location_name = $lang->logging_in;
} else {
$location_name = $lang->logging_in_plain;
}
break;
case "member_logout":
$location_name = $lang->logging_out;
break;
case "member_emailuser":
$location_name = $lang->emailing_user;
break;
case "member_rate":
$location_name = $lang->rating_user;
break;
case "member_resendactivation":
$location_name = $lang->member_resendactivation;
break;
case "member_lostpw":
$location_name = $lang->member_lostpw;
break;
// memberlist.php functions
开发者ID:olada,项目名称:mybbintegrator,代码行数:67,代码来源:functions_online.php
示例7: build_users_view
//.........这里部分代码省略.........
case "warninglevel":
$view['sortby'] = "warningpoints";
break;
default:
$view['sortby'] = "username";
}
if ($view['sortorder'] != "desc") {
$view['sortorder'] = "asc";
}
$usergroups = $cache->read("usergroups");
// Fetch matching users
$query = $db->query("\n\t\t\tSELECT u.*\n\t\t\tFROM " . TABLE_PREFIX . "users u\n\t\t\tWHERE {$search_sql}\n\t\t\tORDER BY {$view['sortby']} {$view['sortorder']}\n\t\t\tLIMIT {$start}, {$view['perpage']}\n\t\t");
$users = '';
while ($user = $db->fetch_array($query)) {
$comma = $groups_list = '';
$user['view']['username'] = "<a href=\"index.php?module=user-users&action=edit&uid={$user['uid']}\">" . format_name($user['username'], $user['usergroup'], $user['displaygroup']) . "</a>";
$user['view']['usergroup'] = htmlspecialchars_uni($usergroups[$user['usergroup']]['title']);
if ($user['additionalgroups']) {
$additional_groups = explode(",", $user['additionalgroups']);
foreach ($additional_groups as $group) {
$groups_list .= $comma . htmlspecialchars_uni($usergroups[$group]['title']);
$comma = $lang->comma;
}
}
if (!$groups_list) {
$groups_list = $lang->none;
}
$user['view']['additionalgroups'] = "<small>{$groups_list}</small>";
$user['view']['email'] = "<a href=\"mailto:" . htmlspecialchars_uni($user['email']) . "\">" . htmlspecialchars_uni($user['email']) . "</a>";
$user['view']['regdate'] = my_date('relative', $user['regdate']);
$user['view']['lastactive'] = my_date('relative', $user['lastactive']);
// Build popup menu
$popup = new PopupMenu("user_{$user['uid']}", $lang->options);
$popup->add_item($lang->view_profile, $mybb->settings['bburl'] . '/' . get_profile_link($user['uid']));
$popup->add_item($lang->edit_profile_and_settings, "index.php?module=user-users&action=edit&uid={$user['uid']}");
// Banning options... is this user banned?
if ($usergroups[$user['usergroup']]['isbannedgroup'] == 1) {
// Yes, so do we want to edit the ban or pardon his crime?
$popup->add_item($lang->edit_ban, "index.php?module=user-banning&uid={$user['uid']}#username");
$popup->add_item($lang->lift_ban, "index.php?module=user-banning&action=lift&uid={$user['uid']}&my_post_key={$mybb->post_code}");
} else {
// Not banned... but soon maybe!
$popup->add_item($lang->ban_user, "index.php?module=user-banning&uid={$user['uid']}#username");
}
if ($user['usergroup'] == 5) {
if ($user['coppauser']) {
$popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
} else {
$popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
}
}
$popup->add_item($lang->delete_user, "index.php?module=user-users&action=delete&uid={$user['uid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->user_deletion_confirmation}')");
$popup->add_item($lang->show_referred_users, "index.php?module=user-users&action=referrers&uid={$user['uid']}");
$popup->add_item($lang->show_ip_addresses, "index.php?module=user-users&action=ipaddresses&uid={$user['uid']}");
$popup->add_item($lang->show_attachments, "index.php?module=forum-attachments&results=1&username=" . urlencode(htmlspecialchars_uni($user['username'])));
$user['view']['controls'] = $popup->fetch();
// Fetch the reputation for this user
if ($usergroups[$user['usergroup']]['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) {
$user['view']['reputation'] = get_reputation($user['reputation']);
} else {
$reputation = "-";
}
if ($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0) {
if ($mybb->settings['maxwarningpoints'] < 1) {
$mybb->settings['maxwarningpoints'] = 10;
}
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:67,代码来源:users.php
示例8: build_forumbits
//.........这里部分代码省略.........
}
// Forum is a category, set template type
if ($forum['type'] == 'c') {
$forumcat = '_cat';
} else {
$forumcat = '_forum';
}
if ($forum['linkto'] == '') {
// No posts have been made in this forum - show never text
if (($lastpost_data['lastpost'] == 0 || $lastpost_data['lastposter'] == '') && $hideinfo != true) {
$lastpost = "<div style=\"text-align: center;\">{$lang->lastpost_never}</div>";
} elseif ($hideinfo != true) {
// Format lastpost date and time
$lastpost_date = my_date($mybb->settings['dateformat'], $lastpost_data['lastpost']);
$lastpost_time = my_date($mybb->settings['timeformat'], $lastpost_data['lastpost']);
// Set up the last poster, last post thread id, last post subject and format appropriately
$lastpost_profilelink = build_profile_link($lastpost_data['lastposter'], $lastpost_data['lastposteruid']);
$lastpost_link = get_thread_link($lastpost_data['lastposttid'], 0, "lastpost");
$lastpost_subject = $full_lastpost_subject = $parser->parse_badwords($lastpost_data['lastpostsubject']);
if (my_strlen($lastpost_subject) > 25) {
$lastpost_subject = my_substr($lastpost_subject, 0, 25) . "...";
}
$lastpost_subject = htmlspecialchars_uni($lastpost_subject);
$full_lastpost_subject = htmlspecialchars_uni($full_lastpost_subject);
// Call lastpost template
if ($depth != 1) {
eval("\$lastpost = \"" . $templates->get("forumbit_depth{$depth}_forum_lastpost") . "\";");
}
}
if ($mybb->settings['showforumviewing'] != 0 && $forum['viewers'] > 0) {
if ($forum['viewers'] == 1) {
$forum_viewers_text = $lang->viewing_one;
} else {
$forum_viewers_text = $lang->sprintf($lang->viewing_multiple, $forum['viewers']);
}
$forum_viewers_text_plain = $forum_viewers_text;
$forum_viewers_text = "<span class=\"smalltext\">{$forum_viewers_text}</span>";
}
}
// If this forum is a link or is password protected and the user isn't authenticated, set lastpost and counters to "-"
if ($forum['linkto'] != '' || $hideinfo == true) {
$lastpost = "<div style=\"text-align: center;\">-</div>";
$posts = "-";
$threads = "-";
} else {
$posts = my_number_format($forum['posts']);
$threads = my_number_format($forum['threads']);
}
// Moderator column is not off
if ($mybb->settings['modlist'] != 0) {
$done_moderators = array();
$moderators = '';
// Fetch list of moderators from this forum and its parents
$parentlistexploded = explode(',', $forum['parentlist']);
foreach ($parentlistexploded as $mfid) {
// This forum has moderators
if (is_array($moderatorcache[$mfid])) {
// Fetch each moderator from the cache and format it, appending it to the list
foreach ($moderatorcache[$mfid] as $moderator) {
if (in_array($moderator['uid'], $done_moderators)) {
continue;
}
$moderators .= "{$comma}<a href=\"" . get_profile_link($moderator['uid']) . "\">" . htmlspecialchars_uni($moderator['username']) . "</a>";
$comma = ', ';
$done_moderators[] = $moderator['uid'];
}
}
}
$comma = '';
// If we have a moderators list, load the template
if ($moderators) {
eval("\$modlist = \"" . $templates->get("forumbit_moderators") . "\";");
} else {
$modlist = '';
}
}
// Descriptions aren't being shown - blank them
if ($mybb->settings['showdescriptions'] == 0) {
$forum['description'] = '';
}
// Check if this category is either expanded or collapsed and hide it as necessary.
$expdisplay = '';
$collapsed_name = "cat_{$forum['fid']}_c";
if (isset($collapsed[$collapsed_name]) && $collapsed[$collapsed_name] == "display: show;") {
$expcolimage = "collapse_collapsed.gif";
$expdisplay = "display: none;";
$expaltext = "[+]";
} else {
$expcolimage = "collapse.gif";
$expaltext = "[-]";
}
// Swap over the alternate backgrounds
$bgcolor = alt_trow();
// Add the forum to the list
eval("\$forum_list .= \"" . $templates->get("forumbit_depth{$depth}{$forumcat}") . "\";");
}
}
// Return an array of information to the parent forum including child forums list, counters and lastpost information
return array("forum_list" => $forum_list, "counters" => $parent_counters, "lastpost" => $parent_lastpost);
}
开发者ID:benn0034,项目名称:SHIELDsite2.old,代码行数:101,代码来源:functions_forumlist.php
示例9: foreach
if (is_array($moderatorcache[$mfid])) {
// Fetch each moderator from the cache and format it, appending it to the list
foreach ($moderatorcache[$mfid] as $modtype) {
foreach ($modtype as $moderator) {
if ($moderator['isgroup']) {
if (in_array($moderator['id'], $done_moderators['groups'])) {
continue;
}
$moderator['title'] = htmlspecialchars_uni($moderator['title']);
eval("\$moderators .= \"" . $templates->get("forumbit_moderators_group", 1, 0) . "\";");
$done_moderators['groups'][] = $moderator['id'];
} else {
if (in_array($moderator['id'], $done_moderators['users'])) {
continue;
}
$moderator['profilelink'] = get_profile_link($moderator['id']);
$moderator['username'] = format_name(htmlspecialchars_uni($moderator['username']), $moderator['usergroup'], $moderator['displaygroup']);
eval("\$moderators .= \"" . $templates->get("forumbit_moderators_user", 1, 0) . "\";");
$done_moderators['users'][] = $moderator['id'];
}
$comma = $lang->comma;
}
}
}
if (!empty($forum_stats[$mfid]['announcements'])) {
$has_announcements = true;
}
}
$comma = '';
// If we have a moderators list, load the template
if ($moderators) {
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,代码来源:forumdisplay.php
示例10: build_comment_link
/**
* This will try to guess the exact page on which the comment identified by $cid exists.
* @param int $cid The comment ID
* @param boolean $href whether or not to surround the link with an anchor
* @param string $link_name if $href is enabled, enter the link name that will be displayed between the anchor opening and closing tags
* @param string $other_params if you wish to include some other parameters such as target="_blank", do that here, include a space at the beginning
* @return string the comment link, or an empty string if no comment has been found
*/
public function build_comment_link($cid, $href = false, $link_name = "", $other_params = "")
{
global $db, $settings, $mybb;
$cid = (int) $cid;
//SELECT a.*, (select count(*) from `mybb_myprofilecomments` b where a.cid >= b.cid) as cnt FROM `mybb_myprofilecomments` a WHERE a.cid='2'
$query = $db->query("SELECT a.*, (SELECT COUNT(*) FROM " . TABLE_PREFIX . "myprofilecomments b WHERE a.cid <= b.cid) AS rownum FROM " . TABLE_PREFIX . "myprofilecomments a WHERE a.cid='{$cid}'");
if ($db->num_rows($query) != 1) {
return "";
}
$comment = $db->fetch_array($query);
$user = get_user($comment["userid"]);
$page = ceil($comment["rownum"] / $settings["mpcommentsperpage"]);
$profile_link = "{$mybb->settings['bburl']}/" . get_profile_link($user["uid"]);
if ($settings["mpcommentsajaxenabled"]) {
$complement = "#comments/" . $page . "/highlight/" . $cid;
} else {
$complement = "&page={$page}&highlight={$cid}";
}
$profile_link .= $complement;
if ($href) {
$profile_link = "<a href=\"{$profile_link}\"{$other_params}>{$link_name}</a>";
}
return $profile_link;
}
开发者ID:medbenji,项目名称:MyProfile,代码行数:32,代码来源:myprofilecomments.class.php
示例11: ougc_awards_profile
function ougc_awards_profile()
{
global $mybb, $memprofile, $templates;
$memprofile['ougc_awards'] = '';
$limit = (int) $mybb->settings['ougc_awards_profile'];
$limit = $limit > 100 ? 100 : ($limit < 1 && $limit != -1 ? 1 : $limit);
if ($limit < 0 && $limit != -1 || my_strpos($templates->cache['member_profile'], '{$memprofile[\'ougc_awards\']}') === false) {
return;
}
global $db, $lang, $theme, $templates, $awards;
$awards->lang_load();
$awards->set_url(null, get_profile_link($memprofile['uid']));
// Query our data.
if ($limit == -1) {
// Get awards
$query = $db->query('
SELECT u.*, a.*
FROM ' . TABLE_PREFIX . 'ougc_awards_users u
LEFT JOIN ' . TABLE_PREFIX . 'ougc_awards a ON (u.aid=a.aid)
WHERE u.uid=\'' . (int) $memprofile['uid'] . '\' AND a.visible=\'1\'
ORDER BY u.date desc');
} else {
// First we need to figure out the total amount of awards.
$query = $db->query('
SELECT COUNT(au.aid) AS awards
FROM ' . TABLE_PREFIX . 'ougc_awards_users au
LEFT JOIN ' . TABLE_PREFIX . 'ougc_awards a ON (au.aid=a.aid)
WHERE au.uid=\'' . (int) $memprofile['uid'] . '\' AND a.visible=\'1\'
ORDER BY au.date desc
');
$awardscount = (int) $db->fetch_field($query, 'awards');
$page = (string) $mybb->input['view'] == 'awards' ? (int) $mybb->input['page'] : 0;
if ($page > 0) {
$start = ($page - 1) * $limit;
if ($page > ceil($awardscount / $limit)) {
$start = 0;
$page = 1;
}
} else {
$start = 0;
$page = 1;
}
// We want to keep $mybb->input['view'] intact for other plugins, ;)
$multipage = (string) multipage($awardscount, $limit, $page, $awards->build_url('view=awards'));
eval('$multipage = "' . $templates->get('ougcawards_profile_multipage') . '";');
$query = $db->query('
SELECT au.*, a.*
FROM ' . TABLE_PREFIX . 'ougc_awards_users au
LEFT JOIN ' . TABLE_PREFIX . 'ougc_awards a ON (au.aid=a.aid)
WHERE au.uid=\'' . (int) $memprofile['uid'] . '\' AND a.visible=\'1\'
ORDER BY au.date desc
LIMIT ' . $start . ', ' . $limit);
}
// Output our awards.
if (!$db->num_rows($query)) {
eval('$awardlist = "' . $templates->get('ougcawards_profile_row_empty') . '";');
} else {
$awardlist = '';
while ($award = $db->fetch_array($query)) {
$trow = alt_trow();
if ($name = $awards->get_award_info('name', $award['aid'])) {
$award['name'] = $name;
}
if ($description = $awards->get_award_info('description', $award['aid'])) {
$award['description'] = $description;
}
if ($reason = $awards->get_award_info('reason', $award['aid'], $award['gid'])) {
$award['reason'] = $reason;
}
if (empty($award['reason'])) {
$award['reason'] = $lang->ougc_awards_pm_noreason;
}
$awards->parse_text($award['reason']);
$award['image'] = $awards->get_award_icon($award['aid']);
$award['date'] = $lang->sprintf($lang->ougc_awards_profile_tine, my_date($mybb->settings['dateformat'], $award['date']), my_date($mybb->settings['timeformat'], $award['date']));
eval('$awardlist .= "' . $templates->get('ougcawards_profile_row') . '";');
}
}
$lang->ougc_awards_profile_title = $lang->sprintf($lang->ougc_awards_profile_title, htmlspecialchars_uni($memprofile['username']));
eval('$memprofile[\'ougc_awards\'] = "' . $templates->get('ougcawards_profile') . '";');
}
开发者ID:Ruwan-Ranganath,项目名称:OUGC-Awards,代码行数:81,代码来源:ougc_awards.php
示例12: htmlspecialchars_uni
$information = '';
$logitem['action'] = htmlspecialchars_uni($logitem['action']);
$logitem['dateline'] = date("jS M Y, G:i", $logitem['dateline']);
$trow = alt_trow();
$username = format_name($logitem['username'], $logitem['usergroup'], $logitem['displaygroup']);
$logitem['profilelink'] = build_profile_link($username, $logitem['uid'], "_blank");
if ($logitem['tsubject']) {
$information = "<strong>{$lang->thread}</strong> <a href=\"../" . get_thread_link($logitem['tid']) . "\" target=\"_blank\">" . htmlspecialchars_uni($logitem['tsubject']) . "</a><br />";
}
if ($logitem['fname']) {
$information .= "<strong>{$lang->forum}</strong> <a href=\"../" . get_forum_link($logitem['fid']) . "\" target=\"_blank\">" . htmlspecialchars_uni($logitem['fname']) . "</a><br />";
}
if (!$logitem['tsubject'] || !$logitem['fname']) {
$data = unserialize($logitem['data']);
if ($data['uid']) {
$information = "<strong>{$lang->user_info}</strong> <a href=\"../" . get_profile_link($data['uid']) . "\" target=\"_blank\">" . htmlspecialchars_uni($data['username']) . "</a>";
}
if ($data['aid']) {
$information = "<strong>{$lang->announcement}</strong> <a href=\"../" . get_announcement_link($data['aid']) . "\" target=\"_blank\">" . htmlspecialchars_uni($data['subject']) . "</a>";
}
}
$table->construct_cell($logitem['profilelink']);
$table->construct_cell($logitem['dateline'], array("class" => "align_center"));
$table->construct_cell($logitem['action'], array("class" => "align_center"));
$table->construct_cell($information);
$table->construct_cell($logitem['ipaddress'], array("class" => "align_center"));
$table->construct_row();
}
if ($table->num_rows() == 0) {
$table->construct_cell($lang->no_modlogs, array("colspan" => "5"));
$table->construct_row();
开发者ID:GeorgeLVP,项目名称:mybb,代码行数:31,代码来源:modlog.php
示例13: buildShowLink
/**
* Build a link to an alert's content so that the system can redirect to it.
*
* @param MybbStuff_MyAlerts_Entity_Alert $alert The alert to build the link for.
*
* @return string The built alert, preferably an absolute link.
*/
public function buildShowLink(MybbStuff_MyAlerts_Entity_Alert $alert)
{
return get_profile_link($alert->getFromUserId());
}
开发者ID:EvolSoft,项目名称:Followers-Following-Plugin-for-MyBB,代码行数:11,代码来源:ffplugin_myalertsformatter.php
示例14: gen_profile_link
public function gen_profile_link($text, $uid)
{
return '<a href="' . $this->settings['bburl'] . '/' . get_profile_link($uid) . '">' . $text . '</a>';
}
开发者ID:BladeSA,项目名称:The-Inferno-Shoutbox-of-Din,代码行数:4,代码来源:class_core.php
示例15: get_profile_link
} else {
$table->construct_cell("{$find_to}<div><a href=\"../" . get_profile_link($log['touid']) . "\">{$log['to_username']}</a></div>");
}
} elseif ($log['type'] == 3) {
$table->construct_cell("<img src=\"styles/{$page->style}/images/icons/maillogs_contact.png\" title=\"{$lang->email_sent_using_contact_form}\" alt=\"\" />", array("width" => 1));
$table->construct_cell("<a href=\"javascript:MyBB.popupWindow('index.php?module=tools-maillogs&action=view&mid={$log['mid']}', null, true);\">{$log['subject']}</a>");
if ($log['fromuid'] > 0) {
$find_from = "<div class=\"float_right\"><a href=\"index.php?module=tools-maillogs&fromuid={$log['fromuid']}\"><img src=\"styles/{$page->style}/images/icons/find.png\" title=\"{$lang->find_emails_by_user}\" alt=\"{$lang->find}\" /></a></div>";
}
if (!$log['from_username'] && $log['fromuid'] > 0) {
$table->construct_cell("{$find_from}<div>{$lang->deleted_user}</div>");
} elseif ($log['fromuid'] == 0) {
$log['fromemail'] = htmlspecialchars_uni($log['fromemail']);
$table->construct_cell("{$find_from}<div>{$log['fromemail']}</div>");
} else {
$table->construct_cell("{$find_from}<div><a href=\"../" . get_profile_link($log['fromuid']) . "\">{$log['from_username']}</a></div>");
}
$log['toemail'] = htmlspecialchars_uni($log['toemail']);
$table->construct_cell($log['toemail']);
}
$table->construct_cell($log['dateline'], array("class" => "align_center"));
$table->construct_cell(my_inet_ntop($db->unescape_binary($log['ipaddress'])), array("class" => "align_center"));
$table->construct_row();
}
if ($table->num_rows() == 0) {
$table->construct_cell($lang->no_logs, array("colspan" => "7"));
$table->construct_row();
$table->output($lang->user_email_log);
} else {
$table->output($lang->user_email_log);
$buttons[] = $form->generate_submit_button($lang->delete_selected, array('onclick' => "return confirm('{$lang->confirm_delete_logs}');"));
开发者ID:mainhan1804,项目名称:xomvanphong,代码行数:31,
|
请发表评论