News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Modification Support - Adding attachments to searches

Started by AmerikanMetz, April 20, 2020, 05:27:33 PM

Previous topic - Next topic

AmerikanMetz

I'm looking to add attachments to the searches. It's a pretty integral part of topics which utilize them and I would like to have the ability to search files attached to posts. I was curious if someone could point me in the right direction. I am familiar with PHP, just not SMF.

This could probably be moved to coding help, my apologies. 

vbgamer45

Are you looking to search file titles? Or just have attachments appear in search results.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

AmerikanMetz

Having the associated topics appear as they normally do, just adding the file attachment titles to what's searched, yes.

vbgamer45

The code to be modified would be in Sources/Search.php

You would need to adjust the SQL queries to search the smf_attachments table and include
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

AmerikanMetz

Yeah, I forked the projected and have been looking at that file. I can't make much sense of db system or search API. Thanks. Beyond quotes it's not very human-readable for modification.

Advertisement: