Closed (won't fix)
Project:
Advanced Forum
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Jun 2008 at 23:34 UTC
Updated:
26 Apr 2011 at 16:28 UTC
Jump to comment: Most recent file
Comments
Comment #1
michelleNo, 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
Comment #2
madwalo commentedoh 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
Comment #3
madwalo commentedwell 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
Comment #4
michelleMoving this to the to do list.
Michelle
Comment #5
michelleWill revisit this in 2.x.
Michelle
Comment #6
George2 commentedhere'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.
Comment #7
michelleThanks 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
Comment #8
George2 commentedwell according to system.install, you just need to directly update the permission rows for each role with the new permission which is trivial.
Comment #9
michelleTrivial, 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
Comment #10
michelleComment #11
webchickThere 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.
Comment #12
michelleThanks, webchick. :)
Michelle
Comment #13
George2 commentedwebchick, 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.
Comment #14
jaron commentedI 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.
Comment #15
RAFA3L commentedSuscribe
Comment #16
michelleThis 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
Comment #17
netentropy commentedI 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.
Comment #18
michelleThe status is postponed. If you look at all those boxes right above the comment form, the status is the last one listed.
Michelle
Comment #19
vladgur commentedIve used the patch suggestion above and simply used my own module to alter forms in question:
I reused 'administer forums' permission. note that I created a new content type 'forum_comment' to be used by nodecomments as comments for my forum, hence the name of the second form('forum_comment_node_form'). Your comment form may be called differently.
I also wanted to hide shadow copy stuff.
code updated to account for editing/creating comments/topic
Furthermore, i generate breadcrumbs based on node taxonomy in the template.php, so the user can tell where he is currently located.
Comment #20
vladgur commentedComment #21
snupo commentedvladgur: so, how to use the code you posted? (in newbie terms I mean)
regards
Comment #22
vladgur commentedyou create your own module and put this function in there.
Comment #23
boran commented@vlagur: This would not work for me with D6, The error on submission is
"An illegal choice has been detected. Please contact the site administrator"
Watchdoc shows "Illegal choice 25 in taxonomy element."
Now 25 is the correct $forumid.
Reviewing the code, what is this line for?
$default_term=$form['taxonomy'][$vocab]['#default_value'][0];
I also tried setting
'#default_value' => array($forumid),
since dsm showed me that this usually an array.
No good eother "warning: preg_match() expects parameter 2 to be string"
The default_value value is important to ensure the posted it attributed to the correct forum.
That is why "$form['taxonomy']['#access'] = false;" is insufficient.
Also tried "$form['taxonomy']['#type'] = 'hidden';", which allowed a post to be created but was not visible in the forum..
Comment #24
pumpkinkid commentedThe default_value value is important to ensure the posted it attributed to the correct forum.
That is why "$form['taxonomy']['#access'] = false;" is insufficient.
Also tried "$form['taxonomy']['#type'] = 'hidden';", which allowed a post to be created but was not visible in the forum..
This is exactly what I am seeing.... I had to do a display none, but we all know that's just a hack!
Also, I should probably mention, that this is happening on a site that is not using advanced forums as well, so the issue is likely not with anything Advanced forum is doing...
Comment #25
michelleI'm not going to be doing this one in 2.x. It will likely happen in 7.x-3.x but in such a different way that this issue will be irrelevant.
Michelle