forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: stvis on August 23, 2010, 06:10:11 pm

Title: CPG Simple Forum (forum): v2.1 BETA - Hide Menu-Link in SYS_MENU for unregisterd
Post by: stvis on August 23, 2010, 06:10:11 pm
Hello,
I've tested the FinalExtract-Plugin for this, but unfortunately it doesn't work...
Is there a way for hiding teh "Forum" Menu-Link from SYS_MENU, if the User isn't loged in?

Thanks,
Thomas
Title: Re: CPG Simple Forum (forum): v2.1 BETA - Hide Menu-Link in SYS_MENU for unregisterd
Post by: stvis on August 24, 2010, 08:36:53 pm
Hi,
i figured it out by myself... If someone needs to hide the "Forum"-Link for all users that are not logged in maybe this might help:

1. go to /plugins/forum/codebase.php

2. at line 63 replace the code:

codebase_sys_user_button('forum.php', $lang['fr'], '', $lang['fr']);

with following:

if (USER_ID && $CONFIG['allow_unlogged_access'] == 0) {
codebase_sys_user_button('forum.php', $lang['fr'], '', $lang['fr']);
}

(May be this is a "dirty hack", but i'm no professional... It works fine for me...)

Thomas

Title: Re: CPG Simple Forum (forum): v2.1 BETA - Hide Menu-Link in SYS_MENU for unregisterd
Post by: stvis on August 24, 2010, 08:57:25 pm
I'm sorry for the dilettantism...  :'(

May be its better to replace by this code:

if (USER_ID || $CONFIG['allow_unlogged_access'] != 0) {
    codebase_sys_user_button('forum.php', $lang['fr'], '', $lang['fr']);
}

Because the version above will not work for the "allow unlogged access" configuration...
Title: Re: CPG Simple Forum (forum): v2.1 BETA - Hide Menu-Link in SYS_MENU for unregisterd
Post by: Αndré on September 01, 2010, 03:31:08 pm
I think I'll implement that feature in the next forum version. Thanks for your suggestion :)
Title: Re: CPG Simple Forum (forum): v2.1 BETA - Hide Menu-Link in SYS_MENU for unregisterd
Post by: stvis on September 01, 2010, 10:03:24 pm
Thank you for your support !  :)