ElkArte Community

Elk Development => Feature Discussion => Exterminated Features => Topic started by: emanuele on January 10, 2014, 03:48:17 pm

Title: Linktree
Post by: emanuele on January 10, 2014, 03:48:17 pm
Code: [Select]
function theme_linktree($force_show = false)
{
global $context, $settings;

// If linktree is empty, just return - also allow an override.
if (empty($context['linktree']) || (!empty($context['dont_default_linktree']) && !$force_show))
return;
Does anyone know why do we need a force? ???
Also the dont_default_linktree... ??? I looks like a way to use a custom linktree template...?

Who votes for merciless removal?

The only option I could[1] is a parameter to use another index in $context for the linktree, for example:
Code: [Select]
function theme_linktree($default = 'linktree')
{
global $context, $settings;

// If linktree is empty, just return - also allow an override.
if (empty($context[$default]))
return;

foreach ($context[$default] as $link_num => $tree)
[...]
Do we want that?
Not yet sure
Title: Re: Linktree
Post by: Spuds on January 10, 2014, 07:52:36 pm
I'm not sure what all that stuff is, probably needed by some theme or mod at some point.  Seems safe enough to remove, and replace with the option you show, or just do the merciless removal and be done :D
Title: Re: Linktree
Post by: emanuele on January 11, 2014, 01:42:35 pm
https://github.com/emanuele45/Dialogo/commit/da775e254fb1c37bd591dc8ba97dbf46d2868c52