Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Disable 'start your dicussion' button until appropriate category select.
Vaz
New
Hi guys,
I had a really big problem before where members would type in a message and click start discussion but forget to put it in the correct category.
Then I made a little change by adding ==please select category== as the top option for the drop down. It changed things around but sometimes people still forget to change that and end up hitting start your discussion which leads to a 404 page. When they click back in order to select the correct category there initial typing vanishes.
Perhaps this could be solved by have some sort of a disabled 'start your discussion' button until a category other than == please select bla bla bla == is set?
0
This discussion has been closed.
Comments
It comes up with "You must select a category for this discussion."
I can't remember what I did but I do remember it was a very simple fix.
Sorry can't tell you more right now until I get off this PC and home to my Mac.
Wanderer's one line code does the job.
I guess this should be added to the vanilla core.
Locate this file...
Library/Vanilla/Vanilla.Control.DiscussionForm.php
insert after line 220 (inside GetDiscussionForm, just before the while loop):
$cs->AddOption(0, 'Please select a category:');
Posted: Monday, 8 October 2007 at 7:53PM
Great! It almost works but is subverted if you use the previewpost add-on, as this button is not hidden.
Trying to post via the 'submit comment' button in the preview pane results in an error.
Personally, I think there's a UI-flaw with dimming the button - I see users complaining that "the button doesn't work" and giving up. IMHO a better and less confusing way would be to follow the existing scheme for error feedback. I'd rather the discussion button was visible, but that the error notice appears with "please choose a category", when no category is selected. Of course the user's text should not be lost and it should also appear if clicking 'submit comment' in the previewpost add-on. It's a quick reminder which doesn't stump newbie-users.
You can click "back" but the start discussion button is no longer clickable - it says "wait".
Posted: Monday, 8 October 2007 at 9:33PM
So the key was to use 0 or '' as the value. If you do that then it spits out an error message
Some problems were encountered
You must select a category for this discussion
I chanced upon this thread on the Attachments add-on and that seems to be the problem. If I disable the attachments add-on I receive the correct error message.
You wouldn't happen to care to look at why the proposed fix for attachments isn't working? That would be wonderful...
Has some one got this working with the attachments extension? I'm getting the problem where members keep starting discussions in the top category =/