I am putting together a forum for Health Disease and Conditions. I created a "container" for each condition.
The problem is, that on the forum page, right under the container, it says "post new forum topic." This is a bit confusing because to the casual user, that link implies you can post a sub topic to the Container -- especially because the the Forum dropdown menu on the form defaults to the Container Name (e.g., Diabetes), but if you try to do so, an error appears that says you can't post a topic to a container.
So for example:
1) Container = Diabetes
- Post a New Forum Topic (this link appears on the template)
a) Forum 1= Newly Diagnose
b) Forum 2= Recipes
c) etc.
I then try a different approach, which is to use *no* containers as follows:
2) Forum = Diabetes
- Post a New Forum Topic (this link appears on the template)
a) Forum Topic 1 = Newly Diagnosed
b) Forum Topic 2 = Recipes
Approach number 2 seems to work better from a front-end usability perspective, but I want to make sure I'm not missing something before I build out the entire taxonomy of Forum and Topics.
QUESTIONS:
1) What do I lose by not starting with a container?
2) If I do use solution one in the above example (with Containers), how do I remove the initial "Post a Forum Topic" link on the main container page? If I do that, then Users would go into a forum topic first, and then get the Post a New Forum Topic, and the forum will default to Diabetes, and they can also select sub-topics such as Recipes.
Comments
Same problem... looking for solution?
Looking for a way to do the same thing.
Also, how to make one Forum allow replies, but not start a new thread, yet allow other forums to have this ability. Still researching. Will post back here if I find the answer(s).
-=thevisualsense.com=-
Any solution?
Has anyone brought up a way to do this?
-=tvswebserver.com=-
Edit forum.module
*NOTE* your editing a drupal core file. :-/
line added : if (count($parents) > 1) {
-s
This works great on Drupal 5.5
Thanks so much for this fix!
It's not a good idea to hack
It's not a good idea to hack the core. Instead copy the entire function that this line is in (i.e. theme_forum_display), paste it into your template.php file located in your theme folder, then rename the function to _forum_display. Then apply the edits that simplymenotu suggests.
Now when you update drupal you don't have to go back and fix the forum.module file and you know where all your changes are at.
Thanks simpymenotu, it's what I was looking for to clean up the forum.
Shane
BWCA
Thanks Spydor for helping us
Thanks Spydor for helping us develop in the Drupal way.
No effect...
Forgive me, I'm neither a themer nor a developer (yet), just a humble content manager. I tried putting this at the end of my template.php:
It didn't do anything. It didn't break the site either, which is nice. What am I doing wrong?
___
Drupal is a perfectly cromulent word.
This works but only if the
This works but only if the forum is at the 2d level, in a container which is at the 1st level on the forums page.
This seems to work for all levels in D5
I haven't super-tested it though, so YMMV.
Override the forums template
Here's another way (tested on Drupal 6.1 only):
1. Copy the forums.tpl.php file from the forum module folder into your theme folder
2. Change the line that says
to
3. Save the file and clear the cache
Basically, this template checks that the topics are listed before rendering the 'Post a new topic' link. If you're viewing the container, $topics will not be set, so the link won't render.
Copying the forums.tpl.php file to your template folder ensures that future Drupal upgrades do not interfere with your amendments, because you're not modifying core files.
Hope that helps.
Farez
subscribing
subscribing
subscribing
subscribing
php forum, how to disable posting of new topic for not logged in
Hi, my web designer made me a site with forum, I am an admin, but whoever visits the forum page can post NEWTOPIC, without even logging in. So as to prevent spammers.
Can someone please help me with disabling that feature from the admin side.
Thanks
Good tip...
thanks Farez, works great!
Farez - Thank you for this
Farez - Thank you for this snippet! Works like a charm, and simple.
Worked in my 6.16. Thanks,
Worked in my 6.16. Thanks, Farez.
Great post Farez. Thanks!
Great post Farez. Thanks!
Anyone have any idea how to
Anyone have any idea how to get this to work on D7?
Drupal 7
Same problem with Drupal 7.
I know I could modify or override the forum methods, but it MUST be a frequently requested feature to disable this link and its action.
[edit] : I removed my container, just to try, and to have only a list of forums in /forum.
But it still displays this link, so anyone can post at the root of the forum tree ! I really don't understand the reason of this useless and mandatory feature.
Someone please ?
Thanks in advance,
Pitt
I found a fix for D7
Go to forum.module and change
if ($root_path == 'forum' || $root_path == 'forum/%') {
On line 168 to
if ($root_path == 'forum/%') {
That worked for me. Does anyone see a problem with that?
Other than having to re-do
Other than having to re-do that change every time there is an update? no...
Updated forum.module Function
That would only hide the action link from the root /forum listing. In order to hide the link on container listings, as well, you're also going to have to do a check to see if the current
$forum_termis a container.Below is an updated
forum_menu_local_tasks_alter()that will achieve the desired result. Unfortunately, this change will be lost any time Drupal is updated. This change would ideally be merged into forum.module by a Drupal developer.For D7: add the following to
For D7: add the following to your theme template.php.
why is this still a problem
This is great. It needs to be written into core imho. The forum should really work out of the box! I feel like it's been neglected and there hasn't been any improvement since d5 or d6.
contributed module
Also, i don't think i should have to add a contributed module (taxonomy access control) in order to allow users to post topics. Without this feature, core forum is essentially broken. i don't mean to sound ungrateful to the developers; it's a great module and i'm using it a LOT, so thank you! I'm just saying there is clearly still work to do on the core module, and the fixes seem simple enough that they could easily be implemented by D7.9.
Thanks for this. It clears up
Thanks for this. It clears up the problem, but now my site is throwing this error: "Notice: Undefined property: stdClass::$container" Any ideas on how to fix it?
Thanks..
its work..!! subscribe!!
I need the forum containers
I need the forum containers but wish they weren’t part of the add new topic. When adding a new topic it’s confusing for people. This should be fixed.
Wish this was fixed in Drupal 9