Page 4 of 4

Re: Remove from search

Posted: Wed Jul 01, 2020 10:58 am
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

Re: Remove from search

Posted: Wed Jul 01, 2020 11:00 am
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

Re: Remove from search

Posted: Wed Jul 01, 2020 11:13 am
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

Re: Remove from search

Posted: Wed Jul 01, 2020 12:08 pm
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

Re: Remove from search

Posted: Thu Jul 02, 2020 4:24 am
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.

Re: Remove from search

Posted: Thu Jul 02, 2020 4:32 am
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,

hide category

Posted: Tue Jul 07, 2020 6:57 am
by php_BB_Lover
Hi,
how to hide category20 with all its forums from index page?
thanks

Re: hide category

Posted: Tue Jul 07, 2020 7:04 am
by rxu
ACP->Permissions->Group forum permissions->Look up usergroup: Registered users->Select a forum: category20->Role: No Access.

Re: Remove from search

Posted: Tue Jul 07, 2020 10:15 am
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;
		}

Re: Remove from search

Posted: Tue Jul 07, 2020 6:20 pm
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.

Re: Remove from search

Posted: Tue Jul 07, 2020 9:15 pm
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!

Re: Remove from search

Posted: Tue Jul 07, 2020 10:23 pm
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.