Template Hooks

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

  1. Daniel Thomann Active Member

    For the sound notification addon, it would be useful to have a hook in the navigation_visitor_tab:

    Code:
    <!-- conversations popup -->
     
    <li class="navTab inbox Popup PopupControl PopupClosed">             
     
    <a href="{xen:link conversations}" rel="Menu" class="navLink NoPopupGadget">{xen:phrase inbox}
     
    <strong class="itemCount {xen:if {$visitor.conversations_unread}, '', 'Zero'}" id="ConversationsMenu_Counter" data-text="{xen:phrase you_have_x_new_unread_conversations}">
     
    <span class="Total">{xen:number $visitor.conversations_unread}</span>
     
    <span class="arrow">{ADD HOOK HERE}</span>
     
    </strong>
     
    </a>
    Thanks a lot.
  2. Hoffi Active Member

    Another one in the forum_view template. I like to see

    <xen:hook name="forum_view_threads_beneath" params="{xen:array 'forum={$forum}'}" />

    beneath the forumlist.
    Fuhrmann likes this.
  3. ragtek back2life

    admintemplate user_group_edit
    pls add a hook to be able to add own content inside of the form
    Hoffi likes this.
  4. Hoffi Active Member

    Template node_forum_level_2

    did you remove the params form the hook?

    Please add them like it was before.

    HTML:
    <xen:hook name="node_forum_level_2_before_lastpost" params="{xen:array 'forum={$forum}'}" />
  5. simbolo Active Member

    I'd like a hook between the footer links and footer legal so I could add mega footer between them.
    Within template footer

    HTML:
        </div>
    </div>
     
    <div class="footerLegal">
        <div class="pageWidth">
    HTML:
        </div>
    </div>
    <xen:hook name="footer_after_links_before_legal" />
    <div class="footerLegal">
        <div class="pageWidth">
  6. ragtek back2life

    Is there any reason, why you stopped implementing the template hook requests?

    1.1.0 was the last release with new hooks:(
    Fuhrmann likes this.
  7. Digital Doctor Well-Known Member

    Did any make it into 1.1.2 ?
  8. guiltar Well-Known Member

    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.
  9. VincentU Well-Known Member

  10. guiltar Well-Known Member

  11. MGSteve Well-Known Member

    I did look for it, but it appears no-one has suggested it - a nodeText level template hook.

    Firstly, the reason. I'm working on an addon to add 'Sponsored By x' under the Forum title, but currently there is no template hook that allows you to alter the nodeText block.

    This is fixed very simply by wrapping the nodeText div with a template hook, which then allows you to alter the HTML within the hook.

    In my case that's injecting HTML after the </h3> tag of the node title.

    I'm sure other people could find a use for altering the NodeText as well.
  12. EQnoble Equilux NobiliterĂ 

    Having these two template hooks would make my life very much easier as far as modifying navigation goes if they are something that can be added.

    Template: navigation

    Code:
    <xen:hook name="above_navtabs"></xen:hook>
    <div class="navTabs">
    

    Code:
    </ul>
       
        <xen:if is="{$visitor.user_id}"><xen:include template="navigation_visitor_tab" /></xen:if>
      </div>
    <xen:hook name="below_navtabs"></xen:hook>
    
  13. EQnoble Equilux NobiliterĂ 

    and also if possible in the footer template

    HTML:
                </xen:hook>
                </ul>
               
                <span class="helper"></span>
                <add hook here>
            </div>
  14. Rigel Kentaurus Well-Known Member

    I need to add more options next to "Edit" in the list of threads in the forumdisplay

    Template: thread_list_item
    Position
    digitalpoint and Shelley like this.
  15. Rigel Kentaurus Well-Known Member

    For that you can just modify the $forum[title] on the XenForo_ViewPublic_Forum_List class
    Shelley likes this.
  16. ragtek back2life

    A hook(with attachment as param) inside the attachmentcontainer loop would be useful, so we can add additional attachment data:)

    Code:
    <xen:foreach loop="$post.attachments" value="$attachment">
    <li class="attachment{xen:if {$attachment.thumbnailUrl}, ' image'}" title="{$attachment.filename}">
    <div class="boxModelFixer primaryContent">
     
    <div class="thumbnail">
    <xen:if is="{$attachment.thumbnailUrl} AND {$canViewAttachments}">
    <a href="{xen:link attachments, $attachment}" target="_blank" class="LbTrigger"
    data-href="{xen:link misc/lightbox}"><img 
    src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" class="LbImage" /></a>
    <xen:elseif is="{$attachment.thumbnailUrl}" />
    <a href="{xen:link attachments, $attachment}" target="_blank"><img
    src="{$attachment.thumbnailUrl}" alt="{$attachment.filename}" /></a>
    <xen:else />
    <a href="{xen:link attachments, $attachment}" target="_blank" class="genericAttachment"></a>
    </xen:if>
    </div>
     
    <div class="attachmentInfo pairsJustified">
    <h6 class="filename"><a href="{xen:link attachments, $attachment}" target="_blank">{$attachment.filename}</a></h6>
    <dl><dt>{xen:phrase file_size}:</dt> <dd>{xen:number $attachment.file_size, size}</dd></dl>
    <dl><dt>{xen:phrase views}:</dt> <dd>{xen:number $attachment.view_count}</dd></dl>
    </div>
    </div>
    </li>
    </xen:foreach>
    Shelley, simbolo and bobster65 like this.
  17. ragtek back2life

    pls add an hook (and some str_replace strings) inside the sidebar of template member_list so we're able to add own blocks
    hook.PNG

    PHP:

    <div class="section newestMembers">
    <
    div class="secondaryContent avatarHeap">
    <
    h3>{xen:phrase newest_members}</h3>
     
    <
    ol>
    <
    xen:foreach loop="$latestUsersvalue="$user">
    <
    li><xen:avatar user="$usersize="s" text="{$user.username} ({xen:datetime $user.register_date})" class="Tooltip" title="{$user.username}, {xen:phrase joined}: {xen:datetime $user.register_date}" /></li>
    </
    xen:foreach>
    </
    ol>
    </
    div>
    </
    div>
     
    <
    xen:if is="{$xenOptions.facebookAppId} AND {$xenOptions.facebookFacepile}">
    <
    xen:container var="$facebookSdk">1</xen:container>
    <
    fb:facepile width="{xen:property sidebar.width}" size="small" colorscheme="{xen:property fbColorScheme}"></fb:facepile>
    </
    xen:if>
    </
    xen:sidebar>
    Shelley likes this.
  18. Syndol Well-Known Member

    Pages:
    A hook at the bottom of pagenode_container wrapped around bottomContent
    would be very useful. Thank you.

Share This Page