forked from cypht-org/cypht-website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
modules.html
316 lines (315 loc) · 20.9 KB
/
modules.html
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Modules</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="img/icon.ico">
<link rel="stylesheet" href="site.css">
</head>
<body>
<header>
<nav class="navbar navbar-expand-lg navbar-dark fixed-top">
<div class="container">
<a class="navbar-brand" href="index.html">
<img src="img/logo.svg" width="120" height="60" alt="">
</a>
<button class="navbar-toggler toggler-home" type="button" data-toggle="collapse"
data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse " id="navbarSupportedContent">
<ul class="navbar-nav ml-lg-auto">
<li class="nav-item">
<a class="nav-link" href="index.html">Home <span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="features.html">Features</a>
</li>
<li class="nav-item">
<a class="nav-link" href="security.html">Security</a>
</li>
<li class="nav-item active">
<a class="nav-link" href="modules.html">Mods</a>
</li>
<li class="nav-item">
<a class="nav-link" href="license.html">License</a>
</li>
<li class="nav-item">
<!--<a class="nav-link" href="tests.html">Test</a>-->
</li>
<li class="nav-item">
<a class="nav-link" href="documentation.html">Documentation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://unencumberedbyfacts.com" target="_blank">Blog</a>
</li>
<li class="nav-item">
<a onclick="document.getElementsByClassName('navbar-collapse')[0].style.display='none';"
class="nav-link" href="contribute.html">Contribute</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<section class="content-section container">
<h2>Overview</h2>
<p>Cypht has a modular design. Instead of an application with a plugin API, Cypht is an application comprised
entirely of plugins, or as we call them, "module sets". There is only one required set, the "core" modules. The
components of any module set can be added to, or even replaced, by site specific modules. All the functionality
of Cypht is broken out into module sets, and each set is built from small pieces that are also easy to override.
The module system is powerful, but also a bit complex. First let's take a look at the module sets that come with
Cypht:</p>
<hr>
<ul>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/2fa"><b>2fa</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3A2fa">issues</a><br/>TOTP
based 2 factor authentication using the Google Authenticator mobile app
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/account"><b>account</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aaccount">issues</a><br/>UI
features for admins to create accounts, and for users to update passwords (when using the built-in DB
authentication). Functional, but could use more admin features
</li>
<li>
<a href="https://github.com/cypht-org/cypht/tree/master/modules/advanced_search"><b>advanced_search</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aadvanced_search">issues</a><br/>Support
for advanced search
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/api_login"><b>api_login</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aapi_login">issues</a><br/>Login
using an API to provide single sign on ability
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/calendar"><b>calendar</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Acalendar">issues</a><br/>Basic
calendar.
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/contacts"><b>contacts</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Acontacts">issues</a><br/>Contact
management. Requires at least one contact backend module set to be enabled
</li>
<li>
<a href="https://github.com/cypht-org/cypht/tree/master/modules/carddav_contacts"><b>carddav_contacts</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Acarddav_contacts">issues</a><br/>Support
for contacts stored in CardDav
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/local_contacts"><b>local_contacts</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Alocal_contacts">issues</a><br/>Simple
locally stored contact support
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/ldap_contacts"><b>ldap_contacts</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aldap_contacts">issues</a><br/>Support
for contacts stored in LDAP
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/gmail_contacts"><b>gmail_contacts</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Agmail_contacts">issues</a><br/>Read-only
support for Gmail contacts with an Oauth2 enabled Gmail account
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/core"><b>core</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Acore">issues</a><br/>
Handles page layout, login/logout, and the default settings pages
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/desktop_notifications"><b>desktop_notifications</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Adesktop_notifications">issues</a><br/>Desktop
notifications for new messages
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/developer"><b>developer</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Adeveloper">issues</a><br/>
For development, provides resources and installation details. Only available in "debug mode"
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/dynamic_login"><b>dynamic_login</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Adynamic_login">issues</a><br/>Allows
user to authenticate against a list of popular mail services, or to auto-discover the services for the
specified E-mail address
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/feeds"><b>feeds</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Afeeds">issues</a><br/>
RSS/ATOM feed support
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/github"><b>github</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Agithub">issues</a><br/>
Github repository tracking
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/hello_world"><b>hello_world</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Ahello_world">issues</a><br/>
Example module set with lots of comments
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/highlights"><b>highlights</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Ahighlights">issues</a><br/>
Color highlighting for message lists
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/history"><b>history</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Ahistory">issues</a><br/>
Simple list of messages read since login
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/idle_timer"><b>idle_timer</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aidle_timer">issues</a><br/>
Controls idle time and automatic logout
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/imap"><b>imap</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aimap">issues</a><br/>
IMAP E-mail account support
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/imap_folders"><b>imap_folders</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aimap_folders">issues</a><br/>
IMAP E-mail folder management support
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/inline_message"><b>inline_message</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Ainline_message">issues</a><br/>
View messages inline in a reading pane instead of on a new page
</li>
<li>
<a href="https://github.com/cypht-org/cypht/tree/master/modules/keyboard_shortcuts"><b>keyboard_shortcuts</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Akeyboard_shortcuts">issues</a><br/>Adds
support for site navigation and actions using the keyboard
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/nasa"><b>nasa</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Anasa">issues</a><br/>Access
the NASA APOD API content
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/nux"><b>nux</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Anux">issues</a><br/>
Friendly new user experience. Quickly add common E-mail services, and view development updates. Needs help
text added
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/pgp"><b>PGP</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Apgp">issues</a><br/>
Encryption using Pretty Good Privacy
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/profiles"><b>profiles</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Aprofiles">issues</a><br/>
Profiles to set reply-to, name, and signature to associated E-mail accounts
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/recaptcha"><b>recaptcha</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Arecaptcha">issues</a><br/>
Enable Recaptcha on the login form
</li>
<li>
<a href="https://github.com/cypht-org/cypht/tree/master/modules/recover_settings"><b>recover_settings</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Arecover_settings">issues</a><br/>
Ability to recover user settings after an external password change
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/saved_searches"><b>saved_searches</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Asaved_searches">issues</a><br/>
Save and re-run searches easily
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/sievefilters"><b>sievefilters</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Asievefilters">issues</a><br/>
Message filtering
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/site"><b>site</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Asite">issues</a><br/>
Site specific overrides. Used to control other module sets without hacking the code
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/smtp"><b>smtp</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Asmtp">issues</a><br/>
Send outbound E-mail using SMTP servers
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/tags"><b>tags</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Atags">issues</a><br/>
Tag content for easy searching/filtering. Not yet functional
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/themes"><b>themes</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Athemes">issues</a><br/>
Change the UI using CSS
</li>
<li><a href="https://github.com/cypht-org/cypht/tree/master/modules/wordpress"><b>wordpress</b></a><a
title="Open issues at Github" class="issue_link"
href="https://github.com/cypht-org/cypht/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+label%3Awordpress">issues</a><br/>
WordPress.com notifications and freshly pressed lists
</li>
</ul>
<br/>
<p> Module sets are setup in the hm3.ini file. With the exception of the core module, they can all be enabled or
disabled independently (though module sets can rely on each other, like the nux module). When the site build
process is run, module assignments are calculated and saved in the configuration file (so they don't need to be
re-calculated at run-time). There is also a debug mode in which modules are activated dynamically (for the most
part) to make development easier. </p>
<h3>File Structure</h3>
<p> Module set names in the ini file match the directory the module code is in under modules/. Files in a module
have pre-defined names. Any other required code should be included from one of these files.
</p>
<br/><br/>
<ul>
<li><b>setup.php</b><br/>This is where a module set defines it's own modules and assigns them to request
identifiers. This file must return an array of valid input and associated types in order for the module code
to have access to it.
</li>
<li><b>modules.php</b><br/>This is where the actual module code lives. If you have external libraries to include
this is a good place to do so.
</li>
<li><b>site.js</b><br/>Optional file to include JavaScript for the module set.</li>
<li><b>site.css</b><br/>Optional file to include CSS for the module set.</li>
</ul>
<br/>
<p> A module set can also include an assets sub-directory. Anything in that directory will be made availble in the
browser. An example of this is the HTML WSIWYG editor for the smtp module set. In debug mode the module site.css
and site.js files are included directly if they exist. In production mode combined and optionally minified
versions are used consisting of a single js file and a single CSS file generated by the build process. Minifying
programs can be specified in the hm3.ini file.
</p>
<h3>Input and Output</h3>
<p> There are two kinds of modules: Input processing modules called "handler modules", and output formatting modules
called "output modules". Modules can pass data to each other, and output modules have access to all the data
input modules create. By default, module output is immutable and can't be stepped on by other modules. Data can
be marked writable and an "appendable" data type is also supported. The typical job of a handler module is to
analyze user input and do some work based on it, which it then sends to the output modules. The typical job of
an output module is to take the results of an input module and format it for the browser.
</p>
<h3>Hello World</h3>
<p> For more information, check out the "hello world" module set. It illustrates how modules work and has loads of
comments that explain what is going on:<br/><br/>
</p>
<a href="https://github.com/cypht-org/cypht/tree/master/modules/hello_world">https://github.com/cypht-org/cypht/tree/master/modules/hello_world</a>
<br/><br/>
</section>
<script>
((window.gitter = {}).chat = {}).options = {
room: 'cypht-org/community'
};
</script>
<script src="jquery.slim.min.js"></script>
<script src="bootstrap.bundle.min.js"></script>
</body>
</html>