This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
forked from chrisdeeming/LiveUpdate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
addon-LiveUpdate.xml
147 lines (143 loc) · 9.48 KB
/
addon-LiveUpdate.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<?xml version="1.0" encoding="utf-8"?>
<addon addon_id="LiveUpdate" title="Live Update" version_string="4.1.0" version_id="4010074" url="https://xenresources.com" install_callback_class="LiveUpdate_Install" install_callback_method="installer" uninstall_callback_class="LiveUpdate_Install" uninstall_callback_method="uninstaller">
<admin_navigation/>
<admin_permissions/>
<admin_style_properties/>
<admin_templates/>
<admin_template_modifications/>
<code_events/>
<code_event_listeners>
<listener event_id="init_dependencies" execute_order="10" callback_class="LiveUpdate_Listener" callback_method="initDependencies" active="1" hint="" description=""/>
<listener event_id="load_class_controller" execute_order="10" callback_class="LiveUpdate_Listener" callback_method="extendAccountController" active="1" hint="XenForo_ControllerPublic_Account" description="Extends the Account controller."/>
<listener event_id="load_class_datawriter" execute_order="10" callback_class="LiveUpdate_Listener" callback_method="extendUserDataWriter" active="1" hint="XenForo_DataWriter_User" description="Extends the User datawriter."/>
</code_event_listeners>
<cron/>
<email_templates/>
<email_template_modifications/>
<optiongroups>
<group group_id="LiveUpdate" display_order="270511" debug_only="0"/>
<option option_id="liveUpdateDefaultOptions" edit_format="checkbox" data_type="array" can_backup="1">
<default_value>a:1:{s:8:"tab_icon";s:1:"1";}</default_value>
<edit_format_params>tab_icon={xen:phrase liveupdate_tab_icon}
tab_title={xen:phrase liveupdate_tab_title}
notifications_api={xen:phrase liveupdate_notifications_api}</edit_format_params>
<sub_options>*</sub_options>
<relation group_id="LiveUpdate" display_order="30"/>
</option>
<option option_id="liveUpdateFavicon" edit_format="textbox" data_type="string" can_backup="1">
<default_value></default_value>
<edit_format_params></edit_format_params>
<sub_options></sub_options>
<relation group_id="LiveUpdate" display_order="20"/>
</option>
<option option_id="liveUpdateInterval" edit_format="spinbox" data_type="unsigned_integer" can_backup="1">
<default_value>10</default_value>
<edit_format_params></edit_format_params>
<sub_options></sub_options>
<relation group_id="LiveUpdate" display_order="10"/>
</option>
</optiongroups>
<permissions>
<permission_groups/>
<permissions>
<permission permission_group_id="general" permission_id="liveUpdateChangeOptions" permission_type="flag" default_value="unset" interface_group_id="generalPermissions" display_order="999999"/>
</permissions>
<interface_groups/>
</permissions>
<phrases>
<phrase title="liveupdate_both" version_id="4000031" version_string="4.0.0 Beta 1"><![CDATA[Both]]></phrase>
<phrase title="liveupdate_disable" version_id="4000031" version_string="4.0.0 Beta 1"><![CDATA[Disable]]></phrase>
<phrase title="liveupdate_display_option_explain" version_id="4010070" version_string="4.1.0"><![CDATA[Choose how you would like live updates to be displayed.]]></phrase>
<phrase title="liveupdate_live_update_display_options" version_id="4000031" version_string="4.0.0 Beta 1"><![CDATA[Live Update Display Options]]></phrase>
<phrase title="liveupdate_notifications_api" version_id="4010070" version_string="4.1.0"><![CDATA[Notifications API]]></phrase>
<phrase title="liveupdate_request_completed_successfully" global_cache="1" version_id="4000031" version_string="4.0.0 Beta 1"><![CDATA[Request Completed Successfully.]]></phrase>
<phrase title="liveupdate_tab_icon" version_id="4000031" version_string="4.0.0 Beta 1"><![CDATA[Tab Icon]]></phrase>
<phrase title="liveupdate_tab_title" version_id="4000031" version_string="4.0.0 Beta 1"><![CDATA[Tab Title]]></phrase>
<phrase title="option_group_LiveUpdate" version_id="4010070" version_string="4.1.0"><![CDATA[Live Update Options]]></phrase>
<phrase title="option_group_LiveUpdate_description" version_id="4010070" version_string="4.1.0"><![CDATA[Configure options related to the Live Update add-on]]></phrase>
<phrase title="option_liveUpdateDefaultOptions" version_id="4010070" version_string="4.1.0"><![CDATA[Default User Options]]></phrase>
<phrase title="option_liveUpdateDefaultOptions_explain" version_id="4010070" version_string="4.1.0"><![CDATA[These are the default options that will be automatically applied to new users. Additionally, if users have no permission to update their own options, these settings will take precedence.]]></phrase>
<phrase title="option_liveUpdateFavicon" version_id="6" version_string="2.0"><![CDATA[Live Update Favicon]]></phrase>
<phrase title="option_liveUpdateFavicon_explain" version_id="6" version_string="2.0"><![CDATA[Explicitly defines the location of your favicon.ico file. If this is not filled in, it will automatically try to use a favicon.ico file in your web root.]]></phrase>
<phrase title="option_liveUpdateInterval" version_id="5" version_string="1.2.0"><![CDATA[Live Update Interval]]></phrase>
<phrase title="option_liveUpdateInterval_explain" version_id="5" version_string="1.2.0"><![CDATA[This is the minimum time the client will wait before asking for another request for updates from the server.
In seconds.]]></phrase>
<phrase title="permission_general_liveUpdateChangeOptions" version_id="4010070" version_string="4.1.0"><![CDATA[Change Live Update display options]]></phrase>
</phrases>
<route_prefixes>
<route_type type="public">
<prefix original_prefix="liveupdate" class="LiveUpdate_Route_Prefix_LiveUpdate" build_link="none"/>
</route_type>
</route_prefixes>
<style_properties/>
<templates>
<template title="liveupdate_account_preferences_display" version_id="4000031" version_string="4.0.0 Beta 1"><![CDATA[<xen:if is="{$visitor.permissions.general.liveUpdateChangeOptions}">
<dl class="ctrlUnit">
<dt>{xen:phrase liveupdate_live_update_display_options}:</dt>
<dd>
<ul class="checkboxColumns">
<li>
<label for="ctrl_liveupdate_display_option_tab_icon"><input type="checkbox" name="liveupdate_display_option[]" id="ctrl_liveupdate_display_option_tab_icon" value="tab_icon" {xen:checked 'in_array("tab_icon", {xen:helper liveupdateoptions})'} /> {xen:phrase liveupdate_tab_icon}</label>
</li>
<li>
<label for="ctrl_liveupdate_display_option_notifications_api"><input type="checkbox" name="liveupdate_display_option[]" id="ctrl_liveupdate_display_option_notifications_api" value="notifications_api" {xen:checked 'in_array("notifications_api", {xen:helper liveupdateoptions})'} /> {xen:phrase liveupdate_notifications_api}</label>
</li>
<li>
<label for="ctrl_liveupdate_display_option_tab_title"><input type="checkbox" name="liveupdate_display_option[]" id="ctrl_liveupdate_display_option_tab_title" value="tab_title" {xen:checked 'in_array("tab_title", {xen:helper liveupdateoptions})'} /> {xen:phrase liveupdate_tab_title}</label>
</li>
</ul>
<p class="explain">{xen:phrase liveupdate_display_option_explain}</p>
</dd>
</dl>
</xen:if>]]></template>
<template title="liveupdate_page_container" version_id="4010070" version_string="4.1.0"><![CDATA[<xen:if is="{xen:helper liveupdateoptions}">
<link rel="shortcut icon" href="{xen:if $xenOptions.liveUpdateFavicon, $xenOptions.liveUpdateFavicon, favicon.ico}" />
<xen:require js="js/liveupdate/min/update.js" />
<xen:require js="js/liveupdate/min/xenforo.js" />
<xen:if is="in_array('tab_icon', {xen:helper liveupdateoptions})">
<xen:require js="js/liveupdate/min/favico.js" />
</xen:if>
</xen:if>]]></template>
<template title="liveupdate_page_container_js_body" version_id="4010070" version_string="4.1.0"><![CDATA[<script>
jQuery.extend(true, LiveUpdate,
{
pollInterval: {xen:calc '{$xenOptions.liveUpdateInterval} * 1000'},
displayOptions: {xen:helper liveupdateoptions, true},
boardTitle: '{$xenOptions.boardTitle}',
iconPath: '{xen:property ogLogoPath}'
});
</script>
<xen:if is="in_array('tab_icon', {xen:helper liveupdateoptions})">
<script>
jQuery.extend(true, LiveUpdate,
{
favico: new Favico({
bgColor: '#d00',
textColor: '#fff',
animation: 'popFade',
type : 'rectangle'
})
});
</script>
</xen:if>]]></template>
</templates>
<public_template_modifications>
<modification template="account_preferences" modification_key="LiveUpdate_account_preferences_display" description="Adds the display options to the preferences page." execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<xen:include template="custom_fields_edit" />]]></find>
<replace><![CDATA[<xen:include template="liveupdate_account_preferences_display" />
$0]]></replace>
</modification>
<modification template="page_container_js_body" modification_key="LiveUpdate_page_container_js_body" description="Adds some LiveUpdate configurations" execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[</script>]]></find>
<replace><![CDATA[$0
<xen:include template="liveupdate_page_container_js_body" />]]></replace>
</modification>
<modification template="PAGE_CONTAINER" modification_key="LiveUpdatesOverrideFavicon" description="Explicitly defines the favicon. Can be supplied via Options or root/favicon.ico is assumed." execution_order="10" enabled="1" action="str_replace">
<find><![CDATA[<link rel="apple-touch-]]></find>
<replace><![CDATA[<xen:include template="liveupdate_page_container" />
$0]]></replace>
</modification>
</public_template_modifications>
<bb_code_media_sites/>
<bb_codes/>
</addon>