Skip to main content
Topic: CODE for removing the forum button (Read 2726 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

CODE for removing the forum button

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.
tab.JPG

Re: CODE for removing the forum button

Reply #1

Hi and welcome to elkarte.net. :)

What version of elkarte are you using? 1.0 or 1.1?
Bugs creator.
Features destroyer.
Template killer.


Re: CODE for removing the forum button

Reply #3

Still looking forward  for help

Re: CODE for removing the forum button

Reply #4

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?
Bugs creator.
Features destroyer.
Template killer.

Re: CODE for removing the forum button

Reply #5

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

Re: CODE for removing the forum button

Reply #6

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.
Bugs creator.
Features destroyer.
Template killer.

Re: CODE for removing the forum button

Reply #7

@emanuele  i really appreciate your help on this, i still have some issues i will highlight them all at once shortly. Thanks once again.

Re: CODE for removing the forum button

Reply #8

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?
Bugs creator.
Features destroyer.
Template killer.

Re: CODE for removing the forum button

Reply #9

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.

Re: CODE for removing the forum button

Reply #10

Ohhh, okay. Makes sense. :)
Bugs creator.
Features destroyer.
Template killer.

Re: CODE for removing the forum button

Reply #11

You can try FlarumStyle addon and see if you like it. It is a topic based rather than category.

Re: CODE for removing the forum button

Reply #12

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

Re: CODE for removing the forum button

Reply #13

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".
Bugs creator.
Features destroyer.
Template killer.