jaywarnre Posted October 12, 2011 Share Posted October 12, 2011 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 2 3 class Search_Tables extends Search_Module 4 { 5 function name () { return __ ('WP Tables', 'search-unleashed'); } 6 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.