Jump to content

Download: (SOS30) Block Forums from 'View New Content' v1.1.0


Adriano Faria

Recommended Posts

File Name: (SOS30) Block Forums from 'View New Content' v1.1.0
File Submitter: Adriano Faria
File Submitted: 08 Nov 2009
File Updated: 28 Jan 2010
File Category: Modifications

SOS-1264699772-U1.png

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.php
Change 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

Link to comment

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

Link to comment

[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!

;)

Link to comment

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'] );

		}
Link to comment

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.

..Al

SELECT 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 */






Link to comment

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'] );

		}
Link to comment
  • 2 weeks later...

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...
Link to comment

[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 :)

Link to comment
  • 2 weeks later...
  • 3 weeks later...
  • 4 weeks later...

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 ) . ")";
Link to comment

[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!

SOS-1264699772-U1.png

  • 1.0.2 => 1.1.0: Adjusts to run on IP.Board 3.0.5 and quick list of forums blocked
Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...