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: 350
  • Total: 350

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.

IchBin

You didn't tell me what happened on my last suggestion so I just gave up.

londonhogfan

oh, sorry about that.  When I put in ' . $row2['avatar'] . ' it just shows up blank in the page source.  Page looks the same with or without it.

stigmartyr

iCH IS on the case! ^_^

londonhogfan

Quote from: londonhogfan on June 07, 2006, 10:54:48 PM
oh, sorry about that.  When I put in ' . $row2['avatar'] . ' it just shows up blank in the page source.  Page looks the same with or without it.

well found the problem.  That code is working, just not on my site.  Tried it somewhere else and worked fine.  I have our forum setup to download and resize everyones avatar.  The field in the database is blank.

Any idea on where to pull that resized avatar from?

IchBin

I've been trying to figure it out for a while now londonghogfan. I'm just not quite understanding enough about the database calls and functions to do it. If you want to try something else out you can look at the thread titled "Meet the Team Page" in this board I think and you'll see that Bloc has created it with his own piece of code. It pulls the avatar and everything from the database using an array of sorts.... You can edit his code to suite your needs if you really want to.

scope

Thinks for the pointer here Ichbin..excellent.

I just want to pull the list.  I am having problems removing everything else.  I just want the names to show up, in a column and have a link to their profile like it already does.

scope

Took me an an hour, but I figured it out.  Also added the ability to select an ID to display when you hover over a name, soon to display steamID, as soon as I figure out how to add that into member info.

If anyone has an idea of how to remove the extra cells that are empty, let me know.

//Recruits Group
          $groups = '';
      //Does all the real work here for showing groups.
      $query = db_query("SELECT ID_GROUP, groupName, minPosts, onlineColor
         FROM {$db_prefix}membergroups WHERE groupName = 'Recruit'
         ORDER BY groupName", __FILE__, __LINE__);
      while ($row = mysql_fetch_assoc($query))
      {

         $groups[$row['ID_GROUP']]  = array(
            'id' => $row['ID_GROUP'],
            'name' => $row['groupName'],
            'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'],
         );
      }
      mysql_free_result($query);


      foreach ($groups as $id => $data)
      {

         //Now get all the user's
      $query2 = db_query("SELECT ID_GROUP, ID_MEMBER, realName, MSN
         FROM {$db_prefix}members WHERE ID_GROUP = " . $data['id'] . " ", __FILE__, __LINE__);

         if(db_affected_rows() != 0)
         {
            echo '<table width="200" border="0" cellspacing="1" cellpadding="4" align="center" class="bordercolor">
<tr>
    <td colspan="1" class="titlebg">
<font size="4" face="verdana">' . $data['name'] . '</font></td></tr>';
            
            while ($row2 = mysql_fetch_assoc($query2))
            {

               echo '<tr><td class="windowbg" height="40"><a title="' . $row2['MSN'] . '"  href="' . $scripturl . '?action=profile;u=' . $row2['ID_MEMBER'] . '">::[DsK]:: <font color="' . $data['color'] . '" size="1" face="verdana">' . $row2['realName'] . '</a></a><td class="windowbg">' . $row2['usertitle'] . '</td></tr>';
               }
                             echo '</table>';
            }
      }

echo'
';

http://www.digitalserialkillers.com
Located on right hand side

stigmartyr

Is there a way to call additional member groups into the table?  As of now I can only call primary member groups :(

I have not been able to call the 'additional' or secondary membergroups into tables.  This would be extremely helpful in creating additional roster listings with other (secondary) membergroups assigned to my members.

scope

I was curious of the same thing.  I will evntually want to pull a list of donators on my site.  So they get credit as a donator, not just a name to show up.

Xarcell

I'm having troubles getting the script to work. Where do I enter the group ID?

Also, the table cells are screwed up because you didn't close the table cell before starting a new one. You should have also span/style instead of font tag.

This website is proudly hosted on Crocweb Cloud Website Hosting.