Quote:
Originally Posted by Boofo
@ Atakan KOC - Is there any way to add permissions to this so only the links that are viewable to the viewing user are displayed?
|
Here you go, Boofo. Here's two versions, both tested on 3.6.8.
Both show links based on what the user has permission to see.
product-falf-perms-all.xml shows the archive links to all users, while
product-falf-perms.xml only shows the links to guests (group 1).
*Both products now also include the photoplog fix*
You'll need to uninstall Atakan KOC's original product before installing either of these.
Basically, for the permissions part, I changed:
Code:
foreach ($vbulletin->forumcache AS $forum)
{
$forum_sira[$forum['forumid']] = $forum['forumid'];
}
to:
Code:
foreach ($vbulletin->forumcache AS $forum)
{
$forumpermas = $vbulletin->userinfo['forumpermissions'][$forum['forumid']];
if (($forumpermas & $vbulletin->bf_ugp_forumpermissions['canview']) OR ($forumpermas & $vbulletin->bf_ugp_forumpermissions['canviewthreads']) OR ($forumpermas & $vbulletin->bf_ugp_forumpermissions['canviewothers']))
{
$forum_sira[$forum['forumid']] = $forum['forumid'];
}
}