Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted June 12, 201014 yr 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
June 12, 201014 yr 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?
June 12, 201014 yr 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. :)
June 12, 201014 yr 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.
June 12, 201014 yr 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. :)
June 16, 201014 yr 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?
July 11, 201014 yr 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
July 21, 201014 yr 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 :)
July 21, 201014 yr Just to confirm this working in 3.1.1 ... well at least it does on my site. :D Thanks, Shaun
July 22, 201014 yr 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. :)
July 22, 201014 yr Michael, works, but it blocks forums for all search results If i try search in the blocked forum, it shows zero result.
August 6, 201014 yr 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.
August 6, 201014 yr 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.
August 7, 201014 yr 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.
August 7, 201014 yr 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.
August 7, 201014 yr 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.
August 15, 201014 yr 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.
August 15, 201014 yr 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.
September 22, 201014 yr 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.