Ranks List help with nuke 7.4

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Ranks List help with nuke 7.4
Aucturus
CZ Newbie
Aucturus has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 16, 2004
0.00 posts per day
Posts: 12
Points: 4,148
   
okie i installed the Ranks list mod for the forums....
i am running nuke 7.4 and a theme on it.... and phpbb 2.0.10 i guess.....

the problem is your CZ ranks list module.... doesnt show even a link to go to the ranks page..... and i try to create a link in the overall header file in the theme/forums/ but it doesnt work.....

then i tried the other Summerize Ranks mod that u casn find online

I get the following error:

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 34

Warning: main(./extension.inc): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 34

Warning: main(): Failed opening './extension.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 34

Warning: main(./common.): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 35

Warning: main(./common.): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 35

Warning: main(): Failed opening './common.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 35

Fatal error: Call to undefined function: session_pagestart() in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 64

here are the files......
PLS HELP I NEED THIS BAD.....



Attached Files
mod-ranks-104.zip (9.1 KB, Downloaded: 5232 Time(s))


Back to top Reply with quote
#2   re: Ranks List help with nuke 7.4
SpLiNteR
CZ Addict
SpLiNteR has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Student
Age: 34
Gender: Male
Fav. Sports Team: Leeds United
Website:
Status: Offline
Joined: Feb 08, 2004
0.05 posts per day
Posts: 397
Points: 206,328
AIM Address Yahoo Messenger MSN Messenger ICQ Number
Have a quick look at the errors. It's saying could not find X file on some of them, make sure you've uploaded everything and that it's in the right place. Also, you need 2 dots/periods/full stops for a "go up one level" file path thingy. like this:

../blah folder/blah.php




_________________
Back to top Reply with quote
#3   re: Ranks List help with nuke 7.4
Aucturus
CZ Newbie
Aucturus has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 16, 2004
0.00 posts per day
Posts: 12
Points: 4,148
   
YUP I TRIED ALL THAT.....

I UPLOADED EVERYTHING....

I turned that ./ into a ../

and then it says NO SUCH FILE FOUND :S

sigh...
this is jsut not getting better....



Back to top Reply with quote
#4   re: Ranks List help with nuke 7.4
Aucturus
CZ Newbie
Aucturus has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 16, 2004
0.00 posts per day
Posts: 12
Points: 4,148
   
i tried the ../
and this is what i get:
Notice the ranks.php is i nthe root path already.....

Warning: main(../extension.inc): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 34

Warning: main(../extension.inc): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 34

Warning: main(): Failed opening '../extension.inc' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 34

Warning: main(../common.): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 35

Warning: main(../common.): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 35

Warning: main(): Failed opening '../common.' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 35

Fatal error: Call to undefined function: session_pagestart() in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 64



Back to top Reply with quote
#5   re: Ranks List help with nuke 7.4
Aucturus
CZ Newbie
Aucturus has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 16, 2004
0.00 posts per day
Posts: 12
Points: 4,148
   
then as i say.... Notice the file is in the root path already and i remove the ../
i get

Sorry, such file doesn't exist... when i click o nthe lin kto go to the ranks.php



Back to top Reply with quote
#6   re: Ranks List help with nuke 7.4
Aucturus
CZ Newbie
Aucturus has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 16, 2004
0.00 posts per day
Posts: 12
Points: 4,148
   
OMG!!! i figured that out... and it seems this file is FULL OF CODING BUGS.....

I changed the phpbb_root_path variable from ../ to modules/Forums/ and it worked but i get a page that has no theme..... is independent of the site.... and really messed up format along with the following errors....

Warning: Missing argument 3 for session_pagestart() in /home/hurrian/public_html/df2/includes/sessions.php on line 233

Warning: main(modules/Forums/includes/page_header.php): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 179

Warning: main(modules/Forums/includes/page_header.php): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 179

Warning: main(): Failed opening 'modules/Forums/includes/page_header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 179

