Adriano Faria Posted March 3, 2013 Share Posted March 3, 2013 File Name: Screenshots on Downloads Search Results File Submitter: Adriano Faria File Submitted: 03 Mar 2013 File Category: Integration Supported Versions: IP.Downloads 2.5.x This hook will show the file screenshot on search results of IP.Downloads.NOTICE: It doesn't support Sphinx! here to download this file Link to comment Share on other sites More sharing options...
Makoto Posted March 4, 2013 Share Posted March 4, 2013 This is an excellent hook, I've been meaning to add this functionality myself, but it breaks if you're community is using sphinx.Fatal error: Call to undefined method screenshotSearchResuls_search::_buildWhereStatement() in hooks/screenshotSearchResuls_search_01d905c3b1d3a9dd0ba4e7a5e8585d6e.php on line 53Any chance you'll be able to patch in support for forums using sphinx? Link to comment Share on other sites More sharing options...
Adriano Faria Posted March 4, 2013 Author Share Posted March 4, 2013 Oh man, you should have asked first! >_< Notice added now... Never used Sphinx! Have no idea where to start! Give a couple of days to try to do something. Link to comment Share on other sites More sharing options...
Makoto Posted March 4, 2013 Share Posted March 4, 2013 It didn't even really cross my mind to check for some reason. Thanks for the quick response, the hook works great otherwise. It's something that could be extremely useful for my board. Link to comment Share on other sites More sharing options...
Adriano Faria Posted March 4, 2013 Author Share Posted March 4, 2013 It didn't even really cross my mind to check for some reason. Thanks for the quick response, the hook works great otherwise. It's something that could be extremely useful for my board. I'll try to make it compatible. Link to comment Share on other sites More sharing options...
Makoto Posted May 5, 2014 Share Posted May 5, 2014 Found a bug with files that have a plus sign in their titles. Latest SQL Error Today (Today, 10:50 PM) ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Date: Mon, 05 May 2014 02:50:11 +0000 Error: 1064 - syntax error, unexpected '+' IP Address: - /files/file/12-foo-bar-cake/ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- mySQL query error: SELECT COUNT(*) as total_results FROM downloads_files f LEFT JOIN downloads_ccontent cc ON ( cc.file_id=f.file_id ) WHERE (MATCH( f.file_name ) AGAINST( 'foo bar cake++' IN BOOLEAN MODE ) OR MATCH( f.file_desc ) AGAINST( 'foo bar cake++' IN BOOLEAN MODE )) AND f.file_cat IN(1,2,3,4,5) AND f.file_id<>12 .--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------. | File | Function | Line No. | |----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------| | admin/applications_addon/ips/downloads/extensions/search/engines/sql.php | [screenshotSearchResuls_search]._filesSearch | 91 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/sources/classes/search/controller.php | [search_engine_downloads].search | 544 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/applications_addon/ips/downloads/modules_public/display/file.php | [IPSSearch].search | 590 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/applications_addon/ips/downloads/modules_public/display/file.php | [public_downloads_display_file].getSimilarFiles | 462 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' | admin/sources/base/ipsController.php | [public_downloads_display_file].doExecute | 306 | '----------------------------------------------------------------------------+-------------------------------------------------------------------------------+-------------------' Attempting to view any of these files on the front-end will result in a database error. Edit: This doesn't seem to be related to your hook actually..? I was just assuming from "screenshotSearchResuls_search", my second guess is the most recent security patch may have caused it? Sorry to waste your time if this isn't relevant. Link to comment Share on other sites More sharing options...
Adriano Faria Posted May 5, 2014 Author Share Posted May 5, 2014 Can you disable the hook and try to access the file? Link to comment Share on other sites More sharing options...
Makoto Posted May 5, 2014 Share Posted May 5, 2014 Yeah, I did that immediately after posting to confirm, and it still gave an error. I figured out the issue though. It was a bug with fulltext index searching in InnoDB 5.6. (So it wasn't specifically related to this hook or IP.Board at all) Sorry for the trouble. Link to comment Share on other sites More sharing options...
Draffi Posted February 6, 2015 Share Posted February 6, 2015 Is there a setting for the size of the screenshot? Can this be opened with the lightbox, indeed linking to the file? Link to comment Share on other sites More sharing options...
Adriano Faria Posted February 6, 2015 Author Share Posted February 6, 2015 No, no setting. The screenshot is the same size of the main screenshot on file view. Also there's no lilghtbox, since it acts exacly like the category view: it is a link to the file. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.