Loading...
 
Features / Usability

Features / Usability


Re: Hiding forums for regular users

posts: 8316 Israel

Here is my modification right into /templates/tiki-forums.tpl

As forum don't allow html tag i can't put the complete code so a little work... :-)

From line 51 to set the yes/no condition

{if ($channels[user].individual eq 'n') or ($tiki_p_admin eq 'y') or ($channels[user].individual_tiki_p_forum_read eq 'y')}
{else}


Then from line 54 to show the unthorized message.

"html tag" - img src="img/notforyoureyes.gif" alt="{tr}no acces{/tr}" align="absmiddle" - "html tag" {tr}You don't have proper right to view this discussion.{/tr}{/if}



Then from line 59 for to hide the descritpion if needed

{if ($forum_list_desc eq 'y') and (($channels[user].individual_tiki_p_forum_read eq 'y') or ($channels[user].individual eq 'n'))}
{$channels[user].description|truncate:240:"...":true}{/if}


And

From line 73 to hide the last post

{if ($forum_list_lastpost eq 'y') and (($channels[user].individual_tiki_p_forum_read eq 'y') or ($channels[user].individual eq 'n'))}


That way, instead of showing the discussion to a none authorized user it show a .gif and some text. It also prevent to show description and last post.

Apply the same rules to the modules (last forums posts) look far more tricky...confused

Hope this help...
Yoni