Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 9, 200915 yr File Name: (SOS30) Block Forums from 'View New Content' v1.1.0File Submitter: Adriano FariaFile Submitted: 08 Nov 2009File Updated: 28 Jan 2010File Category: Modifications By default, IP.Board shows the topics/posts from all forums when the user clicks in View New Content link. With this MOD, you give the user the option to select which forums he wants to see in VIEW NEW CONTENT search and TODAY'S ACTIVE CONTENT search. It's very nice to be used on forums with many categories/forums. For example: a user that uses ASP may not want to see the posts from PHP forum or maybe user didn't want to see topics from RSS forum, etc.Affected Files: [*]adminapplicationsforumsextensionsusercpForms.php[*]adminapplicationsforumsextensionssearchPlugin.phpChange log: [*]1.0.2 => 1.1.0: Adjusts to run on IP.Board 3.0.5 and quick list of forums blocked[*]1.01 => 1.0.2: Driver Error when click on others tabs from TODAY'S ACTIVE CONTENT, ror those who didn't select any forum.[*]1.0.0 => 1.0.1: Driver Error when click on others tabs from TODAY'S ACTIVE CONTENT.Click here to download this file
November 9, 200915 yr looooooooooooooooooooooooooooooooooooooooooooooooooooooooool, this is what i want, thanks a lot +1milion :D i go try, i hope, it dont delete my board :D Edit : in search.php is this 2x : /* Exclude forums */ if( $this->settings['vnp_block_forums'] ) { if( $this->request['search_app'] == 'forums' ) { $this->search_plugin->setCondition( 't.forum_id', 'NOT IN', $this->settings['vnp_block_forums'] ); } } which is right? Row 568, or 859
November 9, 200915 yr i tried, and it is on Row 568 add it in readme.html Thanks for this perfect hooks, it works super
November 9, 200915 yr Fantastic, thanks for updating this for 3.0, I will be installing it today!! ..Al
November 9, 200915 yr Author [quote name='Reitaksvk' date='09 November 2009 - 12:29 PM' timestamp='1257780550' post='1877403']which is right? Row 568, or 859 [quote name='Reitaksvk' date='09 November 2009 - 12:44 PM' timestamp='1257781471' post='1877413']add it in readme.html Tks, guys. It's the first one, on line 568. The second one is uselless; it is the VIEW NEW POSTS, which isn't used on IPB3. For VIEW NEW CONTENT, it's the other file. But I'll add this to the ReadMe file! ;)
November 10, 200915 yr Author New version released!Change log:[*]1.0.0 => 1.0.1: Driver Error when click on others tabs from TODAY'S ACTIVE CONTENT. Manual fix: Open admin\applications\core\modules_public\search\search.php and find: /* (SOS30) Block Forums from 'View New Content' v1.0.0 */ if( $this->settings['sos30_blockforums_on'] AND in_array( $this->member->getProperty('member_group_id') , explode(',', $this->settings['sos30_blockforums_groups'] ) ) ) { $this->search_plugin->setCondition( 't.forum_id', 'NOT IN', $this->memberData['blocked_forums'] ); } Change to: /* (SOS30) Block Forums from 'View New Content' v1.0.1 */ if( $this->request['search_app'] == 'forums' AND $this->settings['sos30_blockforums_on'] AND in_array( $this->member->getProperty('member_group_id') , explode(',', $this->settings['sos30_blockforums_groups'] ) ) ) { $this->search_plugin->setCondition( 't.forum_id', 'NOT IN', $this->memberData['blocked_forums'] ); }
November 10, 200915 yr I just installed this mod and if I don't have any forums blocked, I get a driver error when attempting to view "Today's Active Content": LEFT JOIN ibf_members m ON ( m.member_id=p.author_id ) LEFT JOIN ibf_forums f ON ( f.id=t.forum_id ) WHERE t.forum_id IN (88,89,24,46,104,105,50,51,52,53,54,55,60,103,98,59,64,115,109,92,93,107,69,77,78,79,101,56,100,66,67,68,63,102,16,3,4,13,14,19,12,20,17,116,21,36,18,5,8,23,9,26,10,15,22,106,118,111,110,82,62,29,11,30,76,84,7,32,33,34,35,112,70,85,45,6,61,27,25,72,49,81,37,31,65,73,75,86,91,90,99,87,94,95,97,108,96,117) AND t.state != 'link' AND t.last_post BETWEEN 1257789480 AND 1257875880 AND t.forum_id NOT IN ( ) ORDER BY t.last_post desc LIMIT 0,1001 Looks like the problem is with the "NOT IN ( )" near the end of the statement. I fixed this by modifying the block of code in search.php as follows: if( $this->request['search_app'] == 'forums' AND $this->settings['sos30_blockforums_on'] AND in_array( $this->member->getProperty('member_group_id') , explode(',', $this->settings['sos30_blockforums_groups'] ) ) AND $this->memberData['blocked_forums'] != '' ) { $this->search_plugin->setCondition( 't.forum_id', 'NOT IN', $this->memberData['blocked_forums'] ); } Basically just added another check to the if statement to make sure there are forums to be blocked before adding the NOT IN statement. ..AlSELECT t.*,p.*,m.members_display_name, m.members_seo_name, m.member_id,f.id as forum_id FROM ibf_topics t LEFT JOIN ibf_posts p ON ( p.pid=t.topic_firstpost ) /* (SOS30) Block Forums from 'View New Content' v1.0.1 */
November 11, 200915 yr Author New version released!Change log:[*]1.0.1 => 1.0.2: Driver Error when click on others tabs from TODAY'S ACTIVE CONTENT, for those who didn't select any forum. Manual fix: On admin\applications\core\modules_public\search\search.php, find: /* (SOS30) Block Forums from 'View New Content' v1.0.1 */ if( $this->request['search_app'] == 'forums' AND $this->settings['sos30_blockforums_on'] AND in_array( $this->member->getProperty('member_group_id') , explode(',', $this->settings['sos30_blockforums_groups'] ) ) ) { $this->search_plugin->setCondition( 't.forum_id', 'NOT IN', $this->memberData['blocked_forums'] ); } Change to: /* (SOS30) Block Forums from 'View New Content' v1.0.2 */ if( $this->request['search_app'] == 'forums' AND $this->settings['sos30_blockforums_on'] AND in_array( $this->member->getProperty('member_group_id') , explode(',', $this->settings['sos30_blockforums_groups'] ) ) AND $this->memberData['blocked_forums'] != '' ) { $this->search_plugin->setCondition( 't.forum_id', 'NOT IN', $this->memberData['blocked_forums'] ); }
November 23, 200915 yr Thanks for releasing this, seems to work great so far! (I'm also using sphinx search). I only have one small request. On my board we have 100s of forums, so it's a bit tedious to scroll through the list to see which ones you have already blocked. Request: Could you add a listing of currently blocked forums somewhere on the page? Ex: [ list of forums you can block ]Forums you are currently blocking:Forum 1Forum 2etc...
November 29, 200915 yr [quote name='.Logan' date='23 November 2009 - 09:55 PM' timestamp='1259013303' post='1881885'] Thanks for releasing this, seems to work great so far! (I'm also using sphinx search). I only have one small request. On my board we have 100s of forums, so it's a bit tedious to scroll through the list to see which ones you have already blocked. Request: Could you add a listing of currently blocked forums somewhere on the page? Ex: [ list of forums you can block ]Forums you are currently blocking:[*]Forum 1[*]Forum 2[*]etc... sounds a great idea :) [quote name='Adriano Faria' date='23 November 2009 - 10:02 PM' timestamp='1259013752' post='1881892'] Sure... In a few days I'll release a new version. :thumbsup: thanks :)
December 26, 200915 yr Does it work for 3.0.5 with sphinx? I installed it, and block dons't work, show all forums in new content
December 26, 200915 yr Author [quote name='CiDR' date='25 December 2009 - 09:29 PM' timestamp='1261787355' post='1892026']Does it work for 3.0.5 with sphinx? Never used... but probably no. Only default IPB3 search was modified.
January 23, 201015 yr since the 3.0.5 update to hook me has stopped working, eh tried reinstalling without success. You can not work with this new version? or am I doing something wrong? I've done all necessary changes and saw the searchPlugin.php has changed in one line. if it has not influenced anything$where[] = "t.forum_id IN (" . implode( ",", $forumIdsOk ) . ")"; for $where_clause[] = "t.forum_id IN (" . implode( ",", $forumIdsOk ) . ")";
January 28, 201015 yr Author [quote name='.Logan' date='23 November 2009 - 06:55 PM' timestamp='1259013303' post='1881885']I only have one small request. On my board we have 100s of forums, so it's a bit tedious to scroll through the list to see which ones you have already blocked. Request: Could you add a listing of currently blocked forums somewhere on the page? Ex: [ list of forums you can block ]Forums you are currently blocking: [*]Forum 1[*]Forum 2[*]etc... [quote name='JAViSS' date='23 January 2010 - 11:51 AM' timestamp='1264258304' post='1902918'] since the 3.0.5 update to hook me has stopped working, eh tried reinstalling without success. You can not work with this new version? New version released! 1.0.2 => 1.1.0: Adjusts to run on IP.Board 3.0.5 and quick list of forums blocked
January 28, 201015 yr thanks for the update, now works fine in ipb3.0.5. Just found an error. forums in the list of blocked (the right) shows incorrectly selected forums.
January 28, 201015 yr Author [quote name='JAViSS' date='28 January 2010 - 03:42 PM' timestamp='1264704120' post='1905577']Just found an error. forums in the list of blocked (the right) shows incorrectly selected forums. Are you sure ? This is what is saved on ibf_members.
Archived
This topic is now archived and is closed to further replies.