SimplePortal
Customization => Custom Coding => Topic started 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?
-
$actions[$_REQUEST['sa']][1]();
If you want to hide it for the articles section of the portal.
if ($_REQUEST['sa'] == 'articles')
$context['linktree'] = array();
$actions[$_REQUEST['sa']][1]();
For all sections of the portal (including articles list, pages, shoutbox history).
$context['linktree'] = array();
$actions[$_REQUEST['sa']][1]();
-
Thanks worked great!
i think this should be a feature :)
-
This worked fine but it removed the
<hr>
line across from the menu.
-
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.
if (empty($context['linktree']))
echo '<hr />';
-
$actions[$_REQUEST['sa']][1]();
For all sections of the portal (including articles list, pages, shoutbox history).
$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!
-
i tried, but don't works:
$actions[$_REQUEST['sa']][1]();
If you want to hide it for the articles section of the portal.
if ($_REQUEST['sa'] == 'articles')
$context['linktree'] = array();
$actions[$_REQUEST['sa']][1]();
attach my file.
-
I would suggest this change instead:
Sources/Subs-Portal.php
//if (empty($context['linktree'][1]))
// $context['linktree'] = array();
if (empty($context['linktree'][1]))
$context['linktree'] = array();
-
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
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
-
Well, glad that you could solve it in the end and it's also good to know that I'm not getting old. lol