MyBB Community Forums

Full Version: RT LiveSearch 1.8 (Ajax Search)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
RT LiveSearch
Is a plugin which utilizes native MyBB search functionality and provides result via ajax. Very light and highly customizable plugin for your search queries.

#Plugin page
#Dependencies
#Features
  • Ajax search with native MyBB search function.
  • ZERO additional database queries!
  • KeyPress search: Bind key (default "S") on your keyboard to open search popup modal at any time while not typing.
  • CustomAjaxSearch: Attach ajax search on any HTML form you wish! Ref: https://github.com/RevertIT/mybb-rt_livesearch#how-to-add-custom-search-box
  • Detailed search statistics:
    • Provides a graph with detailed data for search queries on the forum
          - Total ajax/normal search queries
          - Total ajax search queries
          - Total normal search queries
    • Search type graphs (Threads / Posts)
          - Total ajax/normal search types (24 hrs)
          - Total ajax search types (24 hrs)
          - Total normal search types (24 hrs)
    • Search stats by users (See which users use search function the most and how many queries)
          - Total ajax/normal search queries by users (24 hrs)
          - Total ajax search queries by users (24 hrs)
          - Total normal search queries by users (24 hrs)
    • Most searched keywords
          - Most searched keywords via ajax/normal search queries (24 hrs)
          - Most searched keywords via ajax search queries (24 hrs)
          - Most searched keywords via normal search queries (24 hrs)
  • Search history:
    • View all search history data from user
    • Sort your search via username, and from selected forum
  • Replace/Revert MyBB quick search with ajax search via settings.
  • Organized templates
  • Easy to use configuration and settings.

#Installation
  1. Copy the directories from the plugin inside your root MyBB installation.
  2. Settings for the plugin are located in the "Plugin Settings" tab. /admin/index.php?module=config-settings

#Update
  1. Deactivate the plugin.
  2. Replace the plugin files with the new files.
  3. Activate the plugin again.

#Removal
  1. Uninstall the plugin from your plugin manager.
  2. Optional: Delete all the RT LiveSearch plugin files from your MyBB folder.

#How-to: Add custom search box
This is a minimal configuration needed for form to fire up ajax
You can replace custom_ajax* with any other class
<div class="custom_ajax">
  <form action="search.php" class="custom_ajax_form">
    <input name="keywords" type="text" class="textbox custom_ajax_keywords" />
    
    <!-- START hidden input form fields -->
    <input name="action" type="hidden" value="do_search" />
    <input name="ext" type="hidden" value="rt_livesearch" />
    <input name="ajax" type="hidden" value="1" />
    <input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
    <input name="showresults" type="hidden" value="threads" />
    <input type="hidden" name="postthread" value="1" />
    <input type="text" style="display: none;" />
    <!-- END Hidden input form fields -->
    
    <!-- START Show ajax results/errors container -->
    <div class="custom_ajax_container" style="display: none; position: absolute"></div>
    <!-- END Show ajax results/errors container -->
    
  </form>
</div>
<script>LiveSearch.searchInput('.custom_ajax', {$mybb->settings['rt_livesearch_keypress_timeout']});</script>

#Feature request
Open a idea by clicking here
Such an amazing plugin. Than you so much .
RT LiveSearch 1.5 (Ajax Search)


New feature:
Search history in admin panel

Optimization:
Optimized file structure a bit

[Image: ss8.png]
While trying to install, the plugin page going blank

I manually transfer all the files to respective place but after that i hot my plugin page whole blank or white page...
(2023-04-17, 07:12 PM)Pradip Wrote: [ -> ]While trying to install, the plugin page going blank

I manually transfer all the files to respective place but after that i hot my plugin page whole blank or white page...

You need PHP 8.0, also check error.log file and paste here output
Can you make it work with php below 8?
Incredible plugin! Thank you!

I use other plugins from you, they are really useful.

Anyway I am stuck with php 7.4 (because of MyBB core is not yet fully compatible, some plugins are not updated). Please could you release a version with php 7.4+ compatiblity? It would be great not just for me
RT LiveSearch 1.6 (Ajax Search)

#Changes
  • Fixed "Search history 'forums' tab" in search logs
  • Fixed ChartJS configuration
  • Replaced search option "forum" with "IP address" when searching logs
  • Optimized code to use fewer resources.
  • Code cleanup
RT LiveSearch 1.8 (Ajax Search)

#Changes
  • Add support for CTRL + key when opening a modal search.
As I wrote, it is not good that php v7.4 is not supported. I am waiting for MyBB official release with full php 8.0+ compatibility... maybe it would get more downloads and usage, because many users cannot use this great plugin...