Warning: main(modules/Forums/includes/page_tail.php): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 259

Warning: main(modules/Forums/includes/page_tail.php): failed to open stream: No such file or directory in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 259

Warning: main(): Failed opening 'modules/Forums/includes/page_tail.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/hurrian/public_html/df2/modules/Forums/ranks.php on line 259

I f sumone could help me debug this brown earth it would be gr8 icon_smile.gif thnxxxx.....

link to the page so u can have a look:
[ Register or login to view links on this board. ]



Back to top Reply with quote
#7   re: Ranks List help with nuke 7.4
Aucturus
CZ Newbie
Aucturus has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 16, 2004
0.00 posts per day
Posts: 12
Points: 4,148
   
okie changed lines 179 and 259

include ($phpbb_root_path. 'includes/page_header.'.$phpEx);

//to

include(''includes/page_header.'.$phpEx);

and

include($phpbb_root_path. 'includes/page_tail.'.$phpEx);

//to

include( 'includes/page_tail.'.$phpEx);


but i still get this :

Warning: Missing argument 3 for session_pagestart() in /home/hurrian/public_html/df2/includes/sessions.php on line 233

Fatal error: Call to undefined function: opentable() in /home/hurrian/public_html/df2/mainfile.php on line 330

okie here r the codes for ranks.php and mainfile.php and sessions.php

if sumone an help me debug them and make sure they are proper for php nuke 7.4 it would be gr8....

i think its just a prob with the ranks.php but i aint sure....

ranks.php

<?php
/***************************************************************************
*                            ranks.php
*                            ---------
*  begin               : 08/05/2003
*  copyright           : Ptirhiik
*  email               : [ Register or login to view links on this board. ]
*
*  version             : 1.0.3 - 26/07/2003
*
***************************************************************************/

/***************************************************************************
*
*   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.
*
*
***************************************************************************/

// global pgm options
$auth_rank_only_logged = true; // true will required to be logged to have access, false guest are welcome
$spe_rank_max_users = -1; // number of displayed members in the memberlist : -1=all, 0=none, value=number
$std_rank_max_users = -1; // number of displayed members in the memberlist : -1=all, 0=none, value=number

// check for inclusion
if ( isset($check_access) ) return;

// start the prog
define('IN_PHPBB', true);
$phpbb_root_path = 'modules/Forums/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.' . $phpEx);

$rank_extended = function_exists(extended_rank);
$profilcp = file_exists($phpbb_root_path . 'profilcp/functions_profile.' . $phpEx);
if ($profilcp)
{
    $rank_extended = false;
    include($phpbb_root_path . 'profilcp/functions_profile.' . $phpEx);
}

function get_rank_title($rank_title)
{
    global $rank_extended, $profilcp, $lang;

    $res = $rank_title;
    if ($rank_extended || $profilcp)
    {
        $ranks = explode( "|", $rank_title);
        $res = '';
        $res .= (isset($ranks[1]) && !empty($ranks[1])) ? '<b>' . $lang['Male'] . ': </b>' . $ranks[1] . '<br />': '';
        $res .= (isset($ranks[1]) && !empty($ranks[2])) ? '<b>' . $lang['Female'] . ': </b>' . $ranks[2] . '<br />' : '';
        $res .= '<b>' . $lang['No_gender_specify'] . ': </b>' . $ranks[0];
    }
    return $res;
}

//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//

// only registered members have access if desired
if ( $auth_rank_only_logged && !$userdata['session_logged_in'] )
{
    redirect(append_sid('login.' . $phpEx . '?redirect=ranks.' . $phpEx, true));
    exit;
}

