Tried a few threads, no luck in changing "New Discussion" to "Ask a Question". Running 2.1
I'm trying to change the default button from "New Discussion" to "Ask A question"
I've tried this: http://vanillaforums.org/discussion/21975/how-to-force-ask-a-question-instead-of-new-discussion
But it didn't change much. The biggest change or closest I got to the solution was this:
you also probably want to add this to one of your locale definitions files, or plugins/QnA/locale/en-CA.php or conf/locale.php
$Definition['Start a New Discussion'] = 'Ask a Question';
But all that did was change the button text to "Ask a Question" but the link still takes you to new discussion also the dropdown ended up having 2 "Ask a Question" options.
I just wanted the button to default to "Ask a Question" and the down arrow offering the option to click "New Discussion"
Is this possible on self hosting?h
Best Answers
-
mcu_hq ✭✭✭
No, I didn't. See above for the posted solution. If someone could edit that post to make it seem legible, that would be greaaat. Not sure why our editor here is always seems to do that.
Don't use the mangled code above, just use the code in this link:
6 -
hydn New
Made it look like the others and it works:
$Configuration['Vanilla']['DefaultNewButton'] = 'post/question';
5
Answers
My only prob now is that there now style for the buttons. See screenshot...
How do I make those into buttons? Is there something I can add to customs.css
Edit: This is for a related alterative fix for this topic here: http://vanillaforums.org/discussion/comment/161856/
Edit: further testing showed that simply changing the view caused problems when editing existing.
Ok, here is my solution:
Did you reply to the wrong thread maybe?
No, I didn't. See above for the posted solution. If someone could edit that post to make it seem legible, that would be greaaat. Not sure why our editor here is always seems to do that.
Don't use the mangled code above, just use the code in this link:
http://pastebin.com/cuxmr1Zg
You like the improvement?
There was an error rendering this rich post.
Thank you. I did get it to work but my only problem is that there's no style/buttons.
Problem:
On domain.com/post/discussion/ the option show as text as if there's no CSS style. Where can I add the style? custom.css? I'm using v2.1 beta.
In my style.css there's no class "QnAButton TabLink"
Click the image below you see the post options show as plain text instead of active and inactive buttons.
thanks
You would edit the plugin's style for that , if it does not have a style sheet you could just add one. A link to the problem would be helpful and more efficient .
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
I upgraded to this version:
https://github.com/vanillaforums/Addons/tree/release/2.1b1/plugins/QnA
It does not have any option to switch back and forth on the post page. So no need for buttons.
Looks a lot like whats used here in this forum
The name of the class for the buttons is a.BigButton.NewDiscussion or
a.QnAButton.TabLink, you can add style to them via the custom.css I believe.
echo Anchor(T('Ask a Question'), '/post/discussion?Type=Question', 'BigButton NewDiscussion');
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
In your config.php, set Vanilla.DefaultNewButton = "post/question"
I tried
Vanilla.DefaultNewButton = "post/question"
but it breaks forum with:
Parse error: syntax error, unexpected '=' in /html/conf/config.php on line 116
Made it look like the others and it works:
$Configuration['Vanilla']['DefaultNewButton'] = 'post/question';
Yes, "Vanilla.DefaultNewButton" is just shorthand, not what you paste into the config.
Ok now that the "ask a question" is now default in the left column. How do I insert an image between the button and the start of the category list?
thx