Error with Multiple Ranks mod

Wondering why that MOD you have won't install correctly? Let's take a look
Forum rules
DO NOT give out any FTP passwords to anyone! There is no reason to do so! If you need help badly enough, create a temporary FTP account that is restricted to only the files that you need help with and give the information for that. Giving out FTP information can be very dangerous!
Locked
Atari@Hankoupocho
Registered User
Posts: 8
Joined: Tue Oct 30, 2007 3:53 pm
Contact:

Error with Multiple Ranks mod

Post by Atari@Hankoupocho » Tue Nov 06, 2007 10:42 pm

Here's the problem I'm experiencing..
I'm trying to install the following: "Multiple Ranks with Staff and Online View in Memberlist"
that can be found on phpbb hacks. Here => http://www.phpbbhacks.com/download/991

here is what I got when I tried to process it. (look in quote)

now I'm not a phpBB expert but I suppose that means I have to edit one of the text files within it? Could I get a walkthrough on going about this? I would appreciate that...thanks

~ Unsure Admin.
Installation Failed
EasyMOD encountered the following error(s). A general error could be ABC. A critical error means D and you should do XYZ.


Error Detail

Critical Error

FIND FAILED: In file [admin/admin_ranks.php] could not find:

if($special_rank)

MOD script line #588 :: FAQ :: Report



MOD Data
MOD Title: Multiple Ranks And Staff View 2.0.1 multiple_ranks_2_0_1.txt
Author: Mighty Gorgon mightygorgon@mightygorgon.com Luca Libralato http://www.mightygorgon.com
Processed Themes: subSilver; Abandon; fisubgrey; fisubgreen; Clanzi2K
Processed Languages: english
Files Edited: 3
Commands Processed: 54
Unprocessed Commands: 0


The following commands were not recognized by EasyMOD and were ignored. The MOD script line number is displayed.
Unprocessed Commands


