Jump to content

Download: (SOS31) Block Forums from Search Results


Adriano Faria

Recommended Posts

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

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.
Link to comment
  • 2 weeks later...
  • 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

Link to comment
  • 2 weeks later...

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 :)
Link to comment
  • 2 weeks later...

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

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

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.
Link to comment
  • 1 month later...

Archived

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

  • Recently Browsing   0 members

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