//
// special ranks
$spe_ranks = array();
$sql = "SELECT * FROM " . RANKS_TABLE . " WHERE rank_special = 1 ORDER BY rank_title";
if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Couldn\'t read special ranks', '', __LINE__, __FILE__, $sql);
while ($row = $db->sql_fetchrow($result) ) $spe_ranks[] = $row;
for ($i=0; $i < count($spe_ranks); $i++ )
{
    $rank = $spe_ranks[$i]['rank_id'];
    $rank_title = $spe_ranks[$i]['rank_title'];
    $spe_ranks[$i]['user_number'] = 0;
    $spe_ranks[$i]['users_list'] = '';

    // base sql request
    $sql_base = "SELECT * FROM " . USERS_TABLE . " WHERE user_active = 1 AND user_rank = $rank ORDER BY username";

    // get the number of users having this rank
    $sql = $sql_base;
    if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Couldn\'t read users', '', __LINE__, __FILE__, $sql);
    $spe_ranks[$i]['user_number'] = $db->sql_numrows($result);

    // get the user list
    if ( $spe_rank_max_users != 0 )
    {
        $sql = $sql_base;
        if ( $spe_rank_max_users > 0 ) $sql .= " LIMIT 0, " . ($spe_rank_max_users + 1);
        if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Couldn\'t read users', '', __LINE__, __FILE__, $sql);
        $j = 0;
        while ( $row = $db->sql_fetchrow($result) )
        {
            $j++;
            if ( ($spe_rank_max_users <= 0) || ( $j <= $spe_rank_max_users ) )
            {
                $spe_ranks[$i]['users_list'] .= ($spe_ranks[$i]['users_list'] == '') ? '' : ', ';
                $spe_ranks[$i]['users_list'] .= '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id'] ) . '" class="gensmall">' . $row['username'] . '</a>';
            }
            else
            {
                $spe_ranks[$i]['users_list'] .= ($spe_ranks[$i]['users_list'] == '') ? '' : ', ';
                $spe_ranks[$i]['users_list'] .= ( !$profilcp ) ? '...' : '<a href="' . append_sid("profile.$phpEx?mode=buddy&sub=memberlist&filter=user_rank_title&comp=eq&fvalue=$rank_title") . '" class="gensmall">...</a>';
            }
        }
    }
    if ($spe_ranks[$i]['user_number'] > 0) $spe_ranks[$i]['users_list'] = '(' . $spe_ranks[$i]['user_number'] . ') ' . $spe_ranks[$i]['users_list'];
}

//
// standard ranks
$ranks = array();
$sql = "SELECT * FROM " . RANKS_TABLE . " WHERE rank_special <> 1 ORDER BY rank_min";
if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Couldn\'t read standard ranks', '', __LINE__, __FILE__, $sql);
while ($row = $db->sql_fetchrow($result) ) $ranks[] = $row;

$rank_max = 99999999;
for ($i=count($ranks)-1; $i >=0; $i--)
{
    $ranks[$i]['rank_max'] = $rank_max;
    $rank_title = $ranks[$i]['rank_title'];
    $rank_min = $ranks[$i]['rank_min'];
   
    // count users
    $sql_base = "SELECT * FROM " . USERS_TABLE . " WHERE user_active = 1 AND (user_rank = 0 OR user_rank IS NULL) AND user_posts >= $rank_min" . (($rank_max < 99999999)  ? " AND user_posts < $rank_max" : "" );

    // get the number of users having this rank
    $sql = $sql_base;
    if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Couldn\'t read users', '', __LINE__, __FILE__, $sql);
    $ranks[$i]['user_number'] = $db->sql_numrows($result);

    // get the user list
    if ( $std_rank_max_users != 0 )
    {
        $sql = $sql_base;
        if ( $std_rank_max_users > 0 ) $sql .= " LIMIT 0, " . ($std_rank_max_users + 1);
        if ( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Couldn\'t read users', '', __LINE__, __FILE__, $sql);
        $j = 0;
        while ( $row = $db->sql_fetchrow($result) )
        {
            $j++;
            if ( ($std_rank_max_users <= 0) || ( $j <= $std_rank_max_users ) )
            {
                $ranks[$i]['users_list'] .= ($ranks[$i]['users_list'] == '') ? '' : ', ';
                $ranks[$i]['users_list'] .= '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $row['user_id'] ) . '" class="gensmall">' . $row['username'] . '</a>';
            }
            else
            {
                $ranks[$i]['users_list'] .= ($ranks[$i]['users_list'] == '') ? '' : ', ';
                $ranks[$i]['users_list'] .= ( !$profilcp ) ? '...' : '<a href="' . append_sid("profile.$phpEx?mode=buddy&sub=memberlist&filter=user_rank_title&comp=eq&fvalue=$rank_title") . '" class="gensmall">...</a>';
            }
        }
    }

    // store the next limit
    $rank_max = $ranks[$i]['rank_min'];

    // number of user beyond userlist
    if ($ranks[$i]['user_number'] > 0) $ranks[$i]['users_list'] = '(' . $ranks[$i]['user_number'] . ') ' . $ranks[$i]['users_list'];
}

