Hide drop down forum list from non admins
madwalo - June 11, 2008 - 23:34
| Project: | Advanced Forum |
| Version: | 6.x-2.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Description
When i want to create new content, i can go to Create new content->Forum Topic, so is logical that i can select the forum i will post my topic.
But when user is going to add topic to a forum where user is placed, user can get confused about the forum so , i want to hide select list in the post topic form.
have the Advanced Forum that option?
thanks

#1
No, it isn't. It's a reasonable feature request but will need some thought. You don't want to hide it from moderators, for instance. So it would have to be role based or permission based of some sort.
Michelle
#2
oh yes you are right, so it comes a bit complicated so, you depend of current path and permissions, i know a lot of things have to be done first so i'll be patient
many thanks
#3
well i've hidden the list using formfilter this may be a solution, the problem is that it hide the list from both referer pages
http://drupal.org/project/formfilter
#4
Moving this to the to do list.
Michelle
#5
Will revisit this in 2.x.
Michelle
#6
here's a patch for you. when patched, a new permission will be added that will allow roles to see the forum selector when a forum id is passed upon a new topic creation.
in the OP usecase scenario, when "create content > new forum" topic is clicked, the forum selector will show regardless of the permission setting, but when new topic is clicked, the select input becomes a hidden form element.
#7
Thanks for the patched. As I said on IRC, though, this won't go in 1.x so it's still postponed. Also still need to figure out how to prevent it from hiding the selector by default. Given the IRC discussion, I guess it will need to be combined with a master setting to turn it on.
Michelle
#8
well according to system.install, you just need to directly update the permission rows for each role with the new permission which is trivial.
#9
Trivial, maybe, but icky. And what happens when they add new roles? I don't like that idea at all. I'd rather have a master switch to turn it on and then have permissions work normally at that point.
Michelle
#10
#11
There are a few things wrong with this approach, imo...
a) It hard-codes the forum's vocabulary as '1'. It should use variable_get('forum_nav_vocabulary', '')
b) It creates a new permission for viewing the selection box when we could easily re-use "administer nodes" or a similar, already-existing "smarter than the average bear" permission.
c) It assumes that forum topics are the only things that will ever be posted to forums. As of Drupal 6, any content type is allowed to be posted to the forum.
However, I used the basis of this patch to fix this same issue in DruBB, which you can find at #472672: form_alter() out the forum selection widget from post form if you're curious.
#12
Thanks, webchick. :)
Michelle
#13
webchick, thanks. though,
a) i repeatedly asked in #drupal about this problem over a few days as what i did seemed VERY dirty. i got no answer at all, so i did what i could to solve the problem in the time i wanted to spend on it.
b) i disagree.
c) excellent, if only that was widely known.
#14
I tried adding the patch and though the permissions come up, selecting them doesn't actually hide the drop down field. Am I missing something? I see there is some debate as to whether or not this should exist but it is exactly what I'm looking for. Is the patch posted here still the one to use, or is there another way to achieve the same functionality?
Thanks.
#15
Suscribe
#16
This is going to hang out in the drubb project for now and will possibly become part of the upcoming moderation module rather than AF.
Michelle
#17
I am just curious on the status of this.
It has always seemed sort of odd to me that Drupal's forum module handles the selection of forums this way.
#18
The status is postponed. If you look at all those boxes right above the comment form, the status is the last one listed.
Michelle