Jump to content


Photo

Sorting By Member Id....


  • Please log in to reply
1 reply to this topic

#1 Micah

Micah

    Colonel

  • [[Administrators]]
  • PipPipPipPipPip
  • 2,290 posts

Posted 03 September 2003 - 10:54 PM

Here's the snippet I think you're looking for, and at the bottom is the whole file:


Above this code is where it figures out what you're looking for. This portion pulls it out of the database and stores it to variables (I think :P



//-----------------------------
// START THE LISTING
//-----------------------------

$DB->query("SELECT m.name, m.id, m.posts, m.joined, m.mgroup, m.email,m.title, m.hide_email, m.location, m.aim_name, m.icq_number,
me.photo_location, me.photo_type, me.photo_dimensions
FROM ibf_members m
LEFT JOIN ibf_member_extra me ON me.id=m.id
WHERE m.id > 0".$q_extra."
ORDER BY m.".$this->sort_key." ".$this->sort_order."
LIMIT ".$this->first.",".$this->max_results);

while($member = $DB->fetch_row() )
{

$pips = 0;

foreach($this->mem_titles as $k => $v)
{
if ($member['posts'] >= $v['POSTS'])
{
if (!$member['title'])
{
$member['title'] = $this->mem_titles[ $k ]['TITLE'];
}
$pips = $v['PIPS'];
break;
}
}

if ($this->mem_groups[ $member['mgroup'] ]['ICON'])
{
$member['pips'] = "{$ibforums->vars[TEAM_ICON_URL]}/$pips";
}
}
}

$member['joined'] = $std->get_date( $member['joined'], 'JOINED' );

$member['group'] = $this->mem_groups[ $member['mgroup'] ]['TITLE'];


if (!$member['hide_email'])
{
$member['member_email'] = "<{P_EMAIL}>";
}
else
{
$member['member_email'] = ' ';
}

if ($member['icq_number'])
{
$member['icq_number'] = "base_url}act=ICQ&MID={$member['id']}','Pager','450','330','0','1','1','1')\"><{P_ICQ}>";
}
else
{
$member['icq_number'] = ' ';
}

if ($member['aim_name'])
{
$member['aim_name'] = "base_url}act=AOL&MID={$member['id']}','Pager','450','330','0','1','1','1')\"><{P_AOL}>";
}
else
{
$member['aim_name'] = ' ';
}

if ($member['photo_type'] and $member['photo_location'])
{
$member['camera'] = "base_url}act=Profile&CODE=showphoto&MID={$member['id']}','Photo','200','250','0','1','1','1')\"><{CAMERA}>";
}

$member['password'] = "";

$member['posts'] = $std->do_number_format($member['posts']);

$this->output .= $this->html->show_row($member);

}

$checked = $ibforums->input['photoonly'] == 1 ? 'checked="checked"' : "";

$this->output .= $this->html->Page_end( $checked );

$this->output .= $this->html->end( array( 'SHOW_PAGES' => $links) );

$print->add_output("$this->output");
$print->do_output( array( 'TITLE' => $ibforums->lang['page_title'], 'JS' => 0, NAV => array( $ibforums->lang['page_title'] ) ) );

}

Attached Files



#2 stewart

stewart

    Programming Department

  • [Xenocide Senior Members]
  • 10,528 posts

Posted 04 September 2003 - 08:23 AM

I'll have a look. I'm going camping this weekend so I probably won't be able to look at it until next week.
Posted Image
I'm starting to like the heavy cannon more and more.