Hi.
I've got SMF 2.0.4 and SimplePortal 2.3.5.
I did this to remove the linktree from the portal and the forum index, as it's just a single link and looks ugly:
Open ./Sources/Subs-Portal.php
Find:
// If you want to remove Forum link when it is
// alone, take out the following two comment lines.
//if (empty($context['linktree'][1]))
// $context['linktree'] = array();
That worked perfectly. But I just installed Optimus Brave (http://custom.simplemachines.org/mods/index.php?mod=2659) and it's put the linktree back.
Is there anyway to remove it again? I don't want it on the portal page or index, but it's fine anywhere else.
Thanks for any help.
Anyone?
I never used SP (or any other portal) but, from a clean SMF install, you should be able to "kill" the linktree just by comment this:
// Show the navigation tree.
theme_linktree();
in index.template.php
I don't really want to kill it completely, just do what that SP code does and remove it when there's only a single linktree item.
Then maybe replace with this:
if (!empty($context['current_topic']) || !empty($context['current_board']) || !empty($context['current_action']))
theme_linktree();
But this will almost certainly collide with some portal action I believe. You can use this as a base for your tests.
Before this code, you can add (temporarily):
echo $context['current_action'];
This will show you the current action in all pages so you can adjust that condition above to fit your needs.
What this code
if (empty($context['linktree'][1]))
$context['linktree'] = array();
is supposed to do (when uncommented, remove // ) is if there is only one element in the linktree, to remove that one element, leaving an empty linktree (showing nothing). The two lines are just supposed to have the // removed, not be erased entirely. Did Optimus Brave restore that code (comment it back out), or did it add something later on that left you with just one linktree node?