Searching in PMs

General discussion of development ideas and the approaches taken in the 4.x branch of phpBB. The next feature release of phpBB 4 will be 4.0/Triton.
Forum rules
Please do not post support questions regarding installing, updating, or upgrading phpBB 4.x. If you need support for phpBB 3.3.x please visit the 3.3.x Support Forum on phpbb.com.

If you have questions regarding writing extensions please post in Extension Writers Discussion to receive proper guidance from our staff and community.
Post Reply
Michaela.Skokanova
Registered User
Posts: 1
Joined: Fri May 08, 2020 1:01 pm

Searching in PMs

Post by Michaela.Skokanova »

Hi, I wanted to ask if it is possible to implement some way to search in private messages? Filter by the sender or so? Thanks!

User avatar
Deactivated 140246
Registered User
Posts: 40
Joined: Wed Dec 11, 2019 3:43 pm

Re: Searching in PMs

Post by Deactivated 140246 »

Is this a support question for your board or a suggestion for adding a new feature?
Support questions must be asked at: https://www.phpbb.com/community/
What you need will require an extension, which you can request on the community board.

If this is a suggestion of something to add to phpbb4, it does read like a good suggestion. Email accounts usually have search functions, so why not PMs? If someone gets lots of PMs, it can be useful.
Stand with Ukraine!

User avatar
P_I
Community Team
Community Team
Posts: 146
Joined: Fri Oct 31, 2014 4:56 am

Re: Searching in PMs

Post by P_I »

For what it is worth https://www.phpbb.com/community/viewtop ... &t=2263011. Agreed this should be core phpBB functionality and since the extension was abandoned, perhaps the phpBB development team would consider making it part of phpBB 4

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: Searching in PMs

Post by hanakin »

Not sure who said that, but we do need to eventually overhaul the current search capabilities of phpBB to be more universal with more control over what content to search so this could easily be added into that possibly. https://area51.phpbb.com/phpBB/viewtopi ... bb262ebcbc
Donations welcome via Paypal Image

User avatar
AmigoJack
Registered User
Posts: 110
Joined: Wed May 04, 2011 7:47 pm
Location: グリーン ヒル ゾーン
Contact:

Re: Searching in PMs

Post by AmigoJack »

I did in Re: [GSoC] Search Backend Refactoring 6+ years ago.

On my board I implemented it as similar as the board search: keywords and/or authors, and filters. It is an additional module and the search results are a list of PMs which also show their folder (also all PM folder "tabs" were matches were found are highlighted). Came in handy since then when you store 3000+ PMs. And also implemented keyword searches on the other areas mentioned, too.

koraldon
Registered User
Posts: 33
Joined: Thu Mar 10, 2005 12:06 pm

Re: Searching in PMs

Post by koraldon »

Why was that RFC abandoned ?

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

Re: Searching in PMs

Post by DavidIQ »

See the last active date of the topic starter.
Image

User avatar
hanakin
Front-End Dev Team Lead
Front-End Dev Team Lead
Posts: 968
Joined: Sat Dec 25, 2010 9:02 pm
Contact:

Re: Searching in PMs

Post by hanakin »

AmigoJack wrote: Fri May 15, 2020 1:35 pm I did in Re: [GSoC] Search Backend Refactoring 6+ years ago.

On my board I implemented it as similar as the board search: keywords and/or authors, and filters. It is an additional module and the search results are a list of PMs which also show their folder (also all PM folder "tabs" were matches were found are highlighted). Came in handy since then when you store 3000+ PMs. And also implemented keyword searches on the other areas mentioned, too.
Mind providing a pr or code for this
Donations welcome via Paypal Image

User avatar
AmigoJack
Registered User
Posts: 110
Joined: Wed May 04, 2011 7:47 pm
Location: グリーン ヒル ゾーン
Contact:

Re: Searching in PMs

Post by AmigoJack »

I've created
  • \includes\search\fulltext_mysql_pm.php which is largely a copy of \includes\search\fulltext_mysql.php and makes use of authors, keywords and splits
  • \includes\ucp\ucp_pm_search.php which overly copies from \includes\ucp\ucp_pm_viewfolder.php to display search results and also partly from \search.php to accept and process requests
  • \styles\prosilver\template\ucp_pm_search_body.html mainly copies \styles\prosilver\template\search_body.html but also makes it module-compatible
  • \styles\prosilver\template\ucp_pm_search_results.html which is largely a copy of \styles\prosilver\template\ucp_pm_viewfolder.html but also displays the folder for each PM and all participants.
It was a fairly straight process, provided you know all existing files almost inside out. PM actions (mark or move) only operate folder-wise by default and displaying multiple folders at once was never planned for phpBB - this required even more code copies, but in the end works as intended (so you're able to first search PMs and then no matter which folders the results reside in you can now move them all at once). Only deleting PMs in that view isn't possible, as it required too many too creepy hacks (the workaround is easy: just move all PMs to a folder, then view that folder to delete any/all of them).

As you can see in the screenshots everything is familiar: both the search options (as in the board search) and the results (as in a PM folder). One of the search results (folder "Inbox 2011") is blacked out on every participant because the recipient is a group name, not my username. Also note that the vertical tabs on the left side which represent the PM folders are highlighted when at least one search result is from there.

I have no PR for it since the code is not available. And keep in mind it was written 6+ years ago for 3.0, so I have my doubts you'd really be interested in it.
Attachments
20200519 pm search results.png
20200519 pm search query.png

User avatar
P_I
Community Team
Community Team
Posts: 146
Joined: Fri Oct 31, 2014 4:56 am

Re: Searching in PMs

Post by P_I »

P_I wrote: Mon May 11, 2020 10:42 pm For what it is worth https://www.phpbb.com/community/viewtop ... &t=2263011. Agreed this should be core phpBB functionality and since the extension was abandoned, perhaps the phpBB development team would consider making it part of phpBB 4
The repository for the above mentioned Extension is https://github.com/satanasov/pmsearch.

I've periodically tested it on my localhost testbed and haven't had any issues.

Post Reply