You could probably hide the pulldown using CSS?
@johnhiler
Is there any way of doing this beside using a CSS “display: none”. Seems like a hack way of working around this.
It shouldn’t show when there is only one forum. I’ll fix this in core.
Heh, Sam. It’s been like that since the 0.7 series I think. I’ve only ever had one forum, but it always showed the dropdown I used to fix it but them maintaining the changes across updates became a hassle.
Also, the width of the dropdown was never wide enough, in FF3 (and FF2) at least. Never really tested it. I can’t recall if it was fixable with CSS or if that width was in the template. I think in the template with a width=”xx” value.
Was going to take a screenshot just now, but I realized I took the select out in my installation, so people don’t have to choose, and hardcoded the value into the form. BUT, there is still a dropdown with just one value (if you have just one forum) when you’re logged in as keymaster and you have the option to move the topic to another forum. Probably shouldn’t even show the option to move it to another forum if there’s only one.
Weird that this is just coming up now. I always just thought it was normal.
Frooyo, to answer your question, you can remove that dropdown as you did, but first you need to add the forum name as hidden value to the form. You can look at the source of a rendered page, find the select, grab the form field name and value, and just code that into the form as a hidden value. That way, when you submit the form, it looks the same to bbPress as if someone had actually selected one (of one) value for a forum name.
Mine looks like this (your forum ID might be different):
<input type="hidden" name="forum_id" value="1" />
Trunk now deals with this case.
[2286] [2287]
@Sam
Thanks for the 1.0 release !!!
Quick question. I don’t believe what you changed in the core is still the desired result.
I only have 1 forum, and that forum is called = “All”.
I have the following code in my post-form.php template
<label for=”forum_id”>Category:
<?php bb_new_topic_forum_dropdown(); ?>
</label>
It’s printing/echoing to the screen the forum name (“All”) –> see image below
http://img22.imageshack.us/img22/4105/categoryy.png
The generated HTML is:
<label for=”forum_id”>Category:
<input type=”hidden” name=”forum_id” id=”forum-id” value=”1″ /><span>All</span> </label>
It seems to me that if someone only has 1 forum, that you should simply have the hidden input and NOT print the forum name in any SPAN element at all.
Do you agree?
I think at this point I would just hide the display with CSS (I think Sam added a class for this select area too). This is much better than it was, for sure. It’s a valid point though.