SimplePortal

Customization => Custom Coding => Topic started by: SN on January 30, 2010, 05:54:31 AM

Title: Remove Link Tree?
Post by: SN on January 30, 2010, 05:54:31 AM
How can i remove the Link tree from the Portal/Frontpage, but not remove it from the forum?
Title: Re: Remove Link Tree?
Post by: Nathaniel on January 30, 2010, 07:42:55 AM
Code: ("Find (Sources/PortalMain.php)") [Select]
$actions[$_REQUEST['sa']][1]();
If you want to hide it for the articles section of the portal.
Code: ("Replace") [Select]
if ($_REQUEST['sa'] == 'articles')
$context['linktree'] = array();

$actions[$_REQUEST['sa']][1]();

For all sections of the portal (including articles list, pages, shoutbox history).
Code: ("Replace") [Select]
$context['linktree'] = array();

$actions[$_REQUEST['sa']][1]();
Title: Re: Remove Link Tree?
Post by: SN on January 30, 2010, 08:34:21 AM
Thanks worked great!

i think this should be a feature :)
Title: Re: Remove Link Tree?
Post by: Mick. on February 10, 2010, 09:28:01 PM
This worked fine but it removed the
Code: [Select]
<hr> line across from the menu.
Title: Re: Remove Link Tree?
Post by: Nathaniel on February 10, 2010, 10:06:03 PM
Ah, that's because its not actually a <hr /> tag. It is the border at the top of the div which contains the linktree. ;)

If you want to add a <hr /> tag then you will have to add some code like this to the bottom of the 'template_body_above' function from your 'Themes/{themename}/index.template.php' file.

Code: [Select]
if (empty($context['linktree']))
    echo '<hr />';
Title: Re: Remove Link Tree?
Post by: allemand1 on May 08, 2010, 08:06:36 PM
Code: ("Find (Sources/PortalMain.php)") [Select]
$actions[$_REQUEST['sa']][1]();
For all sections of the portal (including articles list, pages, shoutbox history).
Code: ("Replace") [Select]
$context['linktree'] = array();

$actions[$_REQUEST['sa']][1]();
I made that modification, but the linktree only disappear from the Frontpage (home). In the others simpleportal pages it appears.
Simpleportal 2.3.2 SMF 2.0RC3

Thanks for your time!
Title: Re: Remove Link Tree?
Post by: Snoopix on December 21, 2013, 04:57:54 PM
i tried, but don't works:

Code: ("Find (Sources/PortalMain.php)") [Select]
$actions[$_REQUEST['sa']][1]();
If you want to hide it for the articles section of the portal.
Code: ("Replace") [Select]
if ($_REQUEST['sa'] == 'articles')
$context['linktree'] = array();

$actions[$_REQUEST['sa']][1]();

attach my file.
Title: Re: Remove Link Tree?
Post by: [SiNaN] on December 23, 2013, 01:31:53 AM
I would suggest this change instead:

Sources/Subs-Portal.php

Code: (Find) [Select]
//if (empty($context['linktree'][1]))
// $context['linktree'] = array();

Code: (Replace) [Select]
if (empty($context['linktree'][1]))
$context['linktree'] = array();
Title: Re: Remove Link Tree?
Post by: Snoopix on January 24, 2014, 02:35:58 AM
this code only remove mysite.com/index.php?action=forum link tree, but no mysite.com (portal home page) link tree ... = (

----

edit:

ok,  "optimus brave" mod was the problem, so i remove this line

Code: [Select]
if (empty($context['current_board']) && empty($context['current_topic']) && empty($_REQUEST['action'])) {
$context['linktree'][0]['name'] = $mbname;
$context['canonical_url'] = $boardurl . '/';

on subs-optimus.php and works

Title: Re: Remove Link Tree?
Post by: [SiNaN] on January 24, 2014, 04:19:52 PM
Well, glad that you could solve it in the end and it's also good to know that I'm not getting old. lol
SimplePortal 2.3.8 © 2008-2024, SimplePortal