Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+1 vote
1.6k views
in Q2A Core by
edited by

With NoahY quick response, I was able to develop the plugin. Check it at https://github.com/bahar/qa_text_before_ask and let me know your feedback.

 

I have setup Q2A for our company support desk. Its working great.

Most of the users are not tech savyy and are posting same questions often. I was looking for a hack/plugin to show some guideline, procedure when user wants to ask a question (before redirecting user to the question asking page).

Like the one available in http://stackoverflow.com/questions/ask

 

I am good at PHP, but very new to Q2A. If some can give me some pointers on implementing this as a plugin, it will be great.

 

Sure, I will share the plugin.

 

Thanks,

Q2A version: 1.4.3

1 Answer

0 votes
by
Welcome :)

I think a widget would accomplish this on a basic level:

http://www.question2answer.org/modules.php#widget

You can use the bundled activity-count-widget as a template, then just use the following to show only on the ask form:

        function allow_template($template)
        {
            return $template=='ask';
        }

To get the widget to change according to the focused element, as in SO, just use the jQuery .focus(), I think.
by
Thanks a lot for fixing it :)

I have merged the fix.
by
A new problem. The category drop down isn't loading the categories after uploading the patched files.
by
Thanks, its working now.
...