Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: CPG Simple Forum (forum): v2.1 BETA - Hide Menu-Link in SYS_MENU for unregisterd  (Read 7235 times)

0 Members and 1 Guest are viewing this topic.

stvis

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

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
Logged

stvis

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

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

Logged

stvis

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

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...
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

I think I'll implement that feature in the next forum version. Thanks for your suggestion :)
Logged

stvis

  • Coppermine newbie
  • Offline Offline
  • Posts: 7

Thank you for your support !  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 19 queries.