File size: 20.16Kb
<?xml version="1.0" encoding="utf-8"?>
<template_modifications>
<modification type="public" template="EWRporta_article_macros" modification_key="threactions_EWRporta_article_macros_" description="Removes the default like bar from posts" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="likesBar.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('post') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="EWRporta_article_macros" modification_key="threactions_EWRporta_article_macros_bar_abovesig" description="Adds the reactions bar to posts (above signature)" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xf:macro template="message_macros" name="signature" arg-user="{$post.User}" />]]></find>
<replace><![CDATA[<xf:if is="th_reaction_bar_position('post') == 'abovesig'">
<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="post" arg-id="post_id" arg-content="{$post}" />
</xf:if>
$0]]></replace>
</modification>
<modification type="public" template="EWRporta_article_macros" modification_key="threactions_EWRporta_article_macros_bar_belowsig" description="Adds the reactions bar to posts (below signature)" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<footer class="message-footer">]]></find>
<replace><![CDATA[<xf:if is="th_reaction_bar_position('post') == 'belowsig'">
<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="post" arg-id="post_id" arg-content="{$post}" />
</xf:if>
$0]]></replace>
</modification>
<modification type="public" template="EWRporta_article_macros" modification_key="threactions_EWRporta_article_macros_button" description="Removes the default like/unlike button from posts" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$post.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('post') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="PAGE_CONTAINER" modification_key="threactions_footer_copyright" description="Add copyright information." execution_order="10" enabled="1" action="callback">
<find><![CDATA[/{{ phrase\('extra_copyright'\) }}/]]></find>
<replace><![CDATA[ThemeHouse\Core\Branding::renderAddonBranding]]></replace>
</modification>
<modification type="public" template="account_visitor_menu" modification_key="th_account_visitor_menu_reactions" description="Adds reactions count to visitor menu" execution_order="4" enabled="1" action="preg_replace">
<find><![CDATA[/<!--\[XF:stats_pairs:above_likes]-->.*?<\/dl>/s]]></find>
<replace><![CDATA[<!--\[XF:stats_pairs:above_likes]-->
<xf:macro template="th_display_reactions" name="react_total_text" arg-reacts="{$xf.visitor.react_count}" arg-reactsCount="{$xf.visitor.getReactTotalCount()}" />]]></replace>
</modification>
<modification type="public" template="conversation_list_macros" modification_key="th_conversation_list_macros_reactions" description="Adds the first post reactions to the conversation list item" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/(<ul class="structItem-statuses">.*<\/ul>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[$0
<xf:macro template="th_display_reactions" name="reactions_bit_list" arg-type="conversation_message" arg-id="first_message_id" arg-content="{$userConv.Master}" arg-reactUsers="{$userConv.Master.getReactUsers()}" />]]></replace>
</modification>
<modification type="public" template="conversation_message_macros" modification_key="th_conversation_message_macros_bar_reactions" description="Adds the reactions bar to conversation messages" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<footer class="message-footer">]]></find>
<replace><![CDATA[<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="conversation_message" arg-id="message_id" arg-content="{$message}" />
$0]]></replace>
</modification>
<modification type="public" template="conversation_message_macros" modification_key="th_conversation_message_macros_button_reactions" description="Removes the default like/unlike button from conversation messages" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$message.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('conversation_message') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="conversation_message_macros" modification_key="th_conversation_message_macros_likeBar_reactions" description="Removes the default like bar from conversation messages" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="likesBar.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('conversation_message') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="admin" template="helper_criteria" modification_key="threact_helper_criteria" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<!--[XF:user:after_groups]-->]]></find>
<replace><![CDATA[$0
<xf:include template="threact_criteria_user" />]]></replace>
</modification>
<modification type="public" template="member_macros" modification_key="threact_member_macros_replaceLikes" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<dt title="{{ phrase\('likes_received'\)(.*?)<\/dd>/s]]></find>
<replace><![CDATA[<dt title="{{ phrase('threact_reactions_received')}}">{{ phrase('threact_reactions') }}</dt>
<dd>
<a href="{{ link('members/reactions', $user, {'type': 'received'}) }}" class="fauxBlockLink-linkRow u-concealed">
{$user.getReactTotalCount()|number}
</a>
</dd>]]></replace>
</modification>
<modification type="public" template="member_view" modification_key="threactions_member_view_tab" description="Add reaction tab to member view page." execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<!--[XF:tabs:after_recent_content]-->]]></find>
<replace><![CDATA[<xf:if is="$xf.options.threactions_displayProfileTab">
<a href="{{ link('members/reaction-stats', $user) }}"
class="tabs-tab"
id="reaction-stats"
role="tab">{{ phrase('threactions_reactions') }}</a>
</xf:if>
$0]]></replace>
</modification>
<modification type="public" template="member_view" modification_key="threactions_member_view_tabcontent" description="Add reaction tab content to member view page." execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<!--[XF:tab_panes:after_recent_content]-->]]></find>
<replace><![CDATA[<xf:if is="$xf.options.threactions_displayProfileTab">
<li data-href="{{ link('members/reaction-stats', $user) }}"
role="tabpanel"
aria-labelledby="reaction-stats">
<div class="blockMessage">{{ phrase('loading...') }}</div>
</li>
</xf:if>
$0]]></replace>
</modification>
<modification type="public" template="message_macros" modification_key="th_message_macros_reactions" description="Puts the user's given react count into the postbit." execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/(<div class="message-userExtras">.*<xf:contentcheck>)(.*?)(<\/xf:contentcheck>.*<\/div>)/Us]]></find>
<replace><![CDATA[$1
<xf:if is="{{ property('th_showReactionsPostbit_reactions') }} && {{ property('th_showReactionsPostbit_location_reactions') }} == 'top'">
<xf:macro template="th_display_reactions" name="react_postbit" arg-reacts="{$user.react_count}" arg-reactsCount="{$user.getReactTotalCount()}" arg-displayType="{{ property('th_showReactionsPostbit_displayType_reactions') }}" arg-displayLocation="top" />
</xf:if>
$2
<xf:if is="{{ property('th_showReactionsPostbit_reactions') }} && {{ property('th_showReactionsPostbit_location_reactions') }} == 'bottom'">
<xf:macro template="th_display_reactions" name="react_postbit" arg-reacts="{$user.react_count}" arg-reactsCount="{$user.getReactTotalCount()}" arg-displayType="{{ property('th_showReactionsPostbit_displayType_reactions') }}" arg-displayLocation="bottom" />
</xf:if>
$3]]></replace>
</modification>
<modification type="public" template="message_macros" modification_key="threact_message_macros_replaceLikes" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<dt>{{ phrase\('likes'\)(.*?)<\/dd>/s]]></find>
<replace><![CDATA[<dt>{{ phrase('threact_reactions') }}</dt>
<dd>{$user.getReactTotalCount()|number}</dd>]]></replace>
</modification>
<modification type="public" template="post_macros" modification_key="th_post_macros_bar_abovesig_reactions" description="Adds the reactions bar to posts (above signature)" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xf:macro template="message_macros" name="signature" arg-user="{$post.User}" />]]></find>
<replace><![CDATA[<xf:if is="th_reaction_bar_position('post') == 'abovesig'">
<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="post" arg-id="post_id" arg-content="{$post}" />
</xf:if>
$0]]></replace>
</modification>
<modification type="public" template="post_macros" modification_key="th_post_macros_bar_belowsig_reactions" description="Adds the reactions bar to posts (below signature)" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<footer class="message-footer">]]></find>
<replace><![CDATA[<xf:if is="th_reaction_bar_position('post') == 'belowsig'">
<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="post" arg-id="post_id" arg-content="{$post}" />
</xf:if>
$0]]></replace>
</modification>
<modification type="public" template="post_macros" modification_key="th_post_macros_button_reactions" description="Removes the default like/unlike button from posts" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$post.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('post') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="post_macros" modification_key="th_post_macros_likeBar_reactions" description="Removes the default like bar from posts" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="likesBar.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('post') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="profile_post_macros" modification_key="th_profile_post_comments_macros_bar_reactions" description="Adds the reactions bar to profile post comments" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<footer class="comment-footer">]]></find>
<replace><![CDATA[<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="profile_post_comment" arg-id="profile_post_comment_id" arg-content="{$comment}" />
$0]]></replace>
</modification>
<modification type="public" template="profile_post_macros" modification_key="th_profile_post_comments_macros_button_reactions" description="Removes the default like/unlike button from profile post comments" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$comment.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('profile_post_comment') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="profile_post_macros" modification_key="th_profile_post_macros_bar_reactions" description="Adds the reactions bar to profile posts" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<footer class="message-footer">]]></find>
<replace><![CDATA[<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="profile_post" arg-id="profile_post_id" arg-content="{$profilePost}" />
$0]]></replace>
</modification>
<modification type="public" template="profile_post_macros" modification_key="th_profile_post_macros_button_reactions" description="Removes the default like/unlike button from profile posts" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$profilePost.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('profile_post') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="profile_post_macros" modification_key="th_profile_post_macros_comment_likeBar_reactions" description="Removes the default like bar from profile post comments" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="comment-likes.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('profile_post_comment') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="profile_post_macros" modification_key="th_profile_post_macros_likeBar_reactions" description="Removes the default like bar from profile posts" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="message-responseRow message-responseRow--likes.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('profile_post') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="thpostcomments_post_macros" modification_key="threactions_thpostcomments_macros_button" description="Remove like button." execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[$post.canLike()]]></find>
<replace><![CDATA[false]]></replace>
</modification>
<modification type="public" template="thpostcomments_post_macros" modification_key="threactions_thpostcommets_macros_bar" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<footer class="message-footer">]]></find>
<replace><![CDATA[<xf:macro template="th_display_reactions"
name="reactions_bar"
arg-type="post"
arg-id="post_id"
arg-content="{$post}" />
$0]]></replace>
</modification>
<modification type="public" template="thread_list_macros" modification_key="th_thread_list_macros_reactions" description="Adds the first post reactions to the thread list item" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/(<ul class="structItem-statuses">.*<\/ul>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[$0
<xf:if is="{{ th_react_handler_status('post') }}">
<xf:macro template="th_display_reactions"
name="reactions_bit_list"
arg-type="post"
arg-id="first_post_id"
arg-content="{$thread}"
arg-reactUsers="{$thread.getReactUsers()}"
arg-limit="{{ true }}"/>
</xf:if>
]]></replace>
</modification>
<modification type="public" template="xfmg_album_view" modification_key="threactions_xfmg_album_view_bar" description="Adds the reactions bar to album items" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<xf:if contentcheck="true">\n[ \t]+<div class="actionBar-set actionBar-set--external">/]]></find>
<replace><![CDATA[<xf:macro template="th_display_reactions"
name="reactions_bar"
arg-type="xfmg_album"
arg-id="album_id"
arg-content="{$album}" />
$0]]></replace>
</modification>
<modification type="public" template="xfmg_album_view" modification_key="threactions_xfmg_album_view_button" description="Removes the default like/unlike button from album" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$album.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('xfmg_album') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="xfmg_album_view" modification_key="threactions_xfmg_album_view_likeBar" description="Removes the default like bar from album" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="likesBar.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('xfmg_album') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="xfmg_comment_macros" modification_key="threactions_xfmg_media_comment_makros_bar" description="Adds the reactions bar to media comment items" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<xf:if contentcheck="true">\n[ \t]+<div class="message-actionBar actionBar">/]]></find>
<replace><![CDATA[<xf:macro template="th_display_reactions"
name="reactions_bar"
arg-type="xfmg_comment"
arg-id="comment_id"
arg-content="{$comment}" />
$0]]></replace>
</modification>
<modification type="public" template="xfmg_comment_macros" modification_key="threactions_xfmg_media_comment_makros_button" description="Removes the default like/unlike button from media comment" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$comment.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('xfmg_comment') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="xfmg_comment_macros" modification_key="threactions_xfmg_media_comment_makros_likeBar" description="Removes the default like bar from media comment" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="likesBar.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('xfmg_comment') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="xfmg_media_view" modification_key="th_xfmg_media_view_bar_reactions" description="Adds the reactions bar to media items" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<xf:if contentcheck="true">\n[ \t]+<div class="actionBar">/]]></find>
<replace><![CDATA[<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="xfmg_media" arg-id="media_id" arg-content="{$mediaItem}" />
$0]]></replace>
</modification>
<modification type="public" template="xfmg_media_view" modification_key="th_xfmg_media_view_button_reactions" description="Removes the default like/unlike button from media" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$mediaItem.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('xfmg_media') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="xfmg_media_view" modification_key="th_xfmg_media_view_likeBar_reactions" description="Removes the default like bar from media" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="likesBar.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('xfmg_media') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="xfrm_resource_view" modification_key="th_xfrm_resource_view_bar_reactions" description="Adds the reactions bar to resources" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/<xf:if contentcheck="true">\n[ \t]+<div class="actionBar">/]]></find>
<replace><![CDATA[<xf:macro template="th_display_reactions" name="reactions_bar" arg-type="resource_update" arg-id="resource_update_id" arg-content="{$description}" />
$0]]></replace>
</modification>
<modification type="public" template="xfrm_resource_view" modification_key="th_xfrm_resource_view_button_reactions" description="Removes the default like/unlike button from resources" execution_order="10" enabled="1" action="preg_replace">
<find><![CDATA[/(<xf:if is="\$description.canLike\(\)">.*<a.*<\/a>.*<\/xf:if>)/Us]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('resource_update') }}">
$0
</xf:if>]]></replace>
</modification>
<modification type="public" template="xfrm_resource_view" modification_key="th_xfrm_resource_view_likeBar_reactions" description="Removes the default like bar from resources" execution_order="500" enabled="1" action="preg_replace">
<find><![CDATA[/<div class="likesBar.*?<\/div>/s]]></find>
<replace><![CDATA[<xf:if is="!{{ th_react_handler_status('resource_update') }}">
$0
</xf:if>]]></replace>
</modification>
</template_modifications>