TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,917
  • Total Topics: 21,308
  • Online today: 884
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 348
  • Total: 348

Roster Page

Started by londonhogfan, May 31, 2006, 06:56:37 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

stigmartyr

Works like a charm bloc.  I lub you man.  My next kid is gonna be named bloc.

IchBin

I think you should go with Bjorn. :D

Techdomain

calling your kid bloc would suck if your last name was head or something!!! :P

stigmartyr

http://black-chapter.com/forums/index.php?page=19

I made an extensive roster system now, with tons of potential secondary member groups.  It works great for putting people in different tables while keeping their Primary Account as is.

This is JUST the tool we needed :)  If there was one last touch it would be to modify what vitals show in their mini-bio.  Locations are less important that their custom titles, for example.

londonhogfan

Thats kinda what Im doing with mine.

I have a main roster for our entire clan.
http://www.the-rota.com/?page=30

Then a "meet the team" style page for each team.

[SRB]
http://www.the-rota.com/?page=48

[STA]
http://www.the-rota.com/?page=49

[MFR]
http://www.the-rota.com/?page=50

Gargoyle

Very nice!! I like the main rooster page a lot. Did you have to double up the code to get that to work?? Just curious how you coded that one is all.. ;D

stigmartyr

Ive reverted to using alot more java menus since the new security features with flash.  Using flash for menus sux now cuz it makes u click to interact with the flash, and then u have to click again to make a choice.

Xara Webstyle rox

stigmartyr

@ BLOC - I have but one more small tweak I need ur help with.

I would like to change what info is displayed about members.  ATM, it shows the following profile tables:

Last seen:
Posts:
Location:
Online Status:
Personal Text:

______________________________


I want to display the following relevant info:

Custom Title:
Primary Member Group:
( because on my TP, members RANKS are their primary member group.  So I want it to display their rank if possible).
KARMA:
Last seen:
Online Status:
Personal Text:



_____________________________


Can you tell me what code to change?  I did at least try to do this on my own before asking, but I wasnt successful.  My php skills are dangerous at best :P

bloc

Sure, no problem...could you post what code you use now - for one membergroup? or is it a straight copy from this topic? In case : which post?

There might be some slight differences. :)

stigmartyr

Ill post the code that I use so you can edit it, because I removed the line that displays all admins on the page.  SO we can start from here (code pasted below) and go from there :)

global $txt, $scripturl, $user_info;
global $context, $modSettings, $ID_MEMBER;
global $board_info, $settings, $db_prefix;

$groupnumber = 49;
$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

$select_columns = "
IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.additionalGroups, mem.ID_MEMBER, mem.memberName,
mem.realName,mem.lastLogin, mem.websiteTitle, mem.websiteUrl, mem.location,   
                        mem.posts,
                        them.value AS teamtext";
$select_tables = "
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
                        LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)";

// Load the member's data.
$request = db_query("
SELECT$select_columns
FROM {$db_prefix}members AS mem$select_tables
WHERE FIND_IN_SET($groupnumber, mem.additionalGroups)
                        ORDER BY mem.memberName ASC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'name' => $row['realName'],
'posts' => $row['posts'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);



}
mysql_free_result($request);



        echo '<table align="center" width="95%" cellpadding="5" cellspacing="5"><tr>
                 <td colspan="4" style="border-bottom: 2px solid #d0d0d0; padding-bottom: 4px; "><h2>DELTA Force</h2>
<span class="smalltext">(DEU SOC) Darknight Expeditionary Unit: Special Operations Capable.</span><br />
</td></tr><tr><td colspan="4"><br /> </td></tr><tr>';
        $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '
<tr><td valign="middle" width="110">'.$team['avatar']['image'].'</td>
<td valign="top" class="middletext" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;"><b>'.$team['link'].'</b></h2>
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br />' , '

' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td></tr>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"></td></tr><tr>';
            }
        }
echo '</tr></table>';

This website is proudly hosted on Crocweb Cloud Website Hosting.