EasyMOD successfully processed the following commands:
Commands Processed
COPY #123
copy phpbb_root/*.php to *.php
copy phpbb_root/includes/*.php to includes/
copy phpbb_root/templates/subSilver/*.* to templates/subSilver/


SQL #141
ALTER TABLE phpbb_users ADD user_rank2 INT(11) DEFAULT '-1';
ALTER TABLE phpbb_users ADD user_rank3 INT(11) DEFAULT '-2';
ALTER TABLE phpbb_users ADD user_rank4 INT(11) DEFAULT '-2';
ALTER TABLE phpbb_users ADD user_rank5 INT(11) DEFAULT '-2';


OPEN #148
memberlist.php


FIND #152
$mode_types_text = array(


IN-LINE FIND #156
, $lang['Sort_Top_Ten']


IN-LINE AFTERADD #160
, $lang['Staff'], $lang['Who_is_Online']


FIND #164
$mode_types = array(


IN-LINE FIND #168
, 'topten'


IN-LINE AFTERADD #172
, 'staff', 'online'


FIND #176
$select_sort_mode = '<select name="mode">';


BEFOREADD #180
// Mighty Gorgon - Multiple Ranks - BEGIN
$lastfivemin = time() - 300;
// Mighty Gorgon - Multiple Ranks - END


FIND #186
'L_ICQ' => $lang['ICQ'],


AFTERADD #190
// Mighty Gorgon - Multiple Ranks - BEGIN
'L_USER_RANK' => $lang['Poster_rank'],
// Mighty Gorgon - Multiple Ranks - END


FIND #196
switch( $mode )


BEFOREADD #200
// Mighty Gorgon - Multiple Ranks - BEGIN
require_once($phpbb_root_path . 'includes/functions_mg_ranks.'.$phpEx);
$ranks_sql = query_ranks();
// Mighty Gorgon - Multiple Ranks - END


FIND #207
default:
$order_by = "user_regdate $sort_order LIMIT $start, " . $board_config['topics_per_page'];
break;
}


BEFOREADD #214
// Mighty Gorgon - Multiple Ranks - BEGIN
case 'staff':
$where_sql = "AND user_level > 0";
$order_by = "user_level ASC LIMIT $start, " . $board_config['topics_per_page'];
break;
case 'online':
if ( $userdata['user_level'] == ADMIN )
{
$where_sql = "AND user_session_time >= $lastfivemin";
}
else
{
$where_sql = "AND user_session_time >= $lastfivemin AND user_allow_viewonline <> 0";
}
$order_by = "user_session_time DESC LIMIT $start, " . $board_config['topics_per_page'];
break;
// Mighty Gorgon - Multiple Ranks - END


FIND #234
$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm, user_avatar, user_avatar_type, user_allowavatar


IN-LINE FIND #238
, user_allowavatar


IN-LINE AFTERADD #242
, user_rank , user_rank2, user_rank3, user_rank4, user_rank5, user_level, user_session_time, user_allow_viewonline


FIND #246
ORDER BY $order_by";


BEFOREADD #250
$where_sql


FIND #254
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;


AFTERADD #258
// Mighty Gorgon - Multiple Ranks - BEGIN
$user_ranks = generate_ranks($row, $ranks_sql);

$user_rank_01 = ($user_ranks['rank_01'] == '') ? '' : ($user_ranks['rank_01'] . '<br />');
$user_rank_01_img = ($user_ranks['rank_01_img'] == '') ? '' : ($user_ranks['rank_01_img'] . '<br />');
$user_rank_02 = ($user_ranks['rank_02'] == '') ? '' : ($user_ranks['rank_02'] . '<br />');
$user_rank_02_img = ($user_ranks['rank_02_img'] == '') ? '' : ($user_ranks['rank_02_img'] . '<br />');
$user_rank_03 = ($user_ranks['rank_03'] == '') ? '' : ($user_ranks['rank_03'] . '<br />');
$user_rank_03_img = ($user_ranks['rank_03_img'] == '') ? '' : ($user_ranks['rank_03_img'] . '<br />');
$user_rank_04 = ($user_ranks['rank_04'] == '') ? '' : ($user_ranks['rank_04'] . '<br />');
$user_rank_04_img = ($user_ranks['rank_04_img'] == '') ? '' : ($user_ranks['rank_04_img'] . '<br />');
$user_rank_05 = ($user_ranks['rank_05'] == '') ? '' : ($user_ranks['rank_05'] . '<br />');
$user_rank_05_img = ($user_ranks['rank_05_img'] == '') ? '' : ($user_ranks['rank_05_img'] . '<br />');

if ( $row['user_level'] == ADMIN )
{
// You may prefer to show the level instead of coloring the username
// $level = '<b style="color:#' . $theme['fontcolor3'] . '">' . $lang['Memberlist_Administrator'] . '</b>';
$username = '<b style="color:#' . $theme['fontcolor3'] . '">' . $username . '</b>';
}
elseif( $row['user_level'] == MOD )
{
// You may prefer to show the level instead of coloring the username
// $level = '<b style="color:#' . $theme['fontcolor2'] . '">' . $lang['Memberlist_Moderator'] . '</b>';
$username = '<b style="color:#' . $theme['fontcolor2'] . '">' . $username . '</b>';
}
else
{
// You may prefer to show the level instead of coloring the username
// $level = '<b style="color:#' . $theme['fontcolor1'] . '">' . $lang['Memberlist_User'] . '</b>';
}
// Mighty Gorgon - Multiple Ranks - END



FIND #294
if ( $row['user_avatar_type'] && $user_id


IN-LINE FIND #298
&& $row['user_allowavatar']


IN-LINE AFTERADD #302
&& $mode == 'staff'


FIND #306
'YIM' => $yim,


AFTERADD #310
// Mighty Gorgon - Multiple Ranks - BEGIN
'USER_LEVEL' => $level,
'USER_RANK_01' => $user_rank_01,
'USER_RANK_01_IMG' => $user_rank_01_img,
'USER_RANK_02' => $user_rank_02,
'USER_RANK_02_IMG' => $user_rank_02_img,
'USER_RANK_03' => $user_rank_03,
'USER_RANK_03_IMG' => $user_rank_03_img,
'USER_RANK_04' => $user_rank_04,
'USER_RANK_04_IMG' => $user_rank_04_img,
'USER_RANK_05' => $user_rank_05,
'USER_RANK_05_IMG' => $user_rank_05_img,
// Mighty Gorgon - Multiple Ranks - END



FIND #327
$sql = "SELECT count(*) AS total
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS;


REPLACE #333
$sql = "SELECT count(*) AS total
FROM " . USERS_TABLE . "
WHERE user_id <> " . ANONYMOUS . "
$where_sql";


OPEN #340
viewtopic.php


FIND #344
$sql = "SELECT u.username,


IN-LINE FIND #348
, u.user_rank


IN-LINE AFTERADD #352
, u.user_rank2, u.user_rank3, u.user_rank4, u.user_rank5


FIND #356
$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);


REPLACE #374
// Mighty Gorgon - Multiple Ranks - BEGIN
require_once($phpbb_root_path . 'includes/functions_mg_ranks.'.$phpEx);
$ranks_sql = query_ranks();
// Mighty Gorgon - Multiple Ranks - END


FIND #381
//
// Generate ranks, set them to empty string initially.
//
$poster_rank = '';
$rank_image = '';
if ( $postrow[$i]['user_id'] == ANONYMOUS )
{
}
else if ( $postrow[$i]['user_rank'] )
{
for($j = 0; $j < count($ranksrow); $j++)
{
if ( $postrow[$i]['user_rank'] == $ranksrow[$j]['rank_id'] && $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 />' : '';
}
}
}
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 />' : '';
}
}
}


REPLACE #414
// Mighty Gorgon - Multiple Ranks - BEGIN
$user_ranks = generate_ranks($postrow[$i], $ranks_sql);

$user_rank_01 = ($user_ranks['rank_01'] == '') ? '' : ($user_ranks['rank_01'] . '<br />');
$user_rank_01_img = ($user_ranks['rank_01_img'] == '') ? '' : ($user_ranks['rank_01_img'] . '<br />');
$user_rank_02 = ($user_ranks['rank_02'] == '') ? '' : ($user_ranks['rank_02'] . '<br />');
$user_rank_02_img = ($user_ranks['rank_02_img'] == '') ? '' : ($user_ranks['rank_02_img'] . '<br />');
$user_rank_03 = ($user_ranks['rank_03'] == '') ? '' : ($user_ranks['rank_03'] . '<br />');
$user_rank_03_img = ($user_ranks['rank_03_img'] == '') ? '' : ($user_ranks['rank_03_img'] . '<br />');
$user_rank_04 = ($user_ranks['rank_04'] == '') ? '' : ($user_ranks['rank_04'] . '<br />');
$user_rank_04_img = ($user_ranks['rank_04_img'] == '') ? '' : ($user_ranks['rank_04_img'] . '<br />');
$user_rank_05 = ($user_ranks['rank_05'] == '') ? '' : ($user_ranks['rank_05'] . '<br />');
$user_rank_05_img = ($user_ranks['rank_05_img'] == '') ? '' : ($user_ranks['rank_05_img'] . '<br />');
// Mighty Gorgon - Multiple Ranks - END


FIND #431
$poster_rank = $lang['Guest'];


REPLACE #435
$user_rank_01 = $lang['Guest'] . '<br />';


FIND #439
'POSTER_RANK' => $poster_rank,
'RANK_IMAGE' => $rank_image,


REPLACE #444
// Mighty Gorgon - Multiple Ranks - BEGIN
'USER_RANK_01' => $user_rank_01,
'USER_RANK_01_IMG' => $user_rank_01_img,
'USER_RANK_02' => $user_rank_02,
'USER_RANK_02_IMG' => $user_rank_02_img,
'USER_RANK_03' => $user_rank_03,
'USER_RANK_03_IMG' => $user_rank_03_img,
'USER_RANK_04' => $user_rank_04,
'USER_RANK_04_IMG' => $user_rank_04_img,
'USER_RANK_05' => $user_rank_05,
'USER_RANK_05_IMG' => $user_rank_05_img,
// Mighty Gorgon - Multiple Ranks - END


OPEN #459
admin/admin_ranks.php


FIND #463
$rank_is_special = ( $rank_info['rank_special'] ) ? "checked=\"checked\"" : "";
$rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked=\"checked\"" : "";


REPLACE #468
// Mighty Gorgon - Multiple Ranks - BEGIN
$rank_no_rank = ( $rank_info['rank_special'] == '-2' ) ? "checked=\"checked\"" : "";
$rank_day_counter = ( $rank_info['rank_special'] == '-1' ) ? "checked=\"checked\"" : "";
$rank_is_not_special = ( $rank_info['rank_special'] == '0' ) ? "checked=\"checked\"" : "";
$rank_is_special = ( $rank_info['rank_special'] == '1' ) ? "checked=\"checked\"" : "";
$rank_is_guest = ( $rank_info['rank_special'] == '2' ) ? "checked=\"checked\"" : "";
$rank_is_banned = ( $rank_info['rank_special'] == '3' ) ? "checked=\"checked\"" : "";

$rank_path = "../images/ranks/";
if ( is_dir($rank_path) )
{
$dir = opendir($rank_path);
$l = 0;
while($file = readdir($dir))
{
if (strpos($file, '.gif'))
{
$file1[$l] = $file;
$l++;
}
}
closedir($dir);
$ranks_list = '<select name="rank_image_sel" onchange="update_rank(this.options[selectedIndex].value);">';
if ($rank_info['rank_image'] == '')
{
$ranks_list .= "<option value=\"\" selected="selected">" . $lang['No_Rank_Image'] . "</option>";
}
else
{
$ranks_list .= "<option value=\"\">" . $lang['No_Rank_Image'] . "</option>";
$ranks_list .= "<option value=\"" . $rank_info['rank_image'] . "\" selected="selected">" . str_replace($rank_path, "", $rank_info['rank_image']) . "</option>";
}
for($k=0; $k<=$l;$k++)
{
if ($file1[$k] != "")
{
$ranks_list .= "<option value=\"images/ranks/" . $file1[$k] . "\">images/ranks/" . $file1[$k] . "</option>";
}
}
$rank_img_sp = ( ($rank_info['rank_image'] != '') ? ('../' . $rank_info['rank_image']) : $images['spacer'] );
$rank_img_path = ( $rank_info['rank_image'] != '' ) ? $rank_info['rank_image'] : '';
$ranks_list .= '</select>';
$ranks_list .= '&nbsp;&nbsp;<img name="rank_image" src="' . $rank_img_sp . '" border="0" alt="" align="absmiddle" />';
$ranks_list .= '<br /><br />';
$ranks_list .= '<input class="post" type="text" name="rank_image_path" size="40" maxlength="255" value="' . $rank_img_path . '" />';
$ranks_list .= '<br />';

}
else
{
$rank_img_path = ( $rank_info['rank_image'] != '' ) ? $rank_info['rank_image'] : '';
$ranks_list = '<input class="post" type="text" name="rank_image_path" size="40" maxlength="255" value="' . $rank_img_path . '" /><br />';
}
// Mighty Gorgon - Multiple Ranks - END


FIND #525
"SPECIAL_RANK" => $rank_is_special,
"NOT_SPECIAL_RANK" => $rank_is_not_special,
"MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'],


REPLACE #531
// Mighty Gorgon - Multiple Ranks - BEGIN
"NO_RANK" => $rank_no_rank,
"DAYS_RANK" => $rank_day_counter,
"NOT_SPECIAL_RANK" => $rank_is_not_special,
"MINIMUM" => ( ($rank_info['rank_special'] == '0') || ($rank_info['rank_special'] == '-1') ) ? $rank_info['rank_min'] : "",
"SPECIAL_RANK" => $rank_is_special,
"GUEST_RANK" => $rank_is_guest,
"BANNED_RANK" => $rank_is_banned,
"RANK_LIST" => $ranks_list,
"RANK_IMG" => ( $rank_info['rank_image'] != "") ? '../' . $rank_info['rank_image'] : $images['spacer'],

"L_NO_RANK" => $lang['No_Rank'],
"L_DAYS_RANK" => $lang['Rank_Days_Count'],
"L_POSTS_RANK" => $lang['Rank_Posts_Count'],
"L_MIN_M_D" => $lang['Rank_Min_Des'],
"L_SPECIAL_RANK" => $lang['Rank_Special'],
"L_GUEST" => $lang['Guest_User'],
"L_BANNED" => $lang['Banned_User'],
"L_CURRENT_RANK" => $lang['Current_Rank_Image'],
// Mighty Gorgon - Multiple Ranks - END


FIND #554
$special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0;
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
$rank_image = ( (isset($HTTP_POST_VARS['rank_image'])) ) ? trim($HTTP_POST_VARS['rank_image']) : "";


REPLACE #560
// Mighty Gorgon - Multiple Ranks - BEGIN
$special_rank = $HTTP_POST_VARS['special_rank'];
$min_posts = ( isset($HTTP_POST_VARS['min_posts']) ) ? intval($HTTP_POST_VARS['min_posts']) : -1;
$rank_image = ( (isset($HTTP_POST_VARS['rank_image_path'])) ) ? trim($HTTP_POST_VARS['rank_image_path']) : "";
// Mighty Gorgon - Multiple Ranks - END


FIND #568
if( $special_rank == 1 )


REPLACE #572
// Mighty Gorgon - Multiple Ranks - BEGIN
if( $special_rank > 0 )
// Mighty Gorgon - Multiple Ranks - END


FIND #578
if (!$special_rank)


REPLACE #582
// Mighty Gorgon - Multiple Ranks - BEGIN
if ($special_rank == 1)
// Mighty Gorgon - Multiple Ranks - END

User avatar
Lumpy Burgertushie
Registered User
Posts: 1006
Joined: Tue Feb 28, 2006 5:26 pm

Re: Error with Multiple Ranks mod

Post by Lumpy Burgertushie » Wed Nov 07, 2007 12:33 am

I guess you will have to take this up with the MOD author. I just downloaded that MOD, I tried to do all the finds in a standard admin_ranks.php file and it will not work at all.

It does fine up to that line, but it is almost at the end of the file and there are many other finds in the MOD file to go.

I think the author needs to fix his MOD file.

luck,
robert

Locked