Jump to content

Recommended Posts

Hello

I have installed wordpress and I have a huge list of data in tables that I've uploaded via the wp-table plugin.  I need this data to be searchable so I also installed the search unleashed plugin also.    I was told by a programmer that I could insert a php file into the modules folder on the server that will make the search unleashed plugin search the tables also.  Here is the code and what I have from him and the error msg I get

 

I'm getting an error msg - Parse error: syntax error, unexpected T_LNUMBER in /home/salondad/public_html/wp-content/plugins/search-unleashed/modules/wp-tables.php on line 3

 

From the programmer:

These tables contain alot of data and are not searchable, even using Search Unleashed . I have created a working module, called wp-tables.php. Just drop this file into the modules folder (..\wp-content\plugins\search-unleashed\modules) and activate this module. Now, my tables are searchable.

 

1  <?php

3  class Search_Tables extends Search_Module

4  {

5      function name () { return __ ('WP Tables', 'search-unleashed'); }

7      function Search_Tables ()

8      {

9          $plugins = get_option ('active_plugins');

10          foreach ($plugins AS $plugin)

11          {

12              if (strpos ($plugin, 'wp-table') !== false)

13              {

14                  // Load the gallery generator

15                  include_once (ABSPATH.PLUGINDIR."/$plugin/../../wp-table/wp-table.php");

16 

17                  // Action calls for all functions

18                  add_filter ('the_content', 'golftable');

19 

20              }

21          }

22 

23      }

24  }

25 

26  ?>

 

Link to comment
https://forums.phpfreaks.com/topic/248996-php-error-need-tables-searchable/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.