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.
Next Request => Admin Template addon_list
It would be cool, to be able to add own links into the popup menu.
under:
Code:
<xen:link href="{xen:adminlink 'add-ons/edit', $addOn}" displayif="{$canAccessDevelopment}">{xen:phrase edit}</xen:link>
For example i had to edit the template to add
Code:
<xen:link href="{xen:adminlink 'add-ons/createZip', $addOn}" displayif="{$canAccessDevelopment}">create zip</xen:link>
<xen:link href="{xen:adminlink 'add-ons/editInstallCode', $addOn}" displayif="{$canAccessDevelopment}">link sql tables</xen:link>
pls pls include this
 
What would help me a lot is making a hook execute for template includes. So when you include template "template_name" it will wrap it in a hook "template_name_included". Would simplyfy things for me a lot.
 
Any chance we'd have a hook in the account_upgrades template near the foreach loop to make it easy to add a few other payment button options (like 2checkout, alertpay, etc).
 
I'd like to see a hook in the footer to allow additional text on the bottom left below the default XF copyright phrase.

I am working on an add-on and instead of adding something to the bottom of each of the add-on pages, which would end up displaying the add-on branding at the bottom of the content area, I really, really like instead to keep it nice & clean by simply displaying another line below the existing XF copyright line.
 
Is it possible to have a hook in "node_forum_level_2" surrounding the nodeIcon portion:
Code:
<span class="nodeIcon" title="{xen:if $forum.hasNew, '{xen:phrase unread_messages}', ''}"></span>
?

(I realise you can use CSS to change the icon per node, but what I want to do is something different, probably replacing it.)
 
Hello, I would like to add a few hooks to the forum_list template around each of the default blocks. Reason being is it would be beneficial adding blocks into a few different spots other than the top or bottom (Without trickery)

  1. Add a hook around the following:
    HTML:
    <xen:include template="sidebar_online_users" />
  2. Add a hook around the following:
    HTML:
     <!-- block: forum_stats -->
    <div class="section">
    <div class="secondaryContent statsList" id="boardStats">
    <h3>{xen:phrase forum_statistics}</h3>
    <div class="pairsJustified">
    <dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
    <dd>{xen:number $boardTotals.discussions}</dd></dl>
    <dl class="messageCount"><dt>{xen:phrase messages}:</dt>
    <dd>{xen:number $boardTotals.messages}</dd></dl>
    <dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
    <dd>{xen:number $boardTotals.users}</dd></dl>
    <dl><dt>{xen:phrase latest_member}:</dt>
    <dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
    <!-- slot: forum_stats_extra -->
    </div>
    </div>
    </div>
    <!-- end block: forum_stats -->
  3. Add a hook around the following:
    HTML:
     <xen:include template="sidebar_share_page">
    <xen:set var="$url">{xen:link canonical:index}</xen:set>
    </xen:include>
 
Code:
<xen:hook name="message_below" params="{xen:array 'post={$message}','message_id={$messageId}'}" />

Just before ad_message_below in message - essentially the same hook but I need the $message and $messageId values passed through. I'm aiming to put something specific to each post below the likes area.
 
I really think it would help a lot to have a hook for when a template is included. And around every main template. template_post_render isn't a good solution. Currently I am doing a lot of DOM parsing just to edit what I want. I can see big board users getting a hit from the extra overhead on some of my mods.

I do hope the planned bigger system gets here fast.
 
I really think it would help a lot to have a hook for when a template is included. And around every main template. template_post_render isn't a good solution. Currently I am doing a lot of DOM parsing just to edit what I want. I can see big board users getting a hit from the extra overhead on some of my mods.

I do hope the planned bigger system gets here fast.

I totally agree about this. +2000.
 
I'd like to see a hook in thread_fields_status or in thread_create just below the thread_fields_status include. Right now I don't see an easy way of adding additional field options to a thread.

I am able to hook into thread_create_fields_extra which is just below. This will work, but I'd rather the extra option be up in the fieldset with the Options and the Set Thread Status.
 
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}'}" />
 
Top Bottom