PHPBB Script Problem

DurbanYouthCouncil

New Member
Messages
44
Reaction score
0
Points
0
Hi there guys, got some troubles with my script:

Code:
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]------------------------------------------
#
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
/*******************
** MOD: Report Posts
*******************/
// BEGIN : AFTER, ADD
include_once($phpbb_root_path . 'includes/functions_report.'.$phpEx);

if ( $userdata['user_level'] >= ADMIN )
{
    $open_reports = reports_count();
    if ( $open_reports == 0 )
    {
        $open_reports = sprintf($lang['Post_reports_none_cp'],$open_reports);
    }
    else 
    {
        $open_reports = sprintf(( ($open_reports == 1) ? $lang['Post_reports_one_cp'] : $lang['Post_reports_many_cp']), $open_reports);
        $open_reports = '<b style="color:#' . $theme['fontcolor2'] . '">' . $open_reports . '</b>';
    }

    $report_link = '&nbsp; <a href="' . append_sid($phpbb_root_path . 'viewpost_reports.'.$phpEx) . '">' . $open_reports . '</a> &nbsp;';
}
else
{
    $report_link = '';
}
// END : AFTER, ADD
#
#-----[ FIND ]------------------------------------------
#
    'ADMIN_LINK' => $admin_link)
#
#-----[ BEFORE, ADD ]------------------------------------------
#
/*******************
** MOD: Report Posts
*******************/
// BEGIN : BEFORE, ADD
    'REPORT_LINK' => $report_link,
// END : BEFORE, ADD


The error i receive from this is:
Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/liquatic/public_html/includes/page_tail.php on line 66


All help is appreciated! And if you see any other errors in the script, please let me know so i can get this up and running
Edit:
Sorry for double post, but i am also having this problem when i log into my account:

An Error Has Occurred
Although you've logged in successfully, there was an error retrieving your account's hosting type from the backend system.

Please post on our forums to seek support on this issue.
 
Last edited:

traveler

New Member
Messages
7
Reaction score
0
Points
0
If you give me the whole script, i might be able to help, because without the whole script i can't tell which line is 66.
 

diabolo

Community Advocate
Community Support
Messages
1,682
Reaction score
32
Points
48
the T_DOUBLE_ARROW error is most likely caused by the synthax of the script,

on line 66 there should be something like =>, or <=
revers the signs and try it again, if it doesn't work; post the script here
 

DurbanYouthCouncil

New Member
Messages
44
Reaction score
0
Points
0
Full script of /home/liquatic/public_html/includes/page_tail.php

Code:
<?php
/***************************************************************************
* page_tail.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_tail.php,v 1.27.2.4 2005/09/14 18:14:30 acydburn 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.
*
***************************************************************************/

if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
}

global $do_gzip_compress;

//
// Show the overall footer.
//
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';

/*******************
** MOD: Report Posts
*******************/
// BEGIN : AFTER, ADD
include_once($phpbb_root_path . 'includes/functions_report.'.$phpEx);

if ( $userdata['user_level'] >= ADMIN )
{
$open_reports = reports_count();
if ( $open_reports == 0 )
{
$open_reports = sprintf($lang['Post_reports_none_cp'],$open_reports);
}
else
{
$open_reports = sprintf(( ($open_reports == 1) ? $lang['Post_reports_one_cp'] : $lang['Post_reports_many_cp']), $open_reports);
$open_reports = '<b style="color:#' . $theme['fontcolor2'] . '">' . $open_reports . '</b>';
}

$report_link = '&nbsp; <a href="' . append_sid($phpbb_root_path . 'viewpost_reports.'.$phpEx) . '">' . $open_reports . '</a> &nbsp;';
}
else
{
$report_link = '';
}
// END : AFTER, ADD

/*******************
** MOD: Report Posts
*******************/
// BEGIN : BEFORE, ADD
'REPORT_LINK' => $report_link,)
// END : BEFORE, ADD

'ADMIN_LINK' => $admin_link



);



$template->pparse('overall_footer');

//
// Close our DB connection.
//
$db->sql_close();

//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();

$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);

$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}

exit;

?>

the T_DOUBLE_ARROW error is most likely caused by the synthax of the script,

on line 66 there should be something like =>, or <=
revers the signs and try it again, if it doesn't work; post the script here

When i changed this, i got another error:
Parse error: syntax error, unexpected ',' in /home/liquatic/public_html/includes/page_tail.php on line 66
 
Last edited:

crazywhite1989

New Member
Messages
69
Reaction score
0
Points
0
Try this

Find
Code:
// BEGIN : BEFORE, ADD
'REPORT_LINK' => $report_link,)
// END : BEFORE, ADD

Replace
Code:
// BEGIN : BEFORE, ADD
[color=red]'REPORT_LINK' => $report_link)[/color]
or
[color=red]'REPORT_LINK' => $report_link;[/color]
or
[color=red]'REPORT_LINK' => $report_link',[/color]
// END : BEFORE, ADD
 
Last edited:

DurbanYouthCouncil

New Member
Messages
44
Reaction score
0
Points
0
Tried all 3 of those, and i got:

Parse error: syntax error, unexpected T_DOUBLE_ARROW in /home/liquatic/public_html/includes/page_tail.php on line 64
 

Micro

Retired staff <i> (11-12-2008)</I>
Messages
1,301
Reaction score
0
Points
36
This looks like part of a phpbb mod that's gone wrong.

They have a different syntax than normal php files, and you can't just copy and paste them in, you have to have the mod manager run them.
 

taekwondokid42

New Member
Messages
268
Reaction score
0
Points
0
I tried editing the script myself. By the time I had finally worked out all of the bugs, the script proclaimed 'hacking attempt'. This could be for 3 reasons:


1. Thats what this script is supposed to do.

2. The script did not like my edits.

3. There are other files that this script accesses that were not there, and so not being able to read them, it stated 'hacking attempt'.




This is my mod:


<?php
/***************************************************************************
* page_tail.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_tail.php,v 1.27.2.4 2005/09/14 18:14:30 acydburn 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.
*
***************************************************************************/

if ( !defined('IN_PHPBB') )
{
die('Hacking attempt');
}

global $do_gzip_compress;

//
// Show the overall footer.
//
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';

/*******************
** MOD: Report Posts
*******************/
// BEGIN : AFTER, ADD
include_once($phpbb_root_path . 'includes/functions_report.'.$phpEx);

if ( $userdata['user_level'] >= ADMIN )
{
$open_reports = reports_count();
if ( $open_reports == 0 )
{
$open_reports = sprintf($lang['Post_reports_none_cp'],$open_reports);
}
else
{
$open_reports = sprintf(( ($open_reports == 1) ? $lang['Post_reports_one_cp'] : $lang['Post_reports_many_cp']), $open_reports);
$open_reports = '<b style="color:#' . $theme['fontcolor2'] . '">' . $open_reports . '</b>';
}

$report_link = '&nbsp; <a href="' . append_sid($phpbb_root_path . 'viewpost_reports.'.$phpEx) . '">' . $open_reports . '</a> &nbsp;';
}
else
{
$report_link = '';
}
// END : AFTER, ADD

/*******************
** MOD: Report Posts
*******************/
// BEGIN : BEFORE, ADD
REPORT_LINK >= $report_link;
ADMIN_LINK >= $admin_link;



$template->pparse('overall_footer');

//
// Close our DB connection.
//
$db->sql_close();

//
// Compress buffered output if required and send to browser
//
if ( $do_gzip_compress )
{
//
// Borrowed from php.net!
//
$gzip_contents = ob_get_contents();
ob_end_clean();

$gzip_size = strlen($gzip_contents);
$gzip_crc = crc32($gzip_contents);

$gzip_contents = gzcompress($gzip_contents, 9);
$gzip_contents = substr($gzip_contents, 0, strlen($gzip_contents) - 4);

echo "\x1f\x8b\x08\x00\x00\x00\x00\x00";
echo $gzip_contents;
echo pack('V', $gzip_crc);
echo pack('V', $gzip_size);
}

exit;

?>
 

DurbanYouthCouncil

New Member
Messages
44
Reaction score
0
Points
0
Thank you for your assistance, the error i now receive is:

Template->loadfile(): No file specified for handle overall_footer
 

DurbanYouthCouncil

New Member
Messages
44
Reaction score
0
Points
0
The mod is supposed to create a "report post" feature and ive already setup the phpbb forum and am pretty happy with it thus far. To much of a venture to setup a new board.

Please, desperate here...
 

DurbanYouthCouncil

New Member
Messages
44
Reaction score
0
Points
0
Yea im using Phpbb2, so ill take a look at that thanks.
Edit:
Problem has finally been solved! Thank you to all that have assisted!
 
Last edited:
Top