Adriano Faria Posted June 12, 2010 Posted June 12, 2010 File Name: (SOS31) Block Forums from Search ResultsFile Submitter: Adriano FariaFile Submitted: 12 Jun 2010File Updated: 22 Mar 2011File 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.phpadminapplicationsforumsextensionssearchenginessphinx.php (optional)Compatibility:IP.Board 3.1.3 & 3.1.4Click here to download this file
.Ian Posted June 12, 2010 Posted June 12, 2010 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?
Biker.GA Posted June 12, 2010 Posted June 12, 2010 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. :)
Adriano Faria Posted June 12, 2010 Author Posted June 12, 2010 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.
.Ian Posted June 12, 2010 Posted June 12, 2010 Yes, he only see forums that he has permission to view. Thanks :)
Biker.GA Posted June 12, 2010 Posted June 12, 2010 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. :)
Arun Kumar Posted June 16, 2010 Posted June 16, 2010 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?
Biker.GA Posted June 19, 2010 Posted June 19, 2010 Still waiting for the Sphinx fix and I'll be installing it on our 3.1.1 site.
Clickfinity Posted July 11, 2010 Posted July 11, 2010 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
Michael Posted July 21, 2010 Posted July 21, 2010 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 :)
Clickfinity Posted July 21, 2010 Posted July 21, 2010 Just to confirm this working in 3.1.1 ... well at least it does on my site. :D Thanks, Shaun
Adriano Faria Posted July 22, 2010 Author Posted July 22, 2010 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. :)
CiDR Posted July 22, 2010 Posted July 22, 2010 Michael, works, but it blocks forums for all search results If i try search in the blocked forum, it shows zero result.
Biker.GA Posted August 6, 2010 Posted August 6, 2010 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.
Biker.GA Posted August 6, 2010 Posted August 6, 2010 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.
Biker.GA Posted August 7, 2010 Posted August 7, 2010 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.
Adriano Faria Posted August 7, 2010 Author Posted August 7, 2010 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.
Biker.GA Posted August 7, 2010 Posted August 7, 2010 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.
DeeJayFIA Posted August 8, 2010 Posted August 8, 2010 Can you please confirm this works for v3.2.1? Thank you.
CiDR Posted August 9, 2010 Posted August 9, 2010 can somebody help with filter in viewNewContent function in the sphinx.php?
Biker.GA Posted August 15, 2010 Posted August 15, 2010 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.
Adriano Faria Posted August 15, 2010 Author Posted August 15, 2010 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.
Kamuro Posted September 22, 2010 Posted September 22, 2010 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.