Is it possible to display more than one forums posts on the portal?
when I do that I get the following error:
Parse error: syntax error, unexpected T_VARIABLE in /home/**/**/forums/portal.php on line 106
Line 106 is:
Code:
$query�=�$db->query("SELECT�COUNT(tid)�AS�newann�FROM�".TABLE_PREFIX."threads�WHERE�dateline>'".$mybb->user['lastvisit']."'�AND�fid�IN�(".$mybb->settings['portal_announcementsfid'].")�$unviewwhere");
Check that you didn't leave out a ; at the end of line 105
Can you post from about line 100-110?
$query = $db->query("SELECT COUNT(pid) AS newposts FROM ".TABLE_PREFIX."posts WHERE dateline>'".$mybb->user['lastvisit']."' $unviewwhere");
$newposts = $db->result($query, 0);
if($newposts)
{ // if there aren't any new posts, there is no point in wasting two more queries
$query = $db->query("SELECT COUNT(tid) AS newthreads FROM ".TABLE_PREFIX."threads WHERE dateline>'".$mybb->user['lastvisit']."' $unviewwhere");
$newthreads = $db->result($query, 0);
$query = $db->query("SELECT COUNT(tid) AS newann FROM ".TABLE_PREFIX."threads WHERE dateline>'".$mybb->user['lastvisit']."' AND fid='".$mybb->settings['portal_announcementsfid']."' $unviewwhere");
$newann = $db->result($query, 0);
if(!$newthreads) { $newthreads = 0; }
if(!$newann) { $newann = 0; }
}
Try reuploading it. The snippet of code seems fine, either that or I'm blind.
I have tried it several times.