Implemented Template Hooks

  • Thread starter Thread starter ragtek
  • Start date Start date
R

ragtek

Guest
Sure that the Beta 3 Templates are ok?

I couldn't find any <xen:hook> in the templates.
We have the code listener but how can we use it without hooks in the templates?
 
Upvote 0
This suggestion has been implemented. Votes are no longer accepted.
Yeah, as mentioned in the announcement, the framework to implement it was added, but the templates haven't been updated to use them yet. If there are particular places where you're interested in adding things, do let us know. :)
 
Admin Template Hook Request:

Template: user_search

Hook inside
<xen:topctrl>
<xen:popup title="{xen:phrase common_searches}">
<xen:link href="{xen:adminlink users/list}">{xen:phrase all_users}</xen:link>
<xen:link href="{xen:adminlink users/list, '', 'order=register_date', 'direction=desc'}">{xen:phrase newest_registrations}</xen:link>
<xen:link href="{xen:adminlink users/list, '', 'order=last_activity', 'direction=desc'}">{xen:phrase recently_active}</xen:link>
<xen:link href="{xen:adminlink users/list, '', 'order=message_count', 'direction=desc'}">{xen:phrase most_messages}</xen:link>
</xen:popup>
</xen:topctrl>
to be able to add own "predefined searches"
 
thread_view

Hook inside the Thread Tools / Watch Thread link group.

I would like to add some custom thread controls there.
Suggestion: Add template hooks for moderation: Inline Mod Controls of threads and posts and near Thread Tools (thread_view). Then it will be easier to additional functionality.

+2

Would be nice to be able to add the "View History" link to the Thread Tools menu without a template edit.

Image%202012.07.14%209:10:14%20PM.png
 
The hook node_forum_level_2_before_lastpost as no Params. The forum-Params are very userful at that state for me.

Please change it to:

HTML:
        <xen:hook name="node_forum_level_2_before_lastpost" params="{xen:array 'forum={$forum}'}" />
Also ran into the same problem...
 
Admintemplate language_edit
A hook inside the form to be able to add own form fields please:)

It's easier to use hooks and the search and replace slots instead of the template_post_render event
 
I hope they are not going to be completely removed as they are very useful in running small pieces of code without having to extend a function or even a model.
 
I'm not against adding some for 1.1.5 (I added some for 1.1.4), but on the whole, seeing what can be done in 1.2 is probably better.
 
Top Bottom