Skip to content

Commit a65f8e2

Browse files
committed
update for 3.2 and up
1 parent 97c1b16 commit a65f8e2

3 files changed

Lines changed: 43 additions & 53 deletions

File tree

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ var defaultBanList = [
1818
'smegma', 'spunk', 'tit', 'tosser', 'turd', 'twat', 'vagina', 'wank', 'whore',
1919
];
2020

21+
const pluginName = 'Censor Curse Words';
22+
2123
var Beep = {
2224
banned_words_raw: '',
2325
banned_words: null,
@@ -67,7 +69,9 @@ var Beep = {
6769
var middleware = params.middleware;
6870

6971
function render(req, res, next) {
70-
res.render('admin/plugins/beep', {});
72+
res.render('admin/plugins/beep', {
73+
title: pluginName,
74+
});
7175
}
7276
router.get('/admin/plugins/beep', middleware.admin.buildHeader, render);
7377
router.get('/api/admin/plugins/beep', render);
@@ -181,7 +185,7 @@ var Beep = {
181185
custom_header.plugins.push({
182186
route: '/plugins/beep',
183187
icon: 'fa-microphone-slash',
184-
name: 'Censor Curse Words',
188+
name: pluginName,
185189
});
186190
callback(null, custom_header);
187191
},

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,6 @@
3232
"_id": "nodebb-plugin-beep@0.4.4",
3333
"_from": "nodebb-plugin-beep@0.4.4",
3434
"nbbpm": {
35-
"compatibility": "^1.0.0 || ^1.1.0 || ^1.13.0 || ^1.16.1 || ^2.0.0"
35+
"compatibility": "^3.2.0"
3636
}
3737
}
Lines changed: 36 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,46 @@
1-
<div class="beep" class="row">
2-
<div class="col-xs-12">
3-
<form role="form" class="beep-settings">
4-
<div class="row">
5-
<div class="col-sm-2 col-xs-12 settings-header">Illegal Words</div>
6-
<div class="col-sm-10 col-xs-12">
7-
<fieldset>
8-
<div class="form-group">
9-
<label for="illegal"><i>comma-separated</i> list of Illegal Words (post will not be allowed)</label>
10-
<textarea class="form-control" id="illegal" name="illegal" placeholder="eg. anal, anus, arse, ass, ballsack"></textarea>
11-
</div>
12-
</fieldset>
13-
</div>
14-
</div>
15-
<div class="row">
16-
<div class="col-sm-2 col-xs-12 settings-header">Banned Words</div>
17-
<div class="col-sm-10 col-xs-12">
18-
<fieldset>
19-
<div class="form-group">
20-
<label for="id"><i>comma-separated</i> list of Banned Words (post will be censored with asterisks)</label>
21-
<textarea class="form-control" id="id" name="id" placeholder="eg. anal, anus, arse, ass, ballsack">anal, anus, arse, ass, ballsack, balls, bastard, bitch, biatch, bloody, blowjob, blow job, bollock, bollok, boner, boob, bugger, bum, butt, buttplug, clitoris, cock, coon, crap, cunt, damn, dick, dildo, dyke, fag, feck, fellate, fellatio, felching, fuck, f u c k, fudgepacker, fudge packer, flange, homo, jerk, jizz, knobend, knob end, labia, muff, nigger, nigga, penis, piss, poop, prick, pube, pussy, queer, sex, shit, s hit, sh1t, slut, smegma, spunk, tit, tosser, turd, twat, vagina, wank, whore</textarea>
22-
</div>
23-
</fieldset>
1+
<div class="acp-page-container">
2+
<!-- IMPORT admin/partials/settings/header.tpl -->
3+
4+
<div class="row m-0">
5+
<div id="spy-container" class="col-12 px-0 mb-4" tabindex="0">
6+
<form role="form" class="beep-settings">
7+
<div class="mb-3">
8+
<h5 class="fw-bold tracking-tight settings-header">Illegal Words</h5>
9+
<div>
10+
<label class="form-label" for="illegal"><i>comma-separated</i> list of Illegal Words (post will not be allowed)</label>
11+
<textarea class="form-control" id="illegal" name="illegal" placeholder="eg. anal, anus, arse, ass, ballsack" rows="6"></textarea>
12+
</div>
2413
</div>
25-
</div>
14+
<div class="mb-3">
15+
<h5 class="fw-bold tracking-tight settings-header">Banned Words</h5>
2616

27-
<div class="row">
28-
<div class="col-sm-2 col-xs-12 settings-header">Banned URLs</div>
29-
<div class="col-sm-10 col-xs-12">
30-
<fieldset>
17+
<div>
18+
<label class="form-label" for="id"><i>comma-separated</i> list of Banned Words (post will be censored with asterisks)</label>
19+
<textarea class="form-control" id="id" name="id" placeholder="eg. anal, anus, arse, ass, ballsack" rows="6">anal, anus, arse, ass, ballsack, balls, bastard, bitch, biatch, bloody, blowjob, blow job, bollock, bollok, boner, boob, bugger, bum, butt, buttplug, clitoris, cock, coon, crap, cunt, damn, dick, dildo, dyke, fag, feck, fellate, fellatio, felching, fuck, f u c k, fudgepacker, fudge packer, flange, homo, jerk, jizz, knobend, knob end, labia, muff, nigger, nigga, penis, piss, poop, prick, pube, pussy, queer, sex, shit, s hit, sh1t, slut, smegma, spunk, tit, tosser, turd, twat, vagina, wank, whore</textarea>
20+
</div>
21+
</div>
3122

32-
<div class="form-group">
33-
<label for="urls"><i>comma-separated</i> list of Banned URLs (link will be shown as [link removed])</label>
34-
<textarea class="form-control" id="urls" name="urls" placeholder="eg. google.com, yahoo.com"></textarea>
35-
</div>
23+
<div class="mb-3">
24+
<h5 class="fw-bold tracking-tight settings-header">Banned Urls</h5>
3625

37-
</fieldset>
38-
</div>
39-
</div>
40-
41-
<div class="row">
42-
<div class="col-sm-2 col-xs-12 settings-header">Censorship Settings</div>
43-
<div class="col-sm-10 col-xs-12">
44-
<fieldset>
45-
<div class="checkbox">
46-
<label>
47-
<input type="checkbox" name="censorWholeWord">
48-
Censor the entire word (as opposed to replacing the middle with <code>*</code>s)
49-
</label>
50-
</div>
51-
</fieldset>
26+
<div class="form-group">
27+
<label for="urls"><i>comma-separated</i> list of Banned URLs (link will be shown as [link removed])</label>
28+
<textarea class="form-control" id="urls" name="urls" placeholder="eg. google.com, yahoo.com" rows="6"></textarea>
29+
</div>
5230
</div>
53-
</div>
5431

55-
</form>
32+
<div class="mb-3">
33+
<h5 class="fw-bold tracking-tight settings-header">Censorship Settings</h5>
34+
35+
<div class="form-check form-switch">
36+
<label class="form-check-label">Censor the entire word (as opposed to replacing the middle with <code>*</code>s)</label>
37+
<input class="form-check-input" type="checkbox" name="censorWholeWord">
38+
</div>
39+
</div>
40+
</form>
41+
</div>
5642
</div>
5743
</div>
5844

59-
<!-- IMPORT admin/partials/save_button.tpl -->
45+
6046

0 commit comments

Comments
 (0)