Identifing trusted users
Moderator: Forum Moderators
Identifing trusted users
So that we can easily tell if a user is already in a group, I think that the name of the group should show up where the title goes.
The necessary php modifications are here:
[IN FILE 'viewtopic.php']
FIND:
INSERT AFTER:
FIND:
INSERT AFTER:
The necessary php modifications are here:
[IN FILE 'viewtopic.php']
FIND:
Code: Select all
$ranksrow = array();
while ( $row = $db->sql_fetchrow($result) )
{
$ranksrow[] = $row;
}
$db->sql_freeresult($result);
Code: Select all
$sql = "SELECT *
FROM " . USER_GROUP_TABLE . "";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain usergroup information.", '', __LINE__, __FILE__, $sql);
}
$groupsrow = array();
while ( $row = $db->sql_fetchrow($result) )
{
$groupsrow[] = $row;
}
$db->sql_freeresult($result);
Code: Select all
else
{
for($j = 0; $j < count($ranksrow); $j++)
{
if ( $postrow[$i]['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
{
$poster_rank = $ranksrow[$j]['rank_title'];
$rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img src="' . $ranksrow[$j]['rank_image'] . '" alt="' . $poster_rank . '" title="' . $poster_rank . '" border="0" /><br />' : '';
}
}
}
Code: Select all
for($j = 0; $j < count($groupsrow); $j++)
{
if( $groupsrow[$j]['user_id'] == $postrow[$i]['user_id'] )
{
$group_id = $groupsrow[$j]['group_id'];
$group_sql = "SELECT group_name
FROM " . GROUPS_TABLE . "
WHERE group_id = $group_id";
if ( !($result = $db->sql_query($group_sql)) )
{
message_die(GENERAL_ERROR, 'Could not get group information', '', __LINE__, __FILE__, $group_sql);
}
$group_name_row = $db->sql_fetchrow($result);
$group_name = $group_name_row['group_name'];
// possibly modify group_name here
if($poster_rank == '') // no title
{
$poster_rank = $group_name;
} // else do nothing
break;
}
}
"It is time people learned about their failures and my successes."
Re: Identifing trusted users
The forum isn't actively maintained at all. It is only updated when it is really needed (that is, security updates).Xan wrote:So that we can easily tell if a user is already in a group, I think that the name of the group should show up where the title goes.
It would be good if someone else with more time and energy could take over the maintenance of the forum (I mean the forum engine here: phpBB).