PDA

View Full Version : How to properly implement a package, especially search support?


TiKu
05-23-2017, 05:53 PM
Hi,

I've written an add-on that stores lots of meta data for threads in some specific forums. This meta data is stored in separate database tables. I would like to give my users the ability to search for these threads by filtering the meta data. Therefore I've implemented a package (with its own content type) which hooks into vBulletin's search. It works as can be seen here: https://www.planet3dnow.de/vbulletin/search.php?search_type=1#ads=29

However, new threads are not found until I open the admin control panel and rebuild the search index for my package's content type. My package is very similar to the vbblog package, but new blog entries are found automatically. So I must be missing something.

This is the structure of my package:

packages/p3dmbdb/search/indexcontroller/mainboard.php -> implements a class p3dMBDB_Search_IndexController_Mainboard which extends vB_Search_IndexController
packages/p3dmbdb/search/result/mainboard.php -> implements a class p3dMBDB_Search_Result_Mainboard which extends vB_Search_Result
packages/p3dmbdb/search/searchcontroller/newmainboard.php -> implements a class p3dMBDB_Search_SearchController_NewMainboard which extends vB_Search_SearchController
packages/p3dmbdb/search/type/mainboard.php -> implements a class p3dMBDB_Search_Type_Mainboard which extends vB_Search_Type

Do I need anything else? It seems like the IndexController is responsible for indexing new content. But who will call it automatically?

Regards
TiKu