Welcome to Geeklog, Anonymous Saturday, November 23 2024 @ 02:13 pm EST
Geeklog Forums
Forum Plugin - Can only see forums as Admin user
Chris
Anonymous
Hi All -
Just getting started with Geeklog. I've got Geeklog 1.7.2 and forum 2.7.4.
Forum is installed and as Admin I have setup two categories each with it's own forum and made a post in one of them. The forums have default settings applied to them: Group Access is All Users, the forum isn't hidden or readonly and new posts aren't hidden The site I'm setting up is for a gaming group so most of the content is for registered / logged in users. Therefore in the Forum settings I've set Register - View and Register - Post to Yes. When logged in as a regular user I can't see any links to the forums, no link int he User Functions block, no Forum link in the menu across the top of the page. If I go back and set the Register options to No then my regular user an see the forums. I tried changing one of the forums Group Access to Logged-in Users with the Register options on Yes and still no love. Searches have turned up nothing for me.
I'd really like to have the forums private. Anybody have an idea of what I might be missing?
Just getting started with Geeklog. I've got Geeklog 1.7.2 and forum 2.7.4.
Forum is installed and as Admin I have setup two categories each with it's own forum and made a post in one of them. The forums have default settings applied to them: Group Access is All Users, the forum isn't hidden or readonly and new posts aren't hidden The site I'm setting up is for a gaming group so most of the content is for registered / logged in users. Therefore in the Forum settings I've set Register - View and Register - Post to Yes. When logged in as a regular user I can't see any links to the forums, no link int he User Functions block, no Forum link in the menu across the top of the page. If I go back and set the Register options to No then my regular user an see the forums. I tried changing one of the forums Group Access to Logged-in Users with the Register options on Yes and still no love. Searches have turned up nothing for me.
I'd really like to have the forums private. Anybody have an idea of what I might be missing?
8
10
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
From the source code, it looks like that when you enable "registration required", then only users with the forum.user permission can see the forum links.
So you would have to create a new group with that permission and add all the users who are allowed to see the forum to that group.
bye, Dirk
So you would have to create a new group with that permission and add all the users who are allowed to see the forum to that group.
bye, Dirk
7
9
Quote
Status: offline
Roccivic
Forum User
Moderator
Registered: 05/19/10
Posts: 136
I've looked into the issue a bit and it seems that something is missing from the logic here. If "register - view" is set to yes, it merely hides the links - pointing your browser to the correct URL will still let a logged in user view the forums and post. However anonymous users are shown an error message when trying to access the forums via a direct URL. So why not leave the links there all the time, so that anonymous users will not have an impression that there isn't a forum at all? All this doesn't make sense. Besides I see no real benefit of having the "forum.user" group either, as it would just make the admin's job harder - having to authorise each and every user...
Since we are now maintaining the forum plugin once again, I think that I will file a bug report for this on our new tracker: https://code.google.com/p/geeklog/issues/list. (@Chris: Feel free to beat me at it )
Anyway, Chris, try the following:
navigate to "{geeklog_base_path}/plugins/forum" and open the file "functions.inc"
there find the following snippet of code:
* Returns the items for this plugin that should appear on the main menu
*/
function plugin_getmenuitems_forum()
{
global $CONF_FORUM,$_CONF,$LANG_GF00;
if ($CONF_FORUM['registration_required'] == 0 || SEC_hasRights('forum.user')) {
$menuitems["{$LANG_GF00['pluginlabel']}"] = "{$_CONF['site_url']}/forum/index.php";
return $menuitems;
}
}
and change it to:
* Returns the items for this plugin that should appear on the main menu
*/
function plugin_getmenuitems_forum()
{
global $CONF_FORUM,$_CONF,$LANG_GF00;
$menuitems["{$LANG_GF00['pluginlabel']}"] = "{$_CONF['site_url']}/forum/index.php";
return $menuitems;
}
Then find this other snippet of code:
* Returns the user menuitem option for this plugin
* Only one menu item can be returned.
*/
function plugin_getuseroption_forum()
{
global $CONF_FORUM, $_CONF, $LANG_GF00;
if ($CONF_FORUM['registration_required'] == 0 || SEC_hasRights('forum.user')) {
return array($LANG_GF00['useradminmenu'], $_CONF['site_url'] . '/forum/userprefs.php', 0);
}
}
and change it to:
* Returns the user menuitem option for this plugin
* Only one menu item can be returned.
*/
function plugin_getuseroption_forum()
{
global $CONF_FORUM, $_CONF, $LANG_GF00;
if ($CONF_FORUM['registration_required'] == 0 || !COM_isAnonUser()) {
return array($LANG_GF00['useradminmenu'], $_CONF['site_url'] . '/forum/userprefs.php', 0);
}
}
IMO you will find that this will give the forum the behavior that you require, but keep in mind that you will lose these changes whenever upgrading to the next version (if we won't have this issue fixed by then).
Rouslan
Since we are now maintaining the forum plugin once again, I think that I will file a bug report for this on our new tracker: https://code.google.com/p/geeklog/issues/list. (@Chris: Feel free to beat me at it )
Anyway, Chris, try the following:
navigate to "{geeklog_base_path}/plugins/forum" and open the file "functions.inc"
there find the following snippet of code:
Text Formatted Code
/*** Returns the items for this plugin that should appear on the main menu
*/
function plugin_getmenuitems_forum()
{
global $CONF_FORUM,$_CONF,$LANG_GF00;
if ($CONF_FORUM['registration_required'] == 0 || SEC_hasRights('forum.user')) {
$menuitems["{$LANG_GF00['pluginlabel']}"] = "{$_CONF['site_url']}/forum/index.php";
return $menuitems;
}
}
and change it to:
Text Formatted Code
/*** Returns the items for this plugin that should appear on the main menu
*/
function plugin_getmenuitems_forum()
{
global $CONF_FORUM,$_CONF,$LANG_GF00;
$menuitems["{$LANG_GF00['pluginlabel']}"] = "{$_CONF['site_url']}/forum/index.php";
return $menuitems;
}
Then find this other snippet of code:
Text Formatted Code
/*** Returns the user menuitem option for this plugin
* Only one menu item can be returned.
*/
function plugin_getuseroption_forum()
{
global $CONF_FORUM, $_CONF, $LANG_GF00;
if ($CONF_FORUM['registration_required'] == 0 || SEC_hasRights('forum.user')) {
return array($LANG_GF00['useradminmenu'], $_CONF['site_url'] . '/forum/userprefs.php', 0);
}
}
and change it to:
Text Formatted Code
/*** Returns the user menuitem option for this plugin
* Only one menu item can be returned.
*/
function plugin_getuseroption_forum()
{
global $CONF_FORUM, $_CONF, $LANG_GF00;
if ($CONF_FORUM['registration_required'] == 0 || !COM_isAnonUser()) {
return array($LANG_GF00['useradminmenu'], $_CONF['site_url'] . '/forum/userprefs.php', 0);
}
}
IMO you will find that this will give the forum the behavior that you require, but keep in mind that you will lose these changes whenever upgrading to the next version (if we won't have this issue fixed by then).
Rouslan
9
12
Quote
Status: offline
Laugh
Site Admin
Admin
Registered: 09/27/05
Posts: 1470
Location:Canada
To automate the process of allowing all users to post and view in the forum your could create a forum user group and make it the Default Group for new users and add the forum.user right to it (and any other groups or rights you want).
One of the Geeklog Core Developers.
One of the Geeklog Core Developers.
11
13
Quote
Status: offline
Roccivic_
Forum User
Newbie
Registered: 04/25/11
Posts: 4
Location:Cork
Quote by: Laugh
To automate the process of allowing all users to post and view in the forum your could create a forum user group and make it the Default Group for new users and add the forum.user right to it (and any other groups or rights you want).
IMO that's kind of pointless. Why go through the trouble of setting up a default group for forum users, when you can just show show an error message to anonymous users (which is already implemented)? I'm thinking about canning the 'forum.user' group altogether, but that a discussion for the forum-dev mailing list....
Rouslan
9
10
Quote
Chris
Anonymous
Hi all. Thanks very much for the replies and suggestions, it's working now.
For the sake of time which I'm a bit short on this morning I created a new group named "ForumUser", added the forum.user right to it and made it a default group. That tested fine and is what I'm going to roll with for now. Dirk, Laugh, thank you.
Rouslan - Overall I agree with you, the way the links disappear with 'Register - View' turned on doesn't make sense. To add to it a registered user visiting the site before they sign in will the see the forum posts block only to have all traces of the forum disappear when they sign in, unless they click a link in the forum posts block and sign in from the error page that comes up. It's silly. When I have more time this evening I'll make the code changes you suggested, test and report back. I'll also submit a bug report. It's going to be after 8 before I can get back to it though and I'm GMT-5.
Again, thanks all for the suggestions. I like it when there are multiple solutions to an issue!
For the sake of time which I'm a bit short on this morning I created a new group named "ForumUser", added the forum.user right to it and made it a default group. That tested fine and is what I'm going to roll with for now. Dirk, Laugh, thank you.
Rouslan - Overall I agree with you, the way the links disappear with 'Register - View' turned on doesn't make sense. To add to it a registered user visiting the site before they sign in will the see the forum posts block only to have all traces of the forum disappear when they sign in, unless they click a link in the forum posts block and sign in from the error page that comes up. It's silly. When I have more time this evening I'll make the code changes you suggested, test and report back. I'll also submit a bug report. It's going to be after 8 before I can get back to it though and I'm GMT-5.
Again, thanks all for the suggestions. I like it when there are multiple solutions to an issue!
13
12
Quote
Chris
Anonymous
@Rouslan
I made the code changes you suggested, made sure that 'Register - View' was set to Yes and ensured I signed in with a user that does not have the forum.user right. That user was able to see the forum links as desired.
Also I need to retract my statement:
That's not at all what happens and I have no idea what I might have confused in my head to come up with that. Using the login link from the error message returned to anonymous users drops you at the front page.
Thanks all for your help today!
I made the code changes you suggested, made sure that 'Register - View' was set to Yes and ensured I signed in with a user that does not have the forum.user right. That user was able to see the forum links as desired.
Also I need to retract my statement:
To add to it a registered user visiting the site before they sign in will the see the forum posts block only to have all traces of the forum disappear when they sign in, unless they click a link in the forum posts block and sign in from the error page that comes up. It's silly.
That's not at all what happens and I have no idea what I might have confused in my head to come up with that. Using the login link from the error message returned to anonymous users drops you at the front page.
Thanks all for your help today!
7
9
Quote
All times are EST. The time is now 02:13 pm.
- Normal Topic
- Sticky Topic
- Locked Topic
- New Post
- Sticky Topic W/ New Post
- Locked Topic W/ New Post
- View Anonymous Posts
- Able to post
- Filtered HTML Allowed
- Censored Content