OK i added an update i got from phpbbhacks.com to were i can show the ranks of my members in there memberlist for forums but when i did it i got this error
Parse error: parse error, unexpected T_STRING in /home/content/s/l/i/slipknot/html/phpbb2/memberlist.php on line 147
this is what the html file told me to do.
##############################################################
MOD Title: Rank in member list
MOD Description: This mod will enable users to see other
users rank (name/image) in the member
list view.
MOD Version: 1.2.2
MOD Compatibility: 2.0.x
Installation Level: Easy
Installation Time: 3 Minutes (1mn by EasyMOD of Nuttzy)
Files To Edit: x
memberlist.php
templates/subSilver/memberlist_body.tpl
##
Included Files: 0
##
##############################################################
latest version of this MOD. Downloading this MOD from other sites could cause malicious code
to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
##############################################################
Author Notes:
1. EasyMOD
-----------
This MOD is compatible and can be installed by EasyMOD
of Nuttzy (but is not officially EasyMOD Compliant)!
##
2. Official last version link
-----------
Meanwhile the phpBB group validation and as the MOD is not yet
in the phpBB MOD database, check this official link for updates...
##
##############################################################
MOD History:
2004-01-05 - Version 1.2.2
- phpBB template & EasyMOD compliance enhancement
- Fix an IN-LINE FIND error
????-??-?? - Version 1.2.1
- change in the how-to, a FIND tag was not distinct
##
????-??-?? - Version 1.2.0
- now confirmed for phpBB2 version 2.0.2
##
????-??-?? - Version 1.0.1
- changed to a IN-LINE FIND in the how to
##
????-??-?? - Version 1.0.0
- History started, Release for phpBB2 ver 2.0.0
##
????-??-?? - Version 0.9.1
- Release for phpBB2 RC-2,RC-3
##
##############################################################
Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------------
#
memberlist.php
#
#-----[ FIND ]------------------------------------------------
#
'L_ICQ' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Rank in member list MOD
'L_USER_RANK' => $lang['Poster_rank'],
// End add - Rank in member list MOD
#
#-----[ FIND ]------------------------------------------------
#
$sql = "SELECT username, user_id
#
#-----[ IN-LINE FIND ]----------------------------------------
#
, user_allowavatar
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------
#
, user_rank
#
#-----[ BEFORE, ADD ]-----------------------------------------
#
// Start add - Rank in member list MOD
$sql = "SELECT *
FROM " . RANKS_TABLE . "
ORDER BY rank_special, rank_min";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Could not obtain ranks information.", '', LINE, FILE, $sql);
}
$ranksrow = array();
while ( $row = $db->sql_fetchrow($result) )
{
$ranksrow[] = $row;
}
$db->sql_freeresult($result);
// End add - Rank in member list MOD
#
#-----[ FIND ]------------------------------------------------
#
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Rank in member list MOD
//
// Generate ranks, set them to empty string initially
//
$user_rank = '';
$rank_image = '';
if ( $row['user_rank'] )
{
for($j = 0; $j < count($ranksrow); $j++)
{
if ( $row['user_rank'] == $ranksrow[$j]['rank_id'] && $ranksrow[$j]['rank_special'] )
{
$user_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 />' : '';
}
}
}
else
{
for($j = 0; $j < count($ranksrow); $j++)
{
if ( $row['user_posts'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] )
{
$user_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 />' : '';
}
}
}
// End add - Rank in member list MOD
#
#-----[ FIND ]------------------------------------------------
#
'JOINED' =>
#
#-----[ AFTER, ADD ]------------------------------------------
#
// Start add - Rank in member list MOD
'USER_RANK' => $user_rank,
'USER_RANK_IMG' => $rank_image,
// End add - Rank in member list MOD
#
#-----[ OPEN ]------------------------------------------------
#
Make sure to edit this file for every theme you use
#
templates/subSilver/memberlist_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
<th class="thTop" nowrap="nowrap">{L_USERNAME}</th>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Rank in member list MOD -->
<th class="thTop" nowrap="nowrap">{L_USER_RANK}</th>
<!-- End add - Rank in member list MOD -->
#
#-----[ FIND ]------------------------------------------------
#
Note: this is not the complete line
#
{memberrow.USERNAME}
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- Start add - Rank in member list MOD -->
<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gensmall">{memberrow.USER_RANK_IMG}{memberrow.USER_RANK}</span></td>
<!-- End add - Rank in member list MOD -->
#
#-----[ FIND ]------------------------------------------------
#
Note: if other mods are installed the value 8 can be different
#
<td class="catBottom" colspan="8"
#
#-----[ IN-LINE FIND ]----------------------------------------
#
colspan="8"
#
#-----[ IN-LINE REPLACE WITH ]--------------------------------
#
colspan="9"
#-----[ SAVE/CLOSE ALL FILES ]--------------------------------
EoM
=========================
and this is what it looks like altogether with my update
<?php
/************************************************************************
memberlist.php
-------------------
begin : Friday, May 11, 2001
copyright : (C) 2001 The phpBB Group
email : support@phpbb.com
$Id: memberlist.php,v 1.36.2.9 2004/03/01 15:56:52 psotfx Exp $
************************************************************************/
/************************************************************************
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
************************************************************************/
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_VIEWMEMBERS);
init_userprefs($userdata);
//
// End session management
//
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
if ( isset($HTTP_GET_VARS['mode']) || isset($HTTP_POST_VARS['mode']) )
{
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? htmlspecialchars($HTTP_POST_VARS['mode']) : htmlspecialchars($HTTP_GET_VARS['mode']);
}
else
{
$mode = 'joined';
}
if(isset($HTTP_POST_VARS['order']))
{
$sort_order = ($HTTP_POST_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else if(isset($HTTP_GET_VARS['order']))
{
$sort_order = ($HTTP_GET_VARS['order'] == 'ASC') ? 'ASC' : 'DESC';
}
else
{
$sort_order = 'ASC';
}
//
// Memberlist sorting
//
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');