本文整理汇总了PHP中UserGroup::get_info方法的典型用法代码示例。如果您正苦于以下问题:PHP UserGroup::get_info方法的具体用法?PHP UserGroup::get_info怎么用?PHP UserGroup::get_info使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserGroup
的用法示例。
在下文中一共展示了UserGroup::get_info方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: load_groupcp
function load_groupcp()
{
global $mybb, $db, $cache, $templates, $title, $header, $headerinclude, $footer, $theme, $group;
if ($mybb->settings['rpgsuite_groupmanagecp'] && $mybb->input['action'] == "managegroup") {
// Get group id
if ($mybb->input['gid'] && $mybb->usergroup['issupermod']) {
$gid = intval($mybb->input['gid']);
$groupnav = '&gid=' . $gid;
} else {
$gid = $mybb->user['displaygroup'];
$groupnav = '';
}
$cpcontent = "";
if ($mybb->settings['rpgsuite_groupranks_custom']) {
$customranklink = '<a href="modcp.php?action=managegroup§ion=customranks' . $groupnav . '">Manage Custom Ranks</a>';
} else {
$customranklink = '';
}
$usergroup = new UserGroup($mybb, $db, $cache);
if ($usergroup->initialize($gid)) {
$group = $usergroup->get_info();
if (handle_form($usergroup)) {
$url = "modcp.php?action=managegroup&gid=" . $gid;
if ($mybb->input['section']) {
$url .= "§ion=" . $mybb->input['section'];
}
redirect($url, "Your pack settings were successfully updated.");
}
if ($mybb->input['section'] == 'groupoptions') {
$title = 'Manage Options';
add_breadcrumb('Manage Options');
$cpcontent = load_groupmod_options($usergroup);
} else {
if ($mybb->input['section'] == 'groupmembers') {
$title = 'Manage Members';
add_breadcrumb('Manage Members');
$cpcontent = load_groupmod_members($usergroup);
} else {
if ($mybb->input['section'] == 'customranks' && $mybb->settings['rpgsuite_groupranks_custom']) {
$ttile = 'Manage Custom Ranks';
add_breadcrumb('Manage Custom Ranks');
$cpcontent = load_groupmod_customranks($usergroup);
} else {
$title = 'Manage Ranks';
add_breadcrumb('Manage Ranks');
$cpcontent = load_groupmod_ranks($usergroup);
}
}
}
// Add group styling
eval("\$headerinclude .= \"" . $templates->get('rpgmisc_groupstyle') . "\";");
} else {
$cpcontent = "Invalid Group";
}
eval("\$groupmanagecp = \"" . $templates->get('rpggroupmanagecp_full') . "\";");
output_page($groupmanagecp);
exit;
}
}
示例2: rankview_bit
function rankview_bit($gid)
{
global $db, $mybb, $cache;
$usergroup = new UserGroup($mybb, $db, $cache);
if ($usergroup->initialize($gid)) {
$group = $usergroup->get_info();
if ($group['hasranks']) {
return "Viewing <a href='index.php?action=showranks&gid=" . $gid . "'>" . $group['title'] . " Ranks</a>";
} else {
return "Viewing <a href='index.php?action=showranks&gid=" . $gid . "'>" . $group['title'] . " Members</a>";
}
} else {
return "Viewing <a href='index.php?action=showranks'>Group Members</a>";
}
}
示例3: viewranks_init
function viewranks_init()
{
global $mybb, $db, $cache, $templates, $header, $footer, $headerinclude, $title, $theme, $parser;
if ($mybb->settings['rpgsuite_groupranks'] && $mybb->input['action'] == "showranks") {
// Get group id
if ($mybb->input['gid'] != '') {
$gid = intval($mybb->input['gid']);
} else {
$gid = $mybb->user['displaygroup'];
}
$usergroup = new UserGroup($mybb, $db, $cache);
if ($usergroup->initialize($gid)) {
$group = $usergroup->get_info();
// Add Group Styling
eval("\$headerinclude .= \"" . $templates->get('rpgmisc_groupstyle') . "\";");
if ($group['hasranks']) {
$title = $group['title'] . " Ranks";
if ($group['fid']) {
add_breadcrumb($group['title'] . ' Forum', 'forumdisplay.php?fid=' . (int) $group['fid']);
}
add_breadcrumb($group['title'] . ' Ranks');
$tierlist = build_ranks($usergroup);
$unrankedlist = build_unranked($usergroup);
eval("\$rankpage = \"" . $templates->get('rpggroupview_ranks_full') . "\";");
output_page($rankpage);
} else {
$title = $group['title'] . " Members";
if ($group['fid']) {
add_breadcrumb($group['title'] . ' Forum', 'forumdisplay.php?fid=' . (int) $group['fid']);
}
add_breadcrumb($group['title'] . ' Members');
// set up the pager
$multipage = setup_viewgroup_pages($group['gid'], $usergroup->get_member_count(), $start);
$memberlist = build_members($usergroup, $start);
eval("\$memberpage = \"" . $templates->get('rpggroupview_noranks_full') . "\";");
output_page($memberpage);
}
exit;
}
}
}
示例4: die
<?php
// Disallow direct access to this file for security reasons
if (!defined("IN_MYBB")) {
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}
require_once MYBB_ROOT . "/inc/plugins/rpg_suite/models/class_UserGroup.php";
require_once MYBB_ROOT . "/inc/plugins/rpg_suite/models/class_RPGSuite.php";
$plugins->run_hooks("admin_rpgsuite_group_begin");
$page->add_breadcrumb_item('Manage Packs', 'index.php?module=rpgsuite-groups');
// Ensure we have a valid group id
$usergroup = new UserGroup($mybb, $db, $cache);
if ($usergroup->initialize((int) $mybb->input['gid'])) {
$group = $usergroup->get_info();
$page->add_breadcrumb_item('Pack: ' . $group['title']);
// Play with group settings! :)
$sub_tabs['settings'] = array('title' => "Settings", 'link' => "index.php?module=rpgsuite-group&action=settings&gid=" . $group['gid'], 'description' => 'Group settings');
$sub_tabs['members'] = array('title' => "Manage Pack Members", 'link' => "index.php?module=rpgsuite-group&action=members&gid=" . $group['gid'], 'description' => "The group's current members");
$sub_tabs['ranks'] = array('title' => "Custom Ranks", 'link' => "index.php?module=rpgsuite-group&action=ranks&gid=" . $group['gid'], 'description' => "The group's custom ranks (can be set even if disallowed, only by admin)");
$sub_tabs['disband'] = array('title' => "Disband Pack", 'link' => "index.php?module=rpgsuite-group&action=disband&gid=" . $group['gid'], 'description' => "Disband this group");
$sub_tabs['relocate'] = array('title' => "Relocate Pack", 'link' => "index.php?module=rpgsuite-group&action=relocate&gid=" . $group['gid'], 'description' => "Relocate to another territory.");
// define this variable so our forms get updated
$ranktable = $usergroup->get_ranks(1);
// FIRST let's handle any submits....
if ($mybb->request_method == "post") {
if ($mybb->input['action'] == 'relocate') {
$settings = array('title' => $db->escape_string($mybb->input['title']), 'region' => $db->escape_string($mybb->input['region']), 'prefix' => $db->escape_string($mybb->input['prefix']));
$usergroup->relocate($settings);
flash_message("Group Relocated", "success");
admin_redirect("index.php?module=rpgsuite-group&action=settings&gid=" . $group['gid']);
} else {