Template Hooks

Discussion in 'Suggestions: Tweaks & Small Features' started by ragtek, Nov 11, 2010.

  1. Kier XenForo Developer

    forum/category/link/page edit templates now hooked-up

    help_bb_codes too.
  2. ragtek back2life

    pls pls include this
  3. Fuhrmann Well-Known Member

    A hook in news_feed_page_global, to put some blocks in sidebar..
  4. ragtek back2life

    this one is also missing:p
  5. digitalpoint Well-Known Member

    The facebook registration template would need to be included too (forget the name of it off the top of my head).
    Rigel Kentaurus and ragtek like this.
  6. Fuhrmann Well-Known Member

    A hook in the thread_move template, maybe to add some custom options
    Floris likes this.
  7. Robbo Well-Known Member

    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.
    Darkimmortal likes this.
  8. Krochinzky Member

    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).
    Fuhrmann likes this.
  9. Fuhrmann Well-Known Member

    in the template inline_mod_controls_thread to add custom controls.
  10. Kevin Well-Known Member

    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.
    Alien and Shelley like this.
  11. Despair Member

    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.)
  12. Shelley Well-Known Member

    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>
    RvG and Kevin like this.
  13. Syndol Well-Known Member

    It would be nice if hook member_view_tabs_heading wrapped the tabs <ul> so we may change the display order.
    Fuhrmann and Shelley like this.
  14. digitalpoint Well-Known Member

    I'm building an optional Two-Factor Authentication system, and a couple hooks would be helpful...

    account_security - a hook around the fieldset to allow extra option(s) to be added.
    login_bar_form & helper_login_form - a hook around the ctrlUnit for the password (so we can add an extra field to the login).
    Darkimmortal and Daracon like this.
  15. Darkimmortal Well-Known Member

    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.
    Shelley, Daracon and Fuhrmann like this.
  16. Brogan Well-Known Member

    I searched the thread and don't think it has been suggested already, can we have one in help_index to correspond with the one already in help_wrapper?
    Fuhrmann likes this.
  17. Robbo Well-Known Member

    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.
    Fuhrmann likes this.
  18. Fuhrmann Well-Known Member

    I totally agree about this. +2000.
  19. Donnie La Curan Active Member

    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.
  20. Hoffi Active Member

    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}'}" />

Share This Page