Like the title says..
If I can create a conditional that indicates whether a forum is subscribed to, then I can add an indicator on ForumHome that alloows a user to subscribe/unsubscribe.
I tried adding this code to functions_forumlist.php:
PHP Code:
// %%%%%%%%%%%%%%%%%%%% added code for forum subscriptions %%%%%%%%%%%%%%%%%%%%
$xquery = "SELECT subscribeforumid FROM " . TABLE_PREFIX . "forum AS forum
LEFT JOIN " . TABLE_PREFIX . "subscribeforum AS subscribeforum ON ((subscribeforum.forumid =
forum.forumid) AND (subscribeforum.userid = $bbuserinfo[userid]))";
$forum['subscribed'] = false;
$xsubscriptions = $DB_site->query($xquery);
if ($DB_site->num_rows($xsubscriptions))
{
while ($xsub = $DB_site->fetch_array($xsubscriptions))
{
if ($xsub(subscribeforumid) = $forum[forumid])
{
$forum['subscribed'] = true;
}
}
}
// %%%%%%%%%%%%%%%%% ENd added %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
But it doesnt seem to work, I get a parse error on the 'while' statement.
Anyone have a sugeestions or alternative approaches, I'd appreciate it.
Thx