Implemented Template Hooks

Bob

Well-known member
that's what i'm doing with
PHP:
            $search = '<!-- end block: sidebar_online_users -->';
            $contents = str_replace($search, $search . $t, $contents);
lol.. yer right, I've not had enough COFFEE this AM.. I've just seen too many time that people are replacing the subhook and not replacing it.
 
R

ragtek

Guest
I'm having some problems with hook navigation_visitor_tab_links1 and navigation_visitor_tab_links2

Most of the add-on coders use only navigation_visitor_tab_links1, so the menu looks like here:
account hook.PNG

IMHO it would be better, if it would be possible to do this like with the navbar elements.
Make a callback method, where we can pass our links and let us define if we want to show it in the left/right/random column
So it would first build the left right array, count the elements and split the other,so both have the same size.
 
R

ragtek

Guest
Admintemplate: page_edit

a hook to be able to add own form fields would be nice:)
thx

K 1.0.2
 
R

ragtek

Guest
Template: member_view

Surround pls:
Code:
    <div class="section infoBlock">
            <dl class="secondaryContent pairs">

                <xen:if is="{$canViewOnlineStatus}">
                    <dt>{xen:phrase last_activity}:</dt>
                        <dd><xen:datetime time="$user.effective_last_activity" /></dd>
                </xen:if>

                <dt>{xen:phrase joined}:</dt>
                    <dd>{xen:date $user.register_date}</dd>

                <dt>{xen:phrase messages}:</dt>
                    <dd>{xen:number $user.message_count}</dd>

                <dt>{xen:phrase likes_received}:</dt>
                    <dd>{xen:number $user.like_count}</dd>

                <dt>{xen:phrase trophy_points}:</dt>
                    <dd><a href="{xen:link 'members/trophies', $user}" class="OverlayTrigger">{xen:number $user.trophy_points}</a></dd>

            </dl>
        </div>
with an hook, so we're able to add elements in to the box

K: 1.0.2
 

Attachments

User

Well-known member
EDIT: Keeping this here for reference but this is no longer an actual request for a hook because as ajnos pointed out it wouldn't actually solve the issue. The adjustment needs to be either made in the actionMarkRead function or perhaps with some magic in the existing navigation_tabs_forums hook.

I hate to sound like a broken record about this, but I do feel that it would be helpful to have a hook into the forum_mark_read template to make it easier to disable the confirmation for marking forums or all forums as read.

Yes, a template edit is not that complicated but will ultimately result in an out-of-date template during upgrades.

Given that every other forum script out that I am aware of does not have the confirmation I do believe that some (many?) admins will want to disable the confirmation. It would be very helpful if that could be done via a hook.
 

Kier

XenForo developer
Staff member
I'd like maybe one more hook in the "message" template, one inclusive of the entire "<li>" that contains the message to place something like an ad above or below the nth message, that looks like a message. The new "ad_message_below" template in v1.0.0 almost works for me, but not quite.
This request requires further discussion, because you can not insert something other than an <li> between messages, and the system expects that each <li> represents a message.
 
R

ragtek

Guest
Suggestions marked with K: 1.0.2 have been implemented in XenForo 1.0.2.
Any reason why the acp xx_edit (nodes) hooks were not accepted?
Or is there already a way to include inputfields without editing the acp template ( john doe can't even change this without activating the debug mod, so it's impossible to add the template changes into the install instructions^^)
 

Kier

XenForo developer
Staff member
Any reason why the acp xx_edit (nodes) hooks were not accepted?
Or is there already a way to include inputfields without editing the acp template ( john doe can't even change this without activating the debug mod, so it's impossible to add the template changes into the install instructions^^)
Can you point me to that suggestion?
 

Rudy

Well-known member
This may seem odd, but I could use a hook to insert code at the bottom of each post where we have the post number, "Like" and "Reply" links. I want to add a Share link (for AddThis) between the post number and "Like" link, but am always wary of updating templates that will change when new versions are released.

Example would be on Kier's post immediately above mine, it would look like this. The "Share" could be anywhere on the righthand side, actually...

#73 Share Like Reply
 

ajnos

Member
This may seem odd, but I could use a hook to insert code at the bottom of each post where we have the post number, "Like" and "Reply" links. I want to add a Share link (for AddThis) between the post number and "Like" link, but am always wary of updating templates that will change when new versions are released.

Example would be on Kier's post immediately above mine, it would look like this. The "Share" could be anywhere on the righthand side, actually...

#73 Share Like Reply
You can use <xen:hook name="post_public_controls">
 

Rudy

Well-known member
Is this new? I did not see this hook when I looked into it a month or two ago.

Thanks for the tip!
 
R

ragtek

Guest
emplate: share_page surrounding the tweet & fb button

K - 1.0.3 (share_page and sidebar_share_page)
 
Top