by Ange Tuteur April 7th 2015, 5:31 am
Here's an example I can give you. Go to Administration Panel > Modules > HTML pages management
Use your forum header : Yes
Paste the following code :
- Code:
<h1 class="page-title">Notepad</h1>
<textarea class="inputbox" id="note-text" style="height:250px;width:99%;"></textarea>
<div style="text-align:center;margin:3px 0">
<input id="note-save" class="button1" type="button" value="Save"/> <input id="note-reset" class="button1" type="button" value="Reset"/>
</div>
<script type="text/javascript">//<![CDATA[
(function() {
var post = 6,
text = '', area = getId('note-text'), save = getId('note-save'), reset = getId('note-reset');
$.get('/post?p='+post+'&mode=editpost', function(d) {
text = $('#text_editor_textarea',d)[0].value;
area.value = text;
});
reset.onclick = function() {
var c = confirm('Are you sure you want to reset the notepad ?');
if (c) area.value = text;
};
save.onclick = function() {
save.style.opacity = 0.3;
$.post('/post?p='+post+'&mode=editpost', {
subject : 'Notepad',
message : area.value,
post : 1
},function() {
text = area.value;
save.style.opacity = 1;
});
};
function getId(i) { return document.getElementById(i) };
})();
//]]></script>
Now make a topic where you allow the members you want to moderate. Once it's posted, click the edit button and copy the ID from the URL. /post?p=
951443&mode=editpost
Now in the HTML above, replace the 6 in
var post = 6, with the ID you copied. One other thing you need to make sure is that the following option is disabled :
Administration Panel > General > Security > Unauthorize unofficial forms to post messages and private messages on the forum : NO