MyBB Community Forums

Full Version: modcp.php is broken!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
http://img193.imageshack.us/img193/704/30380236.png
That's what happens everytime I try to view the reported posts.

I've tried this on 3 different themes, and also tried re-uploading modcp.php from a fresh myBB download (I didn't even change anything).

So what would the problem be? It's not modcp.php, and it's not any theme templates...
It could be a modification. What modifications do you have and have you tried deactivating them one at a time?
I have:

Akismet
Google SEO
My Ad Manager
My Meta Tags

I tried deactivating them but it' still happening.
The error is saying there's an issue with the line of modcp.php that evals the template that loads the reports, so make sure your modcp_reports_report template is default.
It's not green, and it's the same as the default theme's template.

This is it:
<tr>
<td class="{$trow}" align="center"><label for="reports_{$report['rid']}"><input type="checkbox" class="checkbox" name="reports[]" id="reports_{$report['rid']}" value="{$report['rid']}" />&nbsp;<a href="{$report['postlink']}#pid{$report['pid']}" target="_blank">{$report['pid']}</a></label></td>
<td class="{$trow}" align="center"><a href="{$report['posterlink']}" target="_blank">{$report['postusername']}</a></td>
<td class="{$trow}"><a href="{$report['threadlink']}" target="_blank">{$rePORT 82,176,178,227,134,92
$lang->reporter}</strong></span></td>
<td class="tcat" align="center" width="25%"><span class="smalltext"><strong>{$lang->report_reason}</strong></span></td>
<td class="tcat" align="center" width="10%"><span class="smalltext"><strong>{$lang->report_time}</strong></span></td>
</tr>
{$allreports}
{$allreportspages}
</table>
</td>
</tr>
</table>
{$footer}
</body>
</html>
Hmmz... can you look in your database and just check that there are actually reported posts??
My friend does most of the database work and the fancy stuff, but from this it looks like they're in there:

-- MyBB Database Backup
-- Generated: 01st June 2009 at 16:25
-- -------------------------------------

CREATE TABLE `mybb_reportedposts` (
  `rid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(10) unsigned NOT NULL DEFAULT '0',
  `tid` int(10) unsigned NOT NULL DEFAULT '0',
  `fid` int(10) unsigned NOT NULL DEFAULT '0',
  `uid` int(10) unsigned NOT NULL DEFAULT '0',
  `reportstatus` int(1) NOT NULL DEFAULT '0',
  `reason` varchar(250) NOT NULL DEFAULT '',
  `dateline` bigint(30) NOT NULL DEFAULT '0',
  PRIMARY KEY (`rid`),
  KEY `fid` (`fid`),
  KEY `dateline` (`dateline`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
INSERT INTO mybb_reportedposts (rid,pid,tid,fid,uid,reportstatus,reason,dateline) VALUES ('1','1261','169','2','49','0','advertising, perhaps?','1243540534');
INSERT INTO mybb_reportedposts (rid,pid,tid,fid,uid,reportstatus,reason,dateline) VALUES ('2','1333','171','3','49','0','rthywrthj','1243760366');
You'll need access to phpMyAdmin to check... you'll need to look in the reportedposts table and find ones that have a report status of 0, or, run this query:

SELECT * FROM `mybb_reportedposts` WHERE `reportstatus` = '0';

Check your table prefix, mybb_ here, first.... if there are any, I personally would make a note of the contents and then delete them, and see if that clears things up, unless someone else has any ideas...

Edit: Just saw your edit, I'll edit again in a minute Toungue

Edit 2: Hmm, na I can't really think what could be causing it, it looks like an issue with a file but you've uploaded modcp.php again already... only other thing that I can think of would be global.php
After a google search, I found T_LNUMBER is just a digit number. So it's saying there's an unexpected number on line 5 of modcp.php. I've checked it and there clearly is not any number, just the mybb copyright / information.

Also, it seems it displays the parse error once for every report. So if I had 5 reports it'd display that error 5 times on the Reports page.
Come on what is wrong with it?