';
}
//check if this user is already subscribed to this topic but only if subscriptions are allowed
if ($fbConfig->allowsubscriptions == 1)
{
if ($id == 0) {
$fb_thread = -1;
}
else
{
$kunena_db->setQuery("SELECT thread FROM #__fb_messages WHERE id='{$id}'");
$fb_thread = $kunena_db->loadResult();
}
$kunena_db->setQuery("SELECT thread FROM #__fb_subscriptions WHERE userid='{$kunena_my->id}' AND thread='{$fb_thread}'");
$fb_subscribed = $kunena_db->loadResult();
if ($fb_subscribed == "" || $id == 0) {
$fb_cansubscribe = 1;
}
else {
$fb_cansubscribe = 0;
}
}
?>