ElkArte Community

Project Support => Support => Topic started by: icenaija on November 03, 2016, 04:02:17 pm

Title: CODE for removing the forum button
Post by: icenaija on November 03, 2016, 04:02:17 pm
Hello all, please i need help on finding the code that output the forum tab in the menu as i don't want it to appear on my tab and when user logs out i want to direct them back to the home page(index page) not the forum page.
(Link-4314)
Title: Re: CODE for removing the forum button
Post by: emanuele on November 03, 2016, 06:45:22 pm
Hi and welcome to elkarte.net. :)

What version of elkarte are you using? 1.0 or 1.1?
Title: Re: CODE for removing the forum button
Post by: icenaija on November 03, 2016, 10:21:13 pm
Quote from: emanuele – Hi and welcome to elkarte.net. :)

What version of elkarte are you using? 1.0 or 1.1?
1.0.9
Title: Re: CODE for removing the forum button
Post by: icenaija on November 04, 2016, 05:13:06 pm
Still looking forward  for help
Title: Re: CODE for removing the forum button
Post by: emanuele on November 04, 2016, 07:00:54 pm
Yeah, today has been a rather busy day.

Sorry  for asking more questions before giving an answer, but the correct answer depends on your replies. ;)
1.0.x has not this button by default, so I guess you used an addon, right?
Ultimate menu? SimplePortal? The one used here on elkarte.net?
Title: Re: CODE for removing the forum button
Post by: icenaija on November 05, 2016, 06:29:36 am
Quote from: emanuele – Yeah, today has been a rather busy day.

Sorry  for asking more questions before giving an answer, but the correct answer depends on your replies. ;)
1.0.x has not this button by default, so I guess you used an addon, right?
Ultimate menu? SimplePortal? The one used here on elkarte.net?

thanks for your time, yes i am using simple portal on Lazy Day themes
Title: Re: CODE for removing the forum button
Post by: emanuele on November 05, 2016, 08:12:42 am
Okay, that makes things clear. :)

What you can do is remove (or maybe better comment out) these lines in sources/PortalIntegration.subs.php:
Code: [Select]
	$buttons = elk_array_insert($buttons, 'home', array(
'forum' => array(
'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'],
'data-icon' => '',
'href' => $sportalurl,
'show' => in_array($modSettings['sp_portal_mode'], array(1, 3)) && empty($context['disable_sp']),
'sub_buttons' => array(),
),
), 'after');
To comment them out, you can add two consecutive / at the beginning of each line, along the lines of:
Code: [Select]
//	$buttons = elk_array_insert($buttons, 'home', array(
// 'forum' => array(
// 'title' => empty($txt['sp-forum']) ? 'Forum' : $txt['sp-forum'],
ect.
to all the lines above.

Regarding the login/out, in the SP configuration page, there is an option "Disable Portal Redirection", make sure to remove the tick from it and save.
Title: Re: CODE for removing the forum button
Post by: icenaija on November 05, 2016, 11:13:26 am
@emanuele  i really appreciate your help on this, i still have some issues i will highlight them all at once shortly. Thanks once again.
Title: Re: CODE for removing the forum button
Post by: emanuele on November 05, 2016, 01:33:42 pm
You are welcome.
Though, I'm a bit curious (if you want to answer, of course): why do you want to hide the boards from your members?
Title: Re: CODE for removing the forum button
Post by: icenaija on November 07, 2016, 12:06:39 am
Quote from: emanuele – You are welcome.
Though, I'm a bit curious (if you want to answer, of course): why do you want to hide the boards from your members?
Sure , i don't just like the board thing, i have already created a direct link from my categories to  each board, you can check out what am doing here http://icenaija.com.ng while you await my next list of questions (smile). Thank you once again.
Title: Re: CODE for removing the forum button
Post by: emanuele on November 07, 2016, 05:03:15 am
Ohhh, okay. Makes sense. :)
Title: Re: CODE for removing the forum button
Post by: ahrasis on November 07, 2016, 10:10:51 am
You can try FlarumStyle addon and see if you like it. It is a topic based rather than category.
Title: Re: CODE for removing the forum button
Post by: icenaija on November 08, 2016, 10:53:59 pm
Hello am back again with more questions, please where can i fined the array for "my account" that show on the menu bar when a user logs in, also where can i find the email text that is sent to a user for confirmation finally how can i convert my urls to pretty url for SEO optimization
Title: Re: CODE for removing the forum button
Post by: emanuele on November 09, 2016, 04:00:25 am
Quote from: icenaija – please where can i fined the array for "my account" that show on the menu bar when a user logs in
It's in... Subs.php (sorry, has been moved around in 1.1 and I'm mixing the two. xD
I'm not sure what you want to change, take in consideration there is a degree of customizability for the

Quote from: icenaija – also where can i find the email text that is sent to a user for confirmation
In themes/default/languages/english/EmailTemplates.english.php
Depending on the type of confirmation there are different texts. If you have problems finding the correct one, please give more details on how you set up the registration so we can point you in the right direction. ;)

Quote from: icenaija – finally how can i convert my urls to pretty url for SEO optimization
ehh... that's a bit of a tricky part.
There is http://www.elkarte.net/community/index.php?topic=513.0 but it's far from being perfect. If you plan to use it, read it until the end of the topic (it's just 5 pages, not much) because there are few suggestions on how set it up "properly".