Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+5 votes
in Plugins by
edited by

If I needed to search a blobid or a certain group of words etc. it was inconvenient to go to phpmyadmin, open table qa_posts click on "Search", click on input field content, enter the text I was searching, changing the option bar to "LIKE %%" hitting okay, getting the postid, finding the postid as a post ... bla.

So I finally wrote a special search plugin for admins and developers (ajax based):

plugin preview


Question2Answer Plugin: Find Text in Posts



This is a plugin for Question2Answer that finds any text in all posts and displays post creator, URL and content.



  1. Install Question2Answer if you haven't already.
  2. Get the source code for this plugin directly from github or from the q2apro plugin page.
  3. Extract the files.
  4. Optional: Change language strings in file q2apro-find-text-posts-lang.php
  5. Upload the files to a subfolder called q2apro-find-text-posts inside the qa-plugin folder of your Q2A installation.
  6. Navigate to your site, go to Admin -> Plugins. Check if the plugin "Find Text in Posts" is listed.
  7. Navigate to yourq2asite.com/findtext. From there you can start searching.



  1. Go to yourq2asite.com/findtext
  2. Insert the word or text into the input field.
  3. Click the "Find now" button, done!



This is beta code. It is probably okay for production environments, but may not work exactly as expected. You bear the risk. Refunds will not be given!

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.



All code herein is OpenSource. Feel free to build upon it and share with the world.


About q2a

Question2Answer is a free and open source PHP software for Q&A sites.


Final Note

If you use the plugin:

  • Consider joining the Question2Answer forum, answer some questions or write your own plugin!
  • You can use the code of this plugin to learn more about q2a-plugins. It is commented code.
  • Visit q2apro.com to get more free and premium plugins.
What great timing you have!  I am making a to-do list for my new adventure in q2a, and this was on it.  Can't thank you enough for taking the time to write this!
you are welcome :)
Just passing by. Saw the word OpenSource linking to the GPLv3 license. Here is an interesting link by the author of the GPL license: http://www.gnu.org/philosophy/open-source-misses-the-point.en.html
Can you break it down? Do I really need to read those 5 pages? Thanks :)

2 Answers

0 votes

For users you can use? The widget can be displayed on any page of the website of the search form? The tag search is not working?

1. It is not a widget, it is an extra page.
2. It is intended for admins only.
3. Find Text in "Posts", not tags.
If file q2apro-find-text-posts-page to remove the following lines:

// return if not admin level
if ($level<QA_USER_LEVEL_ADMIN) {
$qa_content = qa_content_prepare();
$qa_content['custom'] = '<p>'.qa_lang('q2apro_find_text_posts_lang/not_allowed').'</p>';
return $qa_content;
0 votes
Thanks, really usefull. Small suggestion: link in admin section, submenu.
Link in admin section I can set. Where do you like to see a submenu?

PS: In my custom theme I am using a "control panel" for my admin account, there are all links to important pages like this one.
Link after "...Moderate" would be logical i think, as well as links to your other plugins if using :)