Welcome Guest [Log In] [Register]
We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Multiquote (on) Multiquote (off)
Locked Topic
[Solved] Turn Off Edit Post Feature
Topic Started: Feb 7 2016, 05:53 PM (281 Views)
Robmeister89
Member Avatar
Member
[ * ]
Is this possible?

I want to not allow members from editing their posts in a specific forum.
Offline Profile Goto Top
 
Epsilekt
Member Avatar
Member
[ *  *  *  *  *  * ]
You can do this with a JavaScript code that you paste in your Board Template in the Admin CP but I was looking around earlier and it doesn't show any options to do it naturally in the Admin CP.

Here is the JavaScript code that you would use. Paste it in your Board Template in the Above the copyright: section. It will make it so that Administrators and Moderators will still be able to edit their own posts in these forums but Members will not. At the very beginning of the code where you see k = new Array(XXXXXX, XXXXXX); just put your forum number and then a comma (,) inside the parentheses (()). Do not put a comma after the last forum number, the comma is only used to separate forum numbers. So don't put one before the first listing or after the last.

So if you wanted to edit ban forum number 65465467 then the line would look like this: k = new Array(65465467);.
If you wanted to edit ban three forums it would look like this: k = new Array(65465467, 64656777, 32165467);.
If you wanted to edit ban two forums it would look like this: k = new Array(65465467, 32165467);.
If you wanted to edit ban six forums it would look like this: k = new Array(65465467, 64656777, 32165467, 654657767, 7984111, 41236577);.

Code:
 
<script>
var k = new Array(3513141, 3513141);
var m = false;
if(document.getElementById('menu_acp') || document.getElementById('menu_rcp')) {
}
else {
var c = null;
var a = document.getElementsByTagName('a');
for(var b = 0;b < a.length;b++) {
if(a[b].parentNode.tagName == 'LI' && a[b].parentNode.parentNode.id == 'nav') {
c = a[b].href;
}
}
var d = null;
if(c.substring(0, main_url.length + 6) == main_url + 'forum/') {
d = Math.floor(c.substring(main_url.length + 6, c.length - 1));
}
for(var l = 0;l < k.length;l++) {
if(k[l] == d) {
var i = document.getElementsByTagName('a');
for(var j = 0;j < i.length;j++) {
if(i[j].href.match('/post/') && i[j].href.match('mode=3') && i[j].href.match('type=1')) {
i[j].style.display = 'none';
}
}
l = k.length;
}
}
}
</script>
Edited by Epsilekt, Feb 7 2016, 07:43 PM.
Offline Profile Goto Top
 
Robmeister89
Member Avatar
Member
[ * ]
Thanks! That worked perfectly.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · ZetaBoards Support · Next Topic »
Locked Topic