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):
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.
- Install Question2Answer if you haven't already.
- Get the source code for this plugin directly from github or from the q2apro plugin page.
- Extract the files.
- Optional: Change language strings in file q2apro-find-text-posts-lang.php
- Upload the files to a subfolder called q2apro-find-text-posts inside the qa-plugin folder of your Q2A installation.
- Navigate to your site, go to Admin -> Plugins. Check if the plugin "Find Text in Posts" is listed.
- Navigate to yourq2asite.com/findtext. From there you can start searching.
- Go to yourq2asite.com/findtext
- Insert the word or text into the input field.
- 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.
Question2Answer is a free and open source PHP software for Q&A sites.
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.