mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-13 05:50:27 +00:00
Write the Telegram help article
This commit is contained in:
parent
d2fdc6a29a
commit
b5aff67712
39
help/en/telegram.myco
Normal file
39
help/en/telegram.myco
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# Telegram authorization
|
||||||
|
//This article is intended for wiki administrators.//
|
||||||
|
|
||||||
|
If you want, you can let users log in to your wiki using **Telegram**.
|
||||||
|
|
||||||
|
Telegram is a proprietary messaging application used by half a billion people. Learn more at [[https://telegram.org]].
|
||||||
|
|
||||||
|
## Setting up Telegram integration
|
||||||
|
In order to enable Telegram authorization, you need to create a Telegram bot and link it with your wiki.
|
||||||
|
|
||||||
|
### Creating a bot
|
||||||
|
Open the chat with [[https://t.me/botfather | @BotFather]], the bot for creating other bots. Create a new bot there. You will need the bot username and token later. You can set the bot's userpic. It would be great if it matches your wiki's logo.
|
||||||
|
|
||||||
|
After creating the bot, send the `/setdomain` command and then send your wiki's domain.
|
||||||
|
|
||||||
|
You do not need to actually //host// the bot. It is enough for it just to be created in BotFather. You can also reuse a previously existing bot.
|
||||||
|
|
||||||
|
### Configuring
|
||||||
|
In `config.ini`, in `[Telegram]` section, fill in the bot's username (without @) and token:
|
||||||
|
|
||||||
|
```
|
||||||
|
[Telegram]
|
||||||
|
TelegramBotName = your_bot
|
||||||
|
TelegramBotToken = 0000000000:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||||
|
```
|
||||||
|
|
||||||
|
Reload the wiki.
|
||||||
|
|
||||||
|
If both fields are both set, the engine will enable Telegram authorization.
|
||||||
|
|
||||||
|
## Using
|
||||||
|
On login and register pages there is a blue button. If a user clicks it, they are prompted to give the authorization permission to your bot. The user's @username will be used as wiki username. Telegram users are part of the //editor// user group by default. Telegram users can use the wiki just like everyone else.
|
||||||
|
|
||||||
|
## Limitations
|
||||||
|
* Telegram does not support HTTP wikis, you //must// use HTTPS.
|
||||||
|
** One way of setting up HTTPS is using [[https://certbot.eff.org | certbot]] and a reverse proxy such as [[https://nginx.org | nginx]].
|
||||||
|
* Telegram users without @username cannot authorize.
|
||||||
|
* Telegram users with usernames that are already taken on the wiki cannot authorize.
|
||||||
|
* Overall, this is an experimental feature. Use on your own risk.
|
@ -1,4 +1,6 @@
|
|||||||
# Whitelist
|
# Whitelist
|
||||||
|
//This article is intended for wiki administrators.//
|
||||||
|
|
||||||
If you want to limit what people can authorize to your wiki, you may want to use the **whitelist**.
|
If you want to limit what people can authorize to your wiki, you may want to use the **whitelist**.
|
||||||
|
|
||||||
In `config.ini`, in the `[Authorization]` section, enable the white list in `UseWhiteList` and list all allowed usernames in the `WhiteList` field separated by comma:
|
In `config.ini`, in the `[Authorization]` section, enable the white list in `UseWhiteList` and list all allowed usernames in the `WhiteList` field separated by comma:
|
||||||
|
@ -141,23 +141,16 @@ It outputs a poorly formatted JSON, but it works and is valid.
|
|||||||
<aside class="help-topics layout-card">
|
<aside class="help-topics layout-card">
|
||||||
<h2 class="layout-card__title">Help topics</h2>
|
<h2 class="layout-card__title">Help topics</h2>
|
||||||
<ul class="help-topics__list">
|
<ul class="help-topics__list">
|
||||||
<li>
|
<li><a href="/help/en">Main</a></li>
|
||||||
<a href="/help/en">Main</a>
|
<li><a href="/help/en/hypha">Hypha</a>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="/help/en/hypha">Hypha</a>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><a href="/help/en/attachment">Attachment</a></li>
|
||||||
<a href="/help/en/attachment">Attachment</a>
|
</ul>
|
||||||
</li>
|
|
||||||
</ul
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>Configuration (for administrators)
|
||||||
Configuration
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><a href="/help/en/whitelist">Whitelist</a>, new in 1.3</li>
|
||||||
<a href="/help/en/whitelist">Whitelist</a>
|
<li><a href="/help/en/telegram">Telegram authorization</a>, new in 1.3</li>
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -490,66 +490,59 @@ func streamhelpTopicsHTML(qw422016 *qt422016.Writer) {
|
|||||||
<aside class="help-topics layout-card">
|
<aside class="help-topics layout-card">
|
||||||
<h2 class="layout-card__title">Help topics</h2>
|
<h2 class="layout-card__title">Help topics</h2>
|
||||||
<ul class="help-topics__list">
|
<ul class="help-topics__list">
|
||||||
<li>
|
<li><a href="/help/en">Main</a></li>
|
||||||
<a href="/help/en">Main</a>
|
<li><a href="/help/en/hypha">Hypha</a>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<a href="/help/en/hypha">Hypha</a>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><a href="/help/en/attachment">Attachment</a></li>
|
||||||
<a href="/help/en/attachment">Attachment</a>
|
</ul>
|
||||||
</li>
|
|
||||||
</ul
|
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>Configuration (for administrators)
|
||||||
Configuration
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li><a href="/help/en/whitelist">Whitelist</a>, new in 1.3</li>
|
||||||
<a href="/help/en/whitelist">Whitelist</a>
|
<li><a href="/help/en/telegram">Telegram authorization</a>, new in 1.3</li>
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</aside>
|
</aside>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
func writehelpTopicsHTML(qq422016 qtio422016.Writer) {
|
func writehelpTopicsHTML(qq422016 qtio422016.Writer) {
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
streamhelpTopicsHTML(qw422016)
|
streamhelpTopicsHTML(qw422016)
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
func helpTopicsHTML() string {
|
func helpTopicsHTML() string {
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
writehelpTopicsHTML(qb422016)
|
writehelpTopicsHTML(qb422016)
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/stuff.qtpl:165
|
//line views/stuff.qtpl:158
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:167
|
//line views/stuff.qtpl:160
|
||||||
func StreamUserListHTML(qw422016 *qt422016.Writer) {
|
func StreamUserListHTML(qw422016 *qt422016.Writer) {
|
||||||
//line views/stuff.qtpl:167
|
//line views/stuff.qtpl:160
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width user-list">
|
<main class="main-width user-list">
|
||||||
<h1>List of users</h1>
|
<h1>List of users</h1>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:172
|
//line views/stuff.qtpl:165
|
||||||
var (
|
var (
|
||||||
admins = make([]string, 0)
|
admins = make([]string, 0)
|
||||||
moderators = make([]string, 0)
|
moderators = make([]string, 0)
|
||||||
@ -566,345 +559,345 @@ func StreamUserListHTML(qw422016 *qt422016.Writer) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:187
|
//line views/stuff.qtpl:180
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<section>
|
<section>
|
||||||
<h2>Admins</h2>
|
<h2>Admins</h2>
|
||||||
<ol>`)
|
<ol>`)
|
||||||
//line views/stuff.qtpl:190
|
//line views/stuff.qtpl:183
|
||||||
for _, name := range admins {
|
for _, name := range admins {
|
||||||
//line views/stuff.qtpl:190
|
//line views/stuff.qtpl:183
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<li><a href="/hypha/`)
|
<li><a href="/hypha/`)
|
||||||
//line views/stuff.qtpl:191
|
//line views/stuff.qtpl:184
|
||||||
qw422016.E().S(cfg.UserHypha)
|
qw422016.E().S(cfg.UserHypha)
|
||||||
//line views/stuff.qtpl:191
|
//line views/stuff.qtpl:184
|
||||||
qw422016.N().S(`/`)
|
qw422016.N().S(`/`)
|
||||||
//line views/stuff.qtpl:191
|
//line views/stuff.qtpl:184
|
||||||
qw422016.E().S(name)
|
qw422016.E().S(name)
|
||||||
//line views/stuff.qtpl:191
|
//line views/stuff.qtpl:184
|
||||||
qw422016.N().S(`">`)
|
qw422016.N().S(`">`)
|
||||||
//line views/stuff.qtpl:191
|
//line views/stuff.qtpl:184
|
||||||
qw422016.E().S(name)
|
qw422016.E().S(name)
|
||||||
//line views/stuff.qtpl:191
|
//line views/stuff.qtpl:184
|
||||||
qw422016.N().S(`</a></li>
|
qw422016.N().S(`</a></li>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:192
|
//line views/stuff.qtpl:185
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:192
|
//line views/stuff.qtpl:185
|
||||||
qw422016.N().S(`</ol>
|
qw422016.N().S(`</ol>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<h2>Moderators</h2>
|
<h2>Moderators</h2>
|
||||||
<ol>`)
|
<ol>`)
|
||||||
//line views/stuff.qtpl:196
|
//line views/stuff.qtpl:189
|
||||||
for _, name := range moderators {
|
for _, name := range moderators {
|
||||||
//line views/stuff.qtpl:196
|
//line views/stuff.qtpl:189
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<li><a href="/hypha/`)
|
<li><a href="/hypha/`)
|
||||||
//line views/stuff.qtpl:197
|
//line views/stuff.qtpl:190
|
||||||
qw422016.E().S(cfg.UserHypha)
|
qw422016.E().S(cfg.UserHypha)
|
||||||
//line views/stuff.qtpl:197
|
//line views/stuff.qtpl:190
|
||||||
qw422016.N().S(`/`)
|
qw422016.N().S(`/`)
|
||||||
//line views/stuff.qtpl:197
|
//line views/stuff.qtpl:190
|
||||||
qw422016.E().S(name)
|
qw422016.E().S(name)
|
||||||
//line views/stuff.qtpl:197
|
//line views/stuff.qtpl:190
|
||||||
qw422016.N().S(`">`)
|
qw422016.N().S(`">`)
|
||||||
//line views/stuff.qtpl:197
|
//line views/stuff.qtpl:190
|
||||||
qw422016.E().S(name)
|
qw422016.E().S(name)
|
||||||
//line views/stuff.qtpl:197
|
//line views/stuff.qtpl:190
|
||||||
qw422016.N().S(`</a></li>
|
qw422016.N().S(`</a></li>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:198
|
//line views/stuff.qtpl:191
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:198
|
//line views/stuff.qtpl:191
|
||||||
qw422016.N().S(`</ol>
|
qw422016.N().S(`</ol>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<h2>Editors</h2>
|
<h2>Editors</h2>
|
||||||
<ol>`)
|
<ol>`)
|
||||||
//line views/stuff.qtpl:202
|
//line views/stuff.qtpl:195
|
||||||
for _, name := range editors {
|
for _, name := range editors {
|
||||||
//line views/stuff.qtpl:202
|
//line views/stuff.qtpl:195
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<li><a href="/hypha/`)
|
<li><a href="/hypha/`)
|
||||||
//line views/stuff.qtpl:203
|
//line views/stuff.qtpl:196
|
||||||
qw422016.E().S(cfg.UserHypha)
|
qw422016.E().S(cfg.UserHypha)
|
||||||
//line views/stuff.qtpl:203
|
//line views/stuff.qtpl:196
|
||||||
qw422016.N().S(`/`)
|
qw422016.N().S(`/`)
|
||||||
//line views/stuff.qtpl:203
|
//line views/stuff.qtpl:196
|
||||||
qw422016.E().S(name)
|
qw422016.E().S(name)
|
||||||
//line views/stuff.qtpl:203
|
//line views/stuff.qtpl:196
|
||||||
qw422016.N().S(`">`)
|
qw422016.N().S(`">`)
|
||||||
//line views/stuff.qtpl:203
|
//line views/stuff.qtpl:196
|
||||||
qw422016.E().S(name)
|
qw422016.E().S(name)
|
||||||
//line views/stuff.qtpl:203
|
//line views/stuff.qtpl:196
|
||||||
qw422016.N().S(`</a></li>
|
qw422016.N().S(`</a></li>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:204
|
//line views/stuff.qtpl:197
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:204
|
//line views/stuff.qtpl:197
|
||||||
qw422016.N().S(`</ol>
|
qw422016.N().S(`</ol>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
func WriteUserListHTML(qq422016 qtio422016.Writer) {
|
func WriteUserListHTML(qq422016 qtio422016.Writer) {
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
StreamUserListHTML(qw422016)
|
StreamUserListHTML(qw422016)
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
func UserListHTML() string {
|
func UserListHTML() string {
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
WriteUserListHTML(qb422016)
|
WriteUserListHTML(qb422016)
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/stuff.qtpl:208
|
//line views/stuff.qtpl:201
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:210
|
//line views/stuff.qtpl:203
|
||||||
func StreamHyphaListHTML(qw422016 *qt422016.Writer) {
|
func StreamHyphaListHTML(qw422016 *qt422016.Writer) {
|
||||||
//line views/stuff.qtpl:210
|
//line views/stuff.qtpl:203
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<h1>List of hyphae</h1>
|
<h1>List of hyphae</h1>
|
||||||
<p>This wiki has `)
|
<p>This wiki has `)
|
||||||
//line views/stuff.qtpl:214
|
//line views/stuff.qtpl:207
|
||||||
qw422016.N().D(hyphae.Count())
|
qw422016.N().D(hyphae.Count())
|
||||||
//line views/stuff.qtpl:214
|
//line views/stuff.qtpl:207
|
||||||
qw422016.N().S(` hyphae.</p>
|
qw422016.N().S(` hyphae.</p>
|
||||||
<ul class="hypha-list">
|
<ul class="hypha-list">
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:216
|
//line views/stuff.qtpl:209
|
||||||
for h := range hyphae.YieldExistingHyphae() {
|
for h := range hyphae.YieldExistingHyphae() {
|
||||||
//line views/stuff.qtpl:216
|
//line views/stuff.qtpl:209
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<li class="hypha-list__entry">
|
<li class="hypha-list__entry">
|
||||||
<a class="hypha-list__link" href="/hypha/`)
|
<a class="hypha-list__link" href="/hypha/`)
|
||||||
//line views/stuff.qtpl:218
|
//line views/stuff.qtpl:211
|
||||||
qw422016.E().S(h.Name)
|
qw422016.E().S(h.Name)
|
||||||
//line views/stuff.qtpl:218
|
//line views/stuff.qtpl:211
|
||||||
qw422016.N().S(`">`)
|
qw422016.N().S(`">`)
|
||||||
//line views/stuff.qtpl:218
|
//line views/stuff.qtpl:211
|
||||||
qw422016.E().S(util.BeautifulName(h.Name))
|
qw422016.E().S(util.BeautifulName(h.Name))
|
||||||
//line views/stuff.qtpl:218
|
//line views/stuff.qtpl:211
|
||||||
qw422016.N().S(`</a>
|
qw422016.N().S(`</a>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:219
|
//line views/stuff.qtpl:212
|
||||||
if h.BinaryPath != "" {
|
if h.BinaryPath != "" {
|
||||||
//line views/stuff.qtpl:219
|
//line views/stuff.qtpl:212
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<span class="hypha-list__amnt-type">`)
|
<span class="hypha-list__amnt-type">`)
|
||||||
//line views/stuff.qtpl:220
|
//line views/stuff.qtpl:213
|
||||||
qw422016.E().S(filepath.Ext(h.BinaryPath)[1:])
|
qw422016.E().S(filepath.Ext(h.BinaryPath)[1:])
|
||||||
//line views/stuff.qtpl:220
|
//line views/stuff.qtpl:213
|
||||||
qw422016.N().S(`</span>
|
qw422016.N().S(`</span>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:221
|
//line views/stuff.qtpl:214
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:221
|
//line views/stuff.qtpl:214
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</li>
|
</li>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:223
|
//line views/stuff.qtpl:216
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:223
|
//line views/stuff.qtpl:216
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
</ul>
|
</ul>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
func WriteHyphaListHTML(qq422016 qtio422016.Writer) {
|
func WriteHyphaListHTML(qq422016 qtio422016.Writer) {
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
StreamHyphaListHTML(qw422016)
|
StreamHyphaListHTML(qw422016)
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
func HyphaListHTML() string {
|
func HyphaListHTML() string {
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
WriteHyphaListHTML(qb422016)
|
WriteHyphaListHTML(qb422016)
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/stuff.qtpl:227
|
//line views/stuff.qtpl:220
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:229
|
//line views/stuff.qtpl:222
|
||||||
func StreamAboutHTML(qw422016 *qt422016.Writer) {
|
func StreamAboutHTML(qw422016 *qt422016.Writer) {
|
||||||
//line views/stuff.qtpl:229
|
//line views/stuff.qtpl:222
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<div class="layout">
|
<div class="layout">
|
||||||
<main class="main-width">
|
<main class="main-width">
|
||||||
<section>
|
<section>
|
||||||
<h1>About `)
|
<h1>About `)
|
||||||
//line views/stuff.qtpl:233
|
//line views/stuff.qtpl:226
|
||||||
qw422016.E().S(cfg.WikiName)
|
qw422016.E().S(cfg.WikiName)
|
||||||
//line views/stuff.qtpl:233
|
//line views/stuff.qtpl:226
|
||||||
qw422016.N().S(`</h1>
|
qw422016.N().S(`</h1>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b><a href="https://mycorrhiza.wiki">Mycorrhiza Wiki</a> version:</b> 1.3.0</li>
|
<li><b><a href="https://mycorrhiza.wiki">Mycorrhiza Wiki</a> version:</b> 1.3.0</li>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:236
|
//line views/stuff.qtpl:229
|
||||||
if cfg.UseAuth {
|
if cfg.UseAuth {
|
||||||
//line views/stuff.qtpl:236
|
//line views/stuff.qtpl:229
|
||||||
qw422016.N().S(` <li><b>User count:</b> `)
|
qw422016.N().S(` <li><b>User count:</b> `)
|
||||||
//line views/stuff.qtpl:237
|
//line views/stuff.qtpl:230
|
||||||
qw422016.N().DUL(user.Count())
|
qw422016.N().DUL(user.Count())
|
||||||
//line views/stuff.qtpl:237
|
//line views/stuff.qtpl:230
|
||||||
qw422016.N().S(`</li>
|
qw422016.N().S(`</li>
|
||||||
<li><b>Home page:</b> <a href="/">`)
|
<li><b>Home page:</b> <a href="/">`)
|
||||||
//line views/stuff.qtpl:238
|
//line views/stuff.qtpl:231
|
||||||
qw422016.E().S(cfg.HomeHypha)
|
qw422016.E().S(cfg.HomeHypha)
|
||||||
//line views/stuff.qtpl:238
|
//line views/stuff.qtpl:231
|
||||||
qw422016.N().S(`</a></li>
|
qw422016.N().S(`</a></li>
|
||||||
<li><b>Administrators:</b>`)
|
<li><b>Administrators:</b>`)
|
||||||
//line views/stuff.qtpl:239
|
//line views/stuff.qtpl:232
|
||||||
for i, username := range user.ListUsersWithGroup("admin") {
|
for i, username := range user.ListUsersWithGroup("admin") {
|
||||||
//line views/stuff.qtpl:240
|
//line views/stuff.qtpl:233
|
||||||
if i > 0 {
|
if i > 0 {
|
||||||
//line views/stuff.qtpl:240
|
//line views/stuff.qtpl:233
|
||||||
qw422016.N().S(`<span aria-hidden="true">, </span>
|
qw422016.N().S(`<span aria-hidden="true">, </span>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:241
|
//line views/stuff.qtpl:234
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:241
|
//line views/stuff.qtpl:234
|
||||||
qw422016.N().S(` <a href="/hypha/`)
|
qw422016.N().S(` <a href="/hypha/`)
|
||||||
//line views/stuff.qtpl:242
|
//line views/stuff.qtpl:235
|
||||||
qw422016.E().S(cfg.UserHypha)
|
qw422016.E().S(cfg.UserHypha)
|
||||||
//line views/stuff.qtpl:242
|
//line views/stuff.qtpl:235
|
||||||
qw422016.N().S(`/`)
|
qw422016.N().S(`/`)
|
||||||
//line views/stuff.qtpl:242
|
//line views/stuff.qtpl:235
|
||||||
qw422016.E().S(username)
|
qw422016.E().S(username)
|
||||||
//line views/stuff.qtpl:242
|
//line views/stuff.qtpl:235
|
||||||
qw422016.N().S(`">`)
|
qw422016.N().S(`">`)
|
||||||
//line views/stuff.qtpl:242
|
//line views/stuff.qtpl:235
|
||||||
qw422016.E().S(username)
|
qw422016.E().S(username)
|
||||||
//line views/stuff.qtpl:242
|
//line views/stuff.qtpl:235
|
||||||
qw422016.N().S(`</a>`)
|
qw422016.N().S(`</a>`)
|
||||||
//line views/stuff.qtpl:242
|
//line views/stuff.qtpl:235
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:242
|
//line views/stuff.qtpl:235
|
||||||
qw422016.N().S(`</li>
|
qw422016.N().S(`</li>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:243
|
//line views/stuff.qtpl:236
|
||||||
} else {
|
} else {
|
||||||
//line views/stuff.qtpl:243
|
//line views/stuff.qtpl:236
|
||||||
qw422016.N().S(` <li>This wiki does not use authorization</li>
|
qw422016.N().S(` <li>This wiki does not use authorization</li>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:245
|
//line views/stuff.qtpl:238
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:245
|
//line views/stuff.qtpl:238
|
||||||
qw422016.N().S(` </ul>
|
qw422016.N().S(` </ul>
|
||||||
<p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p>
|
<p>See <a href="/list">/list</a> for information about hyphae on this wiki.</p>
|
||||||
</section>
|
</section>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
func WriteAboutHTML(qq422016 qtio422016.Writer) {
|
func WriteAboutHTML(qq422016 qtio422016.Writer) {
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
StreamAboutHTML(qw422016)
|
StreamAboutHTML(qw422016)
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
func AboutHTML() string {
|
func AboutHTML() string {
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
WriteAboutHTML(qb422016)
|
WriteAboutHTML(qb422016)
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/stuff.qtpl:251
|
//line views/stuff.qtpl:244
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:253
|
//line views/stuff.qtpl:246
|
||||||
func StreamCommonScripts(qw422016 *qt422016.Writer) {
|
func StreamCommonScripts(qw422016 *qt422016.Writer) {
|
||||||
//line views/stuff.qtpl:253
|
//line views/stuff.qtpl:246
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:254
|
//line views/stuff.qtpl:247
|
||||||
for _, scriptPath := range cfg.CommonScripts {
|
for _, scriptPath := range cfg.CommonScripts {
|
||||||
//line views/stuff.qtpl:254
|
//line views/stuff.qtpl:247
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
<script src="`)
|
<script src="`)
|
||||||
//line views/stuff.qtpl:255
|
//line views/stuff.qtpl:248
|
||||||
qw422016.E().S(scriptPath)
|
qw422016.E().S(scriptPath)
|
||||||
//line views/stuff.qtpl:255
|
//line views/stuff.qtpl:248
|
||||||
qw422016.N().S(`"></script>
|
qw422016.N().S(`"></script>
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:256
|
//line views/stuff.qtpl:249
|
||||||
}
|
}
|
||||||
//line views/stuff.qtpl:256
|
//line views/stuff.qtpl:249
|
||||||
qw422016.N().S(`
|
qw422016.N().S(`
|
||||||
`)
|
`)
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
func WriteCommonScripts(qq422016 qtio422016.Writer) {
|
func WriteCommonScripts(qq422016 qtio422016.Writer) {
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
qw422016 := qt422016.AcquireWriter(qq422016)
|
qw422016 := qt422016.AcquireWriter(qq422016)
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
StreamCommonScripts(qw422016)
|
StreamCommonScripts(qw422016)
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
qt422016.ReleaseWriter(qw422016)
|
qt422016.ReleaseWriter(qw422016)
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
}
|
}
|
||||||
|
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
func CommonScripts() string {
|
func CommonScripts() string {
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
qb422016 := qt422016.AcquireByteBuffer()
|
qb422016 := qt422016.AcquireByteBuffer()
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
WriteCommonScripts(qb422016)
|
WriteCommonScripts(qb422016)
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
qs422016 := string(qb422016.B)
|
qs422016 := string(qb422016.B)
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
qt422016.ReleaseByteBuffer(qb422016)
|
qt422016.ReleaseByteBuffer(qb422016)
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
return qs422016
|
return qs422016
|
||||||
//line views/stuff.qtpl:257
|
//line views/stuff.qtpl:250
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user