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.

richtofen

#190
can anyone put some kind of tutorial of what we have todo to put this block??

thanks

IchBin

Thats what the original post is.

richtofen

it is only to add one article and put that code in php?

IchBin

Well it won't fit in a block. There's too much info to bunch in a block unless you put it in a center or frontpage block. Simply add a center phpbox block and put the code in. Its that simple really. Don't hesitate to give things a shot. :)

richtofen

ok....when i put my staff mod to work i will try :)

richtofen

i have here the staff mod instaled how can i put the roster mod....i have to copy that code and put it were..can anyone(ichbin) explain??....ehhe...thanks

IchBin

I could perhaps explain how to, but why reinvent the wheel? :)

Everything you need to know is in the first post.
QuoteI entered the following code into an article (php) page to get this.
http://www.the-rota.com/?page=30

richtofen

ok ich and how about the playlist that has in the user profile in the-rota site....do u know here i can find it?

JOSHSKORN

#198
I'm using a modification of JPDeni's code.  I took out a few things.  I couldn't figure out exactly a few things:


  • I want to sort by the profile's Name, not the user's login name.
  • I have a mod called CountryFlags which I'm sure some of you are familiar with.  I'd like to display the user's flag
  • Replace the location field with the Online/Offline marker.
  • Remove the contacts column
  • Add a Games Field, show an avatar for each game the member plays, images displayed horizontally.  For this, I'd like to see about showing an icon if a member has filled out a particular field in their profile.  If the field is blank, I don't want an icon to show.  The custom profile field names are HaloID, Halo2ID and BF2142ID.  We'll say the names of the files are halo.jpg, halo2.jpg and BF2142.jpg.
  • I want to display some text under the entire member's list, which explains each rank.  There is text that contains some underlined and some bolded elements.  This text, specifically:

Quote
The Ranking System
Clan Members: All of our members have RCON. They can moderate the forums, but not delete entire threads. These are full clan members and may be assigned a duty upon request or as needed. Founders of our clan and selected members have been granted additional administrative privileges, but do not hold any higher precedence in any inner-clan discussions.

Recruits: Brand new recruits. New members must serve as a recruit for 30 days prior to becoming a Clan Member. During this time, we observe their commitment to our clan, attitude and teach them a few things.

Inactive Reserve: These are members we have not seen around in a few weeks. This rank is used simply as a marker in determining how many active players we have. Inactive Reservists are not treated as inferior to active members.

Yes I did simply try pasting it under my php code and got errors.

Here is my current code for the article:

global $db_prefix, $scripturl, $txt, $settings, $options;


// These must be in the order you wish them to print out on your roster.
// VERY IMPORTANT!!!! -- they must be exactly the same as the group names in the database, including
// capitalization and spaces.
$rankorder = array(
  'Members',
  'Recruits',
  'Inactive Reserve'
);

$groups = '';
//Does all the real work here for showing groups.
$query = db_query("SELECT ID_GROUP, groupName, onlineColor
  FROM {$db_prefix}membergroups", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{
  $groups[$row['groupName']]  = array(
    'id' => $row['ID_GROUP'],
    'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'],
    'stars' => empty($row['stars']) ? '' : substr($row['stars'],2),
  );
}
mysql_free_result($query);

foreach ($rankorder as $rank)
{
//Now get all the users
  $query2 = db_query("
     SELECT ID_GROUP, ID_MEMBER, realName, emailAddress, hideEmail, lastLogin, location, personalText,
           totalTimeLoggedIn, dateRegistered, ICQ, AIM, YIM, MSN,
           hideEmail, emailAddress
    FROM {$db_prefix}members
    WHERE ID_GROUP = '" . $groups[$rank]['id'] . "'
    ORDER BY realName", __FILE__, __LINE__);

  if(db_affected_rows() != 0)
  {
    echo '<table border="0" cellspacing="1" cellpadding="5" align="center" class="bordercolor">
      <tr><td colspan="7" class="catbg"><font size="4" face="verdana"><b>' . $rank . '</b></font></td></tr>';
      echo '<td class="catinfo" width="270"><b>Member Name</b></td>';
      echo '<td class="catinfo" width="170"><b>Last Online</b></td>';
      echo '<td class="catinfo" width="100"><b>Location</b></td>';
      echo '<td class="catinfo" width="175"><b>Contact</b></td></tr><tr>';
      while ($row2 = mysql_fetch_assoc($query2))
      {
echo '<td class="windowbg" height="40"><a href="' . $scripturl . '?action=profile;u=' . $row2['ID_MEMBER'] . '"><b><font color="' . $groups[$rank]['color'] . '" size="3" face="verdana">' . $row2['realName'] . '</b>';

        echo '<td class="windowbg">' . timeformat($row2['lastLogin']) . '</td>';
        echo '<td class="windowbg2" align="center">';
        echo '<i>' . $row2['location'] . '</i>';
        echo '</td><td class="windowbg">';

//Send email row
        if($row2['hideEmail'] == 0)
          echo '<a href="mailto:', $row2['emailAddress'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';

        if($row2['ICQ'] != '')
          echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $row2['ICQ'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $row2['ICQ'] . '" alt="' . $row2['ICQ'] . '" width="18" height="18" border="0" /></a> ';
        if($row2['AIM'] != '')
          echo '<a href="aim:goim?screenname=' . urlencode(strtr($row2['AIM'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $row2['AIM'] . '" border="0" /></a> ';
        if($row2['YIM'] != '')
          echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row2['YIM']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($row2['YIM']) . '&m=g&t=0" alt="' . $row2['YIM'] . '" border="0" /></a> ';
        if($row2['MSN'] != '')
          echo '<a href="http://members.msn.com/' . $row2['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $row2['MSN'] . '" border="0" /></a> ';

//Send PM row
        echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['ID_MEMBER'] . '"><img src="' . $settings['images_url'] . '/im_on.gif" alt="email" /></a></a>';
        echo '</td>';
        echo '</tr>';
      }
    echo '</table><br>';
  }
}

Bloodlvst

#199
Figured out most of this myself.

This website is proudly hosted on Crocweb Cloud Website Hosting.