ElkArte Community

Elk Development => Feature Discussion => Exterminated Features => Topic started by: Arantor on August 19, 2013, 03:09:58 pm

Title: Modifying the link tree
Post by: Arantor on August 19, 2013, 03:09:58 pm
So yeah, I'm working on an SMF portal. Long story.

Anyway. I realised how much effort it was to modify the linktree when you're not just adding a new item on the end for the current action. Specifically, I needed to splice in a linktree item for the forum as a whole (and rewrite the linktree to fix category links), and while I realise this is a niche task, it doesn't change that it's a pain in the posterior to do.

I ended up doing it off the back of the menu editing hook (since the linktree is used in template_header, and before the bulk of that runs, setupThemeContext and setupMenuContext have been run) but it felt incredibly odd to have to do that.

Might also be nice to have an array_insert type function to insert a given value somewhere into an array without having to splice the array or similar.
Title: Re: Modifying the link tree
Post by: Spuds on August 19, 2013, 07:02:30 pm
Portals can be fun, but you can't call it  YAPM :P .... portals certainly seem to be an interesting area of study, SMF has several and each seems to have its own support site and following as well which I find interesting (TP, SP, DP, MX etc) ... Do you have any particular goals in mind?   Will it be OS so it can be ported  O:-)

QuoteMight also be nice to have an array_insert type function to insert a given value somewhere into an array without having to splice the array or similar.
Eman was working on a class to help with inserting menu items so authors could more easy insert items, I'll let him describe that in detail should he want.  Maybe that can be extended to help with the linktree as well.
Title: Re: Modifying the link tree
Post by: Arantor on August 19, 2013, 07:43:14 pm
I have several goals, some of which I'm not sharing at this time. However... 'as powerful as possible, as complex as necessary' is definitely one of them.

It will not be open source in the definition of the term, it will be available only from my site for SMF use only - it'd be an absolute plumbers crack to port to anything else (even Wedge or Elkarte would be a nightmare)

I don't mean a complex class to add menu items, I just mean a simple function a la array_insert to splice items in conveniently into any array.
Title: Re: Modifying the link tree
Post by: emanuele on December 11, 2013, 03:17:08 am
This is done.