//
// set the page title and include the page header
//
$page_title = $lang['Ranks'];
include ('includes/page_header.'.$phpEx);
//
// template setting
//
$template->set_filenames(array(
    'body' => 'ranks_body.tpl')
);

// constants
$template->assign_vars(array(
    'L_SPECIAL_RANKS' => $lang['Special_ranks'],
    'L_USERS_LIST' => $lang['Memberlist'],
    'L_RANKS' => $lang['Ranks'],
    'L_MINI' => $lang['Rank_minimum'],
    'L_TOTAL_USERS' => $lang['Total_users'],
    'SPAN_USERLIST_STD' => ($std_rank_max_users != 0) ? 2 : 1,
    'S_HIDDEN_FIELDS' => '',
    )
);

// standard ranks
if ($std_rank_max_users != 0)
{
    $template->assign_block_vars('std_userlist', array());
}
else $template->assign_block_vars('no_std_userlist', array());

for ($i=0; $i < count($ranks); $i++)
{
    $template->assign_block_vars('ranks', array(
        'RANK_TITLE' => get_rank_title($ranks[$i]['rank_title']),
        'RANK_IMAGE' => ($ranks[$i]['rank_image'] == '') ? '' : '<img src="' . $ranks[$i]['rank_image'] . '" border=0 align="center">',
        'RANK_MINI'  => $ranks[$i]['rank_min'],
        'RANK_TOTAL' => $ranks[$i]['user_number'],
        )
    );
    if ($std_rank_max_users != 0)
    {
        $template->assign_block_vars('ranks.userlist', array(
            'USERS_LIST' => $ranks[$i]['users_list'],
            )
        );
    }
    else $template->assign_block_vars('ranks.no_userlist', array());
}

// special ranks
if ($spe_rank_max_users != 0)
{
    $template->assign_block_vars('spe_userlist', array());
}
else $template->assign_block_vars('no_spe_userlist', array());

for ($i=0; $i < count($spe_ranks); $i++)
{
    $template->assign_block_vars('spe_ranks', array(
        'RANK_TITLE' => get_rank_title($spe_ranks[$i]['rank_title']),
        'RANK_IMAGE' => ($spe_ranks[$i]['rank_image'] == '') ? '' : '<img src="' . $spe_ranks[$i]['rank_image'] . '" border=0 align="center">',
        )
    );
    if ($spe_rank_max_users != 0)
    {
        $template->assign_block_vars('spe_ranks.userlist', array(
            'USERS_LIST' => $spe_ranks[$i]['users_list'],
            )
        );
    }
    else
    {
        $template->assign_block_vars('spe_ranks.no_userlist', array(
            'RANK_TOTAL' => $spe_ranks[$i]['user_number'],
            )
        );
    }
}

//
// page footer
//
$template->pparse('body');
include('includes/page_tail.'.$phpEx);

?>


mainfile.php
and sessions.php attached


Attached Files
sess&main.zip (17.01 KB, Downloaded: 5231 Time(s))


Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum