2016-02-28 15:08:20 +00:00
<?xml version="1.0" encoding="utf-8"?>
2016-07-09 20:32:01 +00:00
<addon addon_id= "moodBadge" title= "[kiror] Mood Badge" version_string= "0.5" version_id= "5" url= "https://github.com/adlerosn/" install_callback_class= "moodBadge_setup" install_callback_method= "install" uninstall_callback_class= "moodBadge_setup" uninstall_callback_method= "uninstall" >
2016-02-28 15:08:20 +00:00
<admin_navigation />
<admin_permissions />
<admin_style_properties />
2016-07-09 20:32:01 +00:00
<admin_templates >
<template title= "kiror_option_template_custom_badge_adder" > <![CDATA[<xen:require js="js/xenforo/options_censor.js" />
<xen:controlunit label= "{$preparedOption.title}" hint= "{$preparedOption.hint}" >
<xen:explain > {xen:raw $preparedOption.explain}</xen:explain>
<xen:html >
<ul >
<xen:foreach loop= "$choices" key= "$counter" value= "$choice" >
<li >
<xen:textbox name= "{$fieldPrefix}[{$preparedOption.option_id}][{$counter}][0]" value= "{$choice.0}" placeholder= "Emoji character" size= "20" />
<xen:textbox name= "{$fieldPrefix}[{$preparedOption.option_id}][{$counter}][1]" value= "{$choice.1}" placeholder= "Text description" size= "20" />
</li>
</xen:foreach>
<li class= "CensorWordOptionListener" >
<xen:textbox name= "{$fieldPrefix}[{$preparedOption.option_id}][{$nextCounter}][0]" value= "" placeholder= "Emoji character" size= "20" />
<xen:textbox name= "{$fieldPrefix}[{$preparedOption.option_id}][{$nextCounter}][1]" value= "" placeholder= "Text description" size= "20" />
</li>
</ul>
<input type= "hidden" name= "{$listedFieldName}" value= "{$preparedOption.option_id}" />
{xen:raw $editLink}
</xen:html>
</xen:controlunit> ]]></template>
</admin_templates>
2016-02-28 15:08:20 +00:00
<admin_template_modifications />
<code_events />
<code_event_listeners />
<cron />
<email_templates />
<email_template_modifications />
2016-02-28 22:17:35 +00:00
<optiongroups >
2016-07-09 20:32:01 +00:00
<group group_id= "moodbadgeoptgrp" display_order= "7" debug_only= "0" />
<option option_id= "moodBadgeExtras" edit_format= "callback" data_type= "array" can_backup= "1" validation_class= "moodBadge_sharedStatic" validation_method= "verifier_AdminCP_CustomFieldsAdder" >
<default_value > a:0:{}</default_value>
<edit_format_params > moodBadge_sharedStatic::render_AdminCP_CustomFieldsAdder</edit_format_params>
<sub_options > *</sub_options>
<relation group_id= "moodbadgeoptgrp" display_order= "2" />
</option>
2016-02-28 22:17:35 +00:00
<option option_id= "moodBadgeMessageDenied" edit_format= "textbox" data_type= "string" can_backup= "1" >
<default_value > Sorry, your user group can't do this right now.</default_value>
<edit_format_params > </edit_format_params>
<sub_options > </sub_options>
<relation group_id= "moodbadgeoptgrp" display_order= "1" />
</option>
</optiongroups>
2016-02-28 15:08:20 +00:00
<permissions >
<permission_groups />
2016-02-28 22:17:35 +00:00
<permissions >
<permission permission_group_id= "forum" permission_id= "moodbadgeset" permission_type= "flag" default_value= "unset" interface_group_id= "moodbadgegroup" display_order= "1" />
</permissions>
<interface_groups >
<interface_group interface_group_id= "moodbadgegroup" display_order= "120" />
</interface_groups>
2016-02-28 15:08:20 +00:00
</permissions>
2016-02-28 22:17:35 +00:00
<phrases >
2016-07-09 20:32:01 +00:00
<phrase title= "option_group_moodbadgeoptgrp" version_id= "5" version_string= "0.5" > <![CDATA[[kiror] Mood Badge Option]]> </phrase>
<phrase title= "option_group_moodbadgeoptgrp_description" version_id= "5" version_string= "0.5" > <![CDATA[Options for mood badge]]> </phrase>
<phrase title= "option_moodBadgeExtras" version_id= "3" version_string= "0.3" > <![CDATA[Extra Mood Badges]]> </phrase>
<phrase title= "option_moodBadgeExtras_explain" version_id= "3" version_string= "0.3" > <![CDATA[]]> </phrase>
2016-02-28 22:17:35 +00:00
<phrase title= "option_moodBadgeMessageDenied" version_id= "1" version_string= "0.1" > <![CDATA[Not allowed message]]> </phrase>
<phrase title= "option_moodBadgeMessageDenied_explain" version_id= "1" version_string= "0.1" > <![CDATA[<i>You may use HTML</i>]]> </phrase>
<phrase title= "permission_forum_moodbadgeset" version_id= "1" version_string= "0.1" > <![CDATA[Can set mood badge]]> </phrase>
<phrase title= "permission_interface_moodbadgegroup" version_id= "1" version_string= "0.1" > <![CDATA[Mood Badge group]]> </phrase>
</phrases>
2016-02-28 15:08:20 +00:00
<route_prefixes >
<route_type type= "public" >
<prefix original_prefix= "moodchanging" class= "moodBadge_routeinterface" build_link= "none" />
</route_type>
</route_prefixes>
<style_properties />
<templates >
2016-02-28 22:17:35 +00:00
<template title= "kiror_floating_mood_changer" version_id= "2" version_string= "0.2" > <![CDATA[<xen:title> Mood changer</xen:title>
2016-02-28 15:08:20 +00:00
<xen:container var= "$head.metaNoindex" > <meta name= "robots" content= "noindex" /> </xen:container>
<xen:require css= "kiror_floating_mood_changer.css" />
<xen:require css= "chooser_overlay.css" />
<xen:require css= "style_chooser.css" />
2016-02-28 22:17:35 +00:00
<xen:if is= "{$visitor.permissions.forum.moodbadgeset}" >
<div class= "section styleChooser" data-overlayClass= "chooserOverlay" >
2016-02-28 15:08:20 +00:00
2016-02-28 22:17:35 +00:00
<h3 class= "subHeading" > Select your mood to be displayed on the site</h3>
<ol class= "primaryContent chooserColumns twoColumns overlayScroll" >
{xen:raw $html}
2016-02-28 15:08:20 +00:00
2016-02-28 22:17:35 +00:00
</ol>
<div class= "sectionFooter overlayOnly" > <a class= "button primary OverlayCloser" > {xen:phrase cancel}</a> </div>
</div>
<xen:else />
<div class= "section styleChooser" data-overlayClass= "chooserOverlay" >
<h3 class= "subHeading" > Access denied</h3>
<div style= "background: {xen:property textCtrlBackground} ; width: 100%;" >
{xen:raw $xenOptions.moodBadgeMessageDenied}
</div>
<div class= "sectionFooter overlayOnly" > <a class= "button primary OverlayCloser" > {xen:phrase cancel}</a> </div>
</div>
</xen:if> ]]></template>
2016-02-28 15:08:20 +00:00
<template title= "kiror_floating_mood_changer.css" version_id= "0" version_string= "0.0" > < ![CDATA[.changerSelected{
background-color: {xen:property secondaryLightest};
text-decoration: none;
}]]></template>
</templates>
<public_template_modifications >
2016-02-28 20:10:53 +00:00
<modification template= "navigation_visitor_tab" modification_key= "insertcurrentmoodaccountmenu" description= "Inserts current mood in account menu" execution_order= "1000" enabled= "1" action= "str_replace" >
2016-02-28 15:08:20 +00:00
<find > <![CDATA[<xen:if hascontent="true"><div class="muted"><xen:contentcheck>{xen:helper usertitle, $visitor}</xen:contentcheck></div></xen:if>]]> </find>
<replace > <![CDATA[<xen:if hascontent="true"> <div class= "muted" > <xen:contentcheck > {xen:helper usertitle, $visitor}</xen:contentcheck> </div> </xen:if>
<xen:callback class= "moodBadge_sharedStatic" method= "getMoodTitleLowerIfDefinedCallback" params= "{xen:array 'uid={$visitor.user_id}','aft=</i></div>','pre=<div class=" m u t e d " > Feeling <i > '}"></xen:callback> ]]></replace>
</modification>
2016-09-02 19:12:47 +00:00
<modification template= "member_view" modification_key= "insertcurrentmoodininfosectionmemberview" description= "Inserts current mood in "Information" section of member view, below custom fields" execution_order= "10" enabled= "1" action= "preg_replace" >
<find > <![CDATA[#<.+?xen:if.+?customFieldsGrouped\.personal.+?xen:foreach.+?</xen:if>#s]]> </find>
<replace > < ![CDATA[$0
2016-02-28 20:10:53 +00:00
<xen:callback class= "moodBadge_sharedStatic" method= "renderMoodInProfileInfoCallback" params= "{xen:array 'uid={$user.user_id}'}" > </xen:callback> ]]></replace>
2016-02-28 15:08:20 +00:00
</modification>
<modification template= "member_card" modification_key= "insertcurrentmoodmembercard" description= "Inserts current mood in member card" execution_order= "10" enabled= "1" action= "str_replace" >
2016-09-02 19:12:47 +00:00
<find > <![CDATA[<xen:if is="{$canViewOnlineStatus}">]]> </find>
2016-02-28 15:08:20 +00:00
<replace > <![CDATA[<xen:callback class="moodBadge_sharedStatic" method="getMoodTitleLowerIfDefinedCallback" params="{xen:array 'uid={$user.user_id}','aft=</i> </div> ','pre=<div class= "muted" > {$user.username} is feeling <i > '}"></xen:callback>
2016-09-02 19:12:47 +00:00
$0]]></replace>
2016-02-28 15:08:20 +00:00
</modification>
2016-09-02 19:12:47 +00:00
<modification template= "member_view" modification_key= "insertcurrentmoodmemberview" description= "Inserts current mood in member view" execution_order= "10" enabled= "1" action= "preg_replace" >
<find > <![CDATA[#(xen:hook.+?member_view_info_block.+?)(</xen:hook>)#s]]> </find>
<replace > < ![CDATA[$0
<xen:callback class= "moodBadge_sharedStatic" method= "getMoodTitleLowerIfDefinedCallback" params= "{xen:array 'uid={$user.user_id}','aft=</i></div>','pre=<div class=" m u t e d l a s t A c t i v i t y " style= "border-top: 0px; padding-top: 0px; margin-top: 1px;" > {$user.username} is feeling <i > '}"></xen:callback> ]]></replace>
2016-02-28 15:08:20 +00:00
</modification>
2016-09-02 19:12:47 +00:00
<modification template= "message_user_info" modification_key= "insertcurrentmoodthreadreply" description= "Inserts current mood in sidebar from thread reply" execution_order= "5000" enabled= "1" action= "preg_replace" >
<find > <![CDATA[#message_user_info_custom_fields.+?</xen:if>.+?</xen:if>.+?</xen:if>#s]]> </find>
<replace > < ![CDATA[$0
<xen:callback class= "moodBadge_sharedStatic" method= "renderMoodInThreadViewCallback" params= "{xen:array 'uid={$user.user_id}'}" > </xen:callback> ]]></replace>
2016-02-28 15:08:20 +00:00
</modification>
<modification template= "navigation_visitor_tab" modification_key= "insertmoodchanginglinkinaccountmenu" description= "Inserts mood changing link in account menu" execution_order= "10" enabled= "1" action= "str_replace" >
<find > <![CDATA[<xen:if is="{$canEditProfile}"><li><a href="{xen:link account/personal-details}">{xen:phrase personal_details}</a></li></xen:if>]]> </find>
<replace > <![CDATA[<xen:if is="{$canEditProfile}"> <li > <a href= "{xen:link account/personal-details}" > {xen:phrase personal_details}</a> </li> </xen:if>
2016-02-28 22:17:35 +00:00
<li > <a href= "{xen:link 'moodchanging', '', 'redirect={$requestPaths.requestUri}'}" class= "OverlayTrigger" rel= "nofollow" > Mood</a> </li> ]]></replace>
2016-02-28 15:08:20 +00:00
</modification>
</public_template_modifications>
<bb_code_media_sites />
<bb_codes />
</addon>