Skip to main content
Topic: Modifying the link tree (Read 5909 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Modifying the link tree

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.

Re: Modifying the link tree

Reply #1

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.

Re: Modifying the link tree

Reply #2

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.

Re: Modifying the link tree

Reply #3

This is done.
Bugs creator.
Features destroyer.
Template killer.