Keyword

Searching within PDFs attached to K2 items

  • Simon C
  • Simon C's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #149096 by Simon C
Hi.

I'm building a site which will contain listing for projects. Each project will have a page with overview info, contact details, licence info, etc, plus one or more PDF documents attached to it.

I need the site's search to include the PDF content when finding search results, but the search results link must to go to the overview page, not directly to the PDF doc itself.

I'm hoping to be able to use K2 for the listings pages, as it covers a lot of the other functionality I have to provide, including attachments. But I can't find any way to achieve searching within those attachments.

Can anyone suggest anything?

Thank you!

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #149116 by Lefteris
Replied by Lefteris on topic Searching within PDFs attached to K2 items
Hi,

Unfortunately there is no way to do this. PHP can search in PDFs but this requires a custom implementation, it's not available in K2 or Joomla! .

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Simon C
  • Simon C's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #149119 by Simon C
Replied by Simon C on topic Searching within PDFs attached to K2 items
Hi Lefteris,

Thanks for the reply.

There are a number of Joomla plugins listed in the JED that can do PDF searching, but as you say, nothing apparently that integrates with K2, which is a pity.

I've investigated some of the plugins on the JED, and while one or two of them might meet my needs, it would obviously mean going without all the K2 goodness.

Seems like an obvious gap.

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #149133 by Lefteris
Replied by Lefteris on topic Searching within PDFs attached to K2 items
It all depends on your needs. If you do not need K2 that's fine. If you do need it, you might consider hide a developer to build that plugin for you instead of buying an existing plugin. Or you can ask the existing plugin developers to add support for K2.

In any case, searching in files during run time will not be performance efficient solution. That's why we cannot add this to the bundled K2 search plugins. The solution you will go for should have an indexing function to make things work faster.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Simon C
  • Simon C's Avatar Topic Author
  • Offline
  • New Member
More
8 years 10 months ago #149155 by Simon C
Replied by Simon C on topic Searching within PDFs attached to K2 items
Hi.

Thanks for that.

So I've done a bit more digging today. The most feature-loaded plugin (and highest voted in JED) that fits the bill is JiFile (extensions.joomla.org/extensions/extension/search-a-indexing/site-search/jifile).

I installed this and tested it; it works well. With a folder full of documents, it can search through them and give relevant results, with a direct link to the document.

I dug around in the code and wrote a patch to integrate it with K2, such that if K2 is installed and the search finds a document that is attached to a K2 item, then it will return a link to that K2 item instead of to the document itself.

I've written to the authors of JiFile asking if they would consider implementing the patch into their main code base, but in case they don't, for the benefit of anyone else who wants to do something similar, I've also posted code change instructions on their forum, link here: www.isapp.it/en/forum/15-richieste-feature/1085-k2-integration.html#2105

Please Log in or Create an account to join the conversation.

More
8 years 10 months ago #149172 by Lefteris
Replied by Lefteris on topic Searching within PDFs attached to K2 items
That's great. Thanks for sharing that.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum