Jump to content

Download: (SOS31) Block Forums from Search Results

Featured Replies

Posted

File Name: (SOS31) Block Forums from Search Results
File Submitter: Adriano Faria
File Submitted: 12 Jun 2010
File Updated: 22 Mar 2011
File Category: Modifications

By default, IP.Board shows the topics/posts from all forums when the user uses the search. With this MOD, you give the user the option to select which forums he wants to see in searchs results (REGULAR SEARCH, VIEW NEW CONTENT, USER CONTENT and TODAY'S ACTIVE CONTENT). 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:

  • adminapplicationsforumsextensionssearchenginessql.php
  • adminapplicationsforumsextensionssearchenginessphinx.php (optional)

Compatibility:

  • IP.Board 3.1.3 & 3.1.4


Click here to download this file

Thanks :)
Assume he can only see the forums that he has permission to view?

In other-words he will not see admin forums in the list to block if he is not an admin?

I believe that's the case. However, it doesn't work with Sphinx. I'm more than willing to assist in getting to work with Sphinx as well. :)

  • Author

Assume he can only see the forums that he has permission to view?



In other-words he will not see admin forums in the list to block if he is not an admin?


Yes, he only see forums that he has permission to view.

However, it doesn't work with Sphinx. I'm more than willing to assist in getting to work with Sphinx as well.


I'll make the edits in Sphinx file and you can test, since I don't use it. Tomorrow I'll send you a PM with attached file.

Yes, he only see forums that he has permission to view.







Thanks :)

I'll make the edits in Sphinx file and you can test, since I don't use it. Tomorrow I'll send you a PM with attached file.



Most appreciated. :)

Can anyone who upgraded to IP.Board 3.1.1 confirm here that "Block Forums from 'View New Content' v2.0.0" is working fine?

Still waiting for the Sphinx fix and I'll be installing it on our 3.1.1 site.

  • 2 weeks later...

Edit: Its working fine on IP.Board 3.1.1!

  • 2 weeks later...

Great mod - thanks.

Any news on the support for Sphinx?

I converted from vB over the weekend and am using Sphinx for search and my members are used to having the "ignore forums" feature so it would be great if I could get this working.

I've no problem testing updates on my own forums if you need a site to test it on.

Cheers,
Shaun :D

  • 2 weeks later...

I to need for sphinx.

To Adriano or whoever might need this, I helped someone recently with Sphinx stuff for this mod, and he said it seemed to work fine. Let me share what I gave him, here:


OK, I think these are the only steps you need. Note, though, I don't have a Sphinx environment to test this in, nor do I really know how to debug Sphinx issues if this is wrong. But here goes...



Open /admin/applications/forums/extensions/search/engines/sphinx.php, find:



			/* Contextual */

			if ( $cType == 'forum' AND $cId AND in_array( $cId, $forumIdsOk ) )

			{

				$this->sphinxClient->SetFilter( 'forum_id', array( $cId ) );

			}

			else

			{

				$this->sphinxClient->SetFilter( 'forum_id', $forumIdsOk );

			}

Add below:

			/* (SOS31) Block Forums from 'View New Content' v2.0.0 */

			if( $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->sphinxClient->SetFilter( 'forum_id', explode( ',', $this->memberData['blocked_forums'] ), TRUE );

			}

Find:

		/* Get list of good forum IDs */

		$forumIdsOk	= $this->registry->class_forums->fetchSearchableForumIds( $this->memberData['member_id'] );


		$this->sphinxClient->SetFilter( 'forum_id', $forumIdsOk );

Add below:

		/* (SOS31) Block Forums from 'View New Content' v2.0.0 */

		if( $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->sphinxClient->SetFilter( 'forum_id', explode( ',', $this->memberData['blocked_forums'] ), TRUE );

		}


Save and upload.


Hope this helps :)

Just to confirm this working in 3.1.1 ... well at least it does on my site. :D

Thanks,
Shaun

  • Author

To Adriano or whoever might need this, I helped someone recently with Sphinx stuff for this mod, and he said it seemed to work fine.



I appreciate, Michael. I can't test it since I don't use it. :)

Michael, works, but it blocks forums for all search results
If i try search in the blocked forum, it shows zero result.

  • 2 weeks later...

A suggestion for a future version. The ability to prevent a forum from being blocked. It could be something simple like a check to see if the admin has made a particular forum immune to being blocked with a message to the user if they attempt to block it.

Ran into a snag with this one. All the file edits were accomplished and it works wonderfully for the Administrator and Moderator usergroup. But that's it. It doesn't even appear in the UserCP for all other usergroups that were assigned. This is with 3.12.

OK. This is driving me absolutely nuts. The usergroups allowed to use the modification are listed in the database, but yet, any usergroup other than Administrator or Moderator cannot see the option in the UserCP.

  • Author

Did you read the README.HTML file and chose the ALLOWED GROUPS IN ADMIN CP to use this feature ?


Step 3: Admin CP Settings


Log in to your IP.Board Admin CP and visit the System tab -> System Settings -> Hooks. You'll see (SOS31) Block Forums from 'View New Content'. Configure the hook as you wish.


This mod works fine for me.

Yes. I even went through the DB to ensure the appropriate usergroups are listed. They are, yet, it only works for 2 usergroups. Administrators and Moderators.

Can you please confirm this works for v3.2.1? Thank you.

can somebody help with filter in viewNewContent function in the sphinx.php?


Did you read the README.HTML file and chose the ALLOWED GROUPS IN ADMIN CP to use this feature ?





This mod works fine for me.






Yes. I even went through the DB to ensure the appropriate usergroups are listed. They are, yet, it only works for 2 usergroups. Administrators and Moderators.




Stating the mod works fine when there are issues going on doesn't exactly give me warm fuzzies on using this modification, or ANY modification from this author. I think I've waited patiently, and have provided the requested information when asked in a timely manner.

If this modification is "unsupported", the author should have stated so when it was released.
  • Author

Stating the mod works fine when there are issues going on doesn't exactly give me warm fuzzies on using this modification, or ANY modification from this author. I think I've waited patiently, and have provided the requested information when asked in a timely manner.



If this modification is "unsupported", the author should have stated so when it was released.



Really! Oh god!

[size="4"]This and all other modifications are not supported![/size]


Is that good for you ?

Just don't use it and be happy! :lol:

Ah, by the way, I don't support anymore. I won't post new mods here.
  • 1 month later...

What a bummer that drama has killed your passion for doing the community projects.

This is a great idea, I am having problems with getting it to load up for us but a good mod to start with.

Archived

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

Recently Browsing 0

  • No registered users viewing this page.