[PHP] fulltext_native

Discuss requests for comments/changes posted in the Issue Tracker for the development of phpBB. Upcoming releases are 3.2/Rhea and 3.3.
Post Reply
Leinad4Mind
Registered User
Posts: 5
Joined: Tue Jan 10, 2017 6:26 pm

[PHP] fulltext_native

Post by Leinad4Mind » Tue Jan 10, 2017 6:37 pm

Identifer: fulltext_native.php
Location: Dunno
Parameters: Dunno
Explanation: There is no event in the fulltext_native.php to be able to split and search for the topic description. So basically if I create any kind of extension that needs to search for the title + new field, I would need a new event on the search files as fulltext_native.php.
That way, for example, with Topic Description extension, I could search the Topic Title and Topic Description with the same search field.
In my case I want to use that extension because I've Title and Alternative Title, and when I search something, it should search on both simultaneously.

I did this on 3.0 with some core edit files. But on 3.1 I wanted to be able to do this without core edits.

Some people told me that this is the place to request this kind of new Events. So here am I.

Best regards

User avatar
javiexin
Registered User
Posts: 90
Joined: Thu Dec 22, 2011 10:04 am

Re: [PHP] fulltext_native

Post by javiexin » Tue Jan 10, 2017 11:12 pm

Well, I have another alternative: write a service replacement for fulltext_native.php...

Simplifying, what this would do would be: inherit from the current fulltext_native.php (in your own extension), then change whatever methods you need modified (not too easy, as I just glanced at the code, and it is quite spread all over), but most importantly, the index and index_remove methods. And, if you want to provide a "search for description" only, you might need to add that to keyword_search as well.

Not an easy task I must say... But doable.
Hope this helps,
-javiexin

Leinad4Mind
Registered User
Posts: 5
Joined: Tue Jan 10, 2017 6:26 pm

Re: [PHP] fulltext_native

Post by Leinad4Mind » Wed Jan 11, 2017 3:47 pm

First of, I'm not a phpbb extension developer xD. This event was asked for some extensions already by other users too. I just exposed my case, so the devs from phpbb can understand at least one reason to have that event. When I asked this feature to some developers, they all said that they couldnt do it, and ask me to ask phpbb dev team to add this event. And this was already at least 6 months ago, till today no dev tried to write an alternative, maybe because the simple thing is maybe to add an event to phpbb.

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [PHP] fulltext_native

Post by DavidIQ » Wed Jan 11, 2017 7:03 pm

Leinad4Mind wrote:
Wed Jan 11, 2017 3:47 pm
First of, I'm not a phpbb extension developer xD. This event was asked for some extensions already by other users too. I just exposed my case, so the devs from phpbb can understand at least one reason to have that event. When I asked this feature to some developers, they all said that they couldnt do it, and ask me to ask phpbb dev team to add this event. And this was already at least 6 months ago, till today no dev tried to write an alternative, maybe because the simple thing is maybe to add an event to phpbb.
Unless this was followed for properly requesting an event, mentioning in passing the need for some event in the core 6 months ago, or any amount of time, without having a ticket would be fruitless.
Image

Leinad4Mind
Registered User
Posts: 5
Joined: Tue Jan 10, 2017 6:26 pm

Re: [PHP] fulltext_native

Post by Leinad4Mind » Wed Jan 11, 2017 10:04 pm

Yes, I follow that information that I found on this forum. I guess I've done all well. If not, well, I tried at least...

User avatar
DavidIQ
Customisations Team Leader
Customisations Team Leader
Posts: 1731
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth
Contact:

Re: [PHP] fulltext_native

Post by DavidIQ » Wed Jan 11, 2017 10:10 pm

So you mean this:
https://tracker.phpbb.com/browse/PHPBB3-14667

I'm sorry but we're not going to insert an event into a function into a random location in the hopes that it will be used by an extension developer. If there is such a developer that needs it and knows where it needs to go at then they need to create the ticket with the details of what they need. Rich, the person linked to in this ticket, is more than capable of doing so as he's done it in the past. If he hasn't created a ticket for it then it's because he might not be interested in implementing the use of such an event in his extension. fulltext_native.php already has some events so it is possible he's already using one of those.
Image

Post Reply