UtopiaSoftware Forums

Full Version: Comments error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
For some reason my comments no longer work.

They used to work though because one of the news posts has a comment and I remember reading it.

Website: http://www.gardensoccer.com/

When I try to read/post comments:

Quote:
Parse error: parse error, unexpected T_STRING in
/home/gard6933/public_html/newspro/comments.php on line 41


Please can you tell me how to fix it?

Code:
General Information
Total News Posts     7     Total Comments     1
Total Users     3     Total Administrators     3

Server Information
Server Type     PHP 5.0.4 / MySQL 4.0.25-standard     Total Database Size     3760.71 KB
Total Comments Use     3.11 KB / 0.21%     Total News Use     7.98 KB / 0.21%
Total Template Use     14.25 KB / 0.38%     Other Database Use     3735.37 KB / 99.2%

UNP Information
Version     1.1.2 [Check For Update]     MySQL Driver Version     1.4.7
News Parser Version     1.3.3     Register UNP     Register Your Site

What's on line 41 of comments.php for you?
According to Excel, this is:

Quote:
unp_msgBox('Sorry, you have been banned from making comments on this website, mainly because you're just a bit sad.');


Something my brother must have added... Rolleyes

I'm guessing I need to comment you'/re ? or something like that.

Please help.

Here's the lines before it (22-60) to make it clearer:

Code:
$n->unp_getStyle();
// +------------------------------------------------------------------+
// | Check Authorization                                              |
// +------------------------------------------------------------------+
$bannedip = '86.141.104.147';
if (isset($_SERVER['HTTP_X_FORWARDED_FOR']))
{
    $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];
}
elseif (isset($_SERVER['HTTP_CLIENT_IP']))
{
    $ipaddress = $_SERVER['HTTP_CLIENT_IP'];    
}    
else    
{    
    $ipaddress = $_SERVER['REMOTE_ADDR'];    
}    
if ($ipaddress == $bannedip)    
{    
    unp_msgBox('Sorry, you have been banned from making comments on this website, mainly because you're just a bit sad.');    
    exit;    
}    
if ($commentsallowance != '1')    
{    
    unp_msgBox($gp_invalidrequest);
    exit;
}    
if ($USER['groupid'] != 0)        
{        
    $isloggedin = 1;    
}        
else        
{        
    $isloggedin = 0;    
}        
// +------------------------------------------------------------------+        
// | Process Submission                                               |        
// +------------------------------------------------------------------+        
if ($action == '')

Either this or the second one will fix it:

unp_msgBox('Sorry, you have been banned from making comments on this website, mainly because you\'re just a bit sad.');

unp_msgBox("Sorry, you have been banned from making comments on this website, mainly because you're just a bit sad.");
Worked. Thank you.
Reference URL's