Remove from search

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
php_BB_Lover
I've Been Banned!
Posts: 352
Joined: Tue Jun 23, 2020 5:18 am

Re: Remove from search

Post by php_BB_Lover »

KevC wrote:
Wed Jul 01, 2020 10:49 am
If you don't want the two language groups to mix (and it's highly unlikely anyone will swap languages - by hiding one set of forums from the other they won't even know they exist anyway) why not just set up two boards?
with two boards you have to have two urls
Version: phpBB 3.3.0
Theme: default
Regards
User avatar
KevC
Support Team Member
Support Team Member
Posts: 70227
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: Remove from search

Post by KevC »

Not necessarily.

yoursite.com/forum1 (this one is Spanish)
yoursite.com/forum2 (this one is English)

Two separate sites running in separate languages with separate users
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"
php_BB_Lover
I've Been Banned!
Posts: 352
Joined: Tue Jun 23, 2020 5:18 am

Re: Remove from search

Post by php_BB_Lover »

KevC wrote:
Wed Jul 01, 2020 11:00 am
Not necessarily.
yoursite.com/forum1 (this one is Spanish)
yoursite.com/forum2 (this one is English)
this is technically two urls
Version: phpBB 3.3.0
Theme: default
Regards
User avatar
warmweer
Jr. Extension Validator
Posts: 5585
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Bel ... gium

Re: Remove from search

Post by warmweer »

php_BB_Lover wrote:
Wed Jul 01, 2020 11:13 am
KevC wrote:
Wed Jul 01, 2020 11:00 am
Not necessarily.
yoursite.com/forum1 (this one is Spanish)
yoursite.com/forum2 (this one is English)
this is technically two urls
And that reply is factually nitpicking.
url = Uniform Resource Locator and as such every single item on your board has a different url
Fact is the example KevC gave is 1 domain and you could have (if you wanted to) 2 subdomains
forum1.yoursite.com pointing to yoursite.com/forum1 and
forum2.yoursite.com pointing to yoursite.com/forum2
Spelling is freeware, which means you can use it for free.
On the other hand, it is not open source, which means you cannot change it or publish it in a modified form.
rxu
Extensions Development Team
Posts: 3406
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Remove from search

Post by rxu »

php_BB_Lover, you're free to do anything you want with your code, just try and you'll see if it works or not. No need to ask on every edit really, especially if that worked for you.
Thanks.
php_BB_Lover
I've Been Banned!
Posts: 352
Joined: Tue Jun 23, 2020 5:18 am

Re: Remove from search

Post by php_BB_Lover »

rxu wrote:
Thu Jul 02, 2020 4:24 am
php_BB_Lover, you're free to do anything you want with your code, just try and you'll see if it works or not. No need to ask on every edit really, especially if that worked for you.
Thanks.
thank you,
Version: phpBB 3.3.0
Theme: default
Regards
php_BB_Lover
I've Been Banned!
Posts: 352
Joined: Tue Jun 23, 2020 5:18 am

hide category

Post by php_BB_Lover »

Hi,
how to hide category20 with all its forums from index page?
thanks
Version: phpBB 3.3.0
Theme: default
Regards
rxu
Extensions Development Team
Posts: 3406
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: hide category

Post by rxu »

ACP->Permissions->Group forum permissions->Look up usergroup: Registered users->Select a forum: category20->Role: No Access.
rxu
Extensions Development Team
Posts: 3406
Joined: Wed Oct 25, 2006 12:46 pm
Location: Siberia, Russian Federation
Name: Ruslan
Contact:

Re: Remove from search

Post by rxu »

Lol. You guys are taking it too serious, as for me.

Not tested:

Code: Select all

OPEN
includes/functions_display.php

FIND
function display_forums

FIND
		extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_row', compact($vars)));

		$forum_id = $row['forum_id'];

AFTER, ADD
		include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);

		$ex_forum_ids = [];
		$forum_branch = get_forum_branch(20, 'children', true);
		foreach ($forum_branch as $forum_data)
		{
			$ex_forum_ids[] = $forum_data['forum_id'];
		}

		if (in_array($forum_id, $ex_forum_ids))
		{
			continue;
		}
php_BB_Lover
I've Been Banned!
Posts: 352
Joined: Tue Jun 23, 2020 5:18 am

Re: Remove from search

Post by php_BB_Lover »

rxu wrote:
Tue Jul 07, 2020 10:15 am
Lol. You guys are taking it too serious, as for me.

Not tested:

Code: Select all

OPEN
includes/functions_display.php

FIND
function display_forums

FIND
		extract($phpbb_dispatcher->trigger_event('core.display_forums_modify_row', compact($vars)));

		$forum_id = $row['forum_id'];

AFTER, ADD
		include_once($phpbb_root_path . 'includes/functions_admin.' . $phpEx);

		$ex_forum_ids = [];
		$forum_branch = get_forum_branch(20, 'children', true);
		foreach ($forum_branch as $forum_data)
		{
			$ex_forum_ids[] = $forum_data['forum_id'];
		}

		if (in_array($forum_id, $ex_forum_ids))
		{
			continue;
		}
@rxu You are hero. The best. Everyone should learn from you.
Everyone here just talk. Talking is not bad. But they ONLY talk and no production. I haven't seen any answer from them at all. Just you and 2 other guys.
Thank you. Thank you. Thank you.
I'm on the phone now. I will test it in a few hours and let you know.
Version: phpBB 3.3.0
Theme: default
Regards
php_BB_Lover
I've Been Banned!
Posts: 352
Joined: Tue Jun 23, 2020 5:18 am

Re: Remove from search

Post by php_BB_Lover »

rxu wrote:
Tue Jul 07, 2020 10:15 am
Not tested:
thank you, its working good!
i used to do this with other method with only one line code: line51: $sql_where='f.forum_id <> 20';
it was working good until i realized other big problem.
but your code is working with no problem. (only one small problem but that's not a big deal)
thank you very much!
Version: phpBB 3.3.0
Theme: default
Regards
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 4158
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Remove from search

Post by thecoalman »

The question has been thoroughly answered. I've closed this and removed the unnecessary posts so it doesn't continue down the same path.

@everyone, if you do not want to to answer a question simply don't so we don't end up with four pages of unrelated posts. If anything you are hindering someone else that has taken the initiative find an answer and has to wade through a bunch of unrelated material.

@php_BB_Lover you can get a lot of help here but most posters are going to expect you take some initiative yourself. Last but not least please do not ask new and unrelated questions in the same topic, start a new one.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
Locked

Return to “phpBB Custom Coding”