Enhancing MT-Approval »
Now that you have installed MT-Approval, you may want to take a few more steps to make things work just a little bit better. Unfortunately, if you are using the <$MTCommentFields$> configuration mentioned earlier, you will not currently be able to take advantage of these enhancements. I'm working on it. Please be patient.
MT-Approval requires a comment to be previewed prior to generating the hash field, so you must preview at some point prior to posting. This is not an option. Yes, it is true that you could submit a hash yourself with your post, but you may not be able to get the correct hash, which is the whole point of MT-Approval.
Since you have to preview at some point, you may want to remove the Post button from your main comments form - either on your individual archives or your comment listing template. This is because if someone were to change the contents of a comment while previewing that comment, another preview must take place in order to generate a new hash value.
To disable the Post button when someone changes a value in the field, you must take two steps.
First, you'll need to add an id tag to your post button, so that it looks something like this:
<input id="post" name="post" type="submit">
Then, you'll need to add a Javascript onchange event to each of the other fields, so that when their contents change, the Post button will be disabled (no one can click on it to submit the form). This will ensure that they preview again. To make this happen, simply insert this into the tag for each of the other fields:
onchange="document.getElementById('post').disabled = 'true';"
And that way, should someone change the details of their comment, the post button will automatically be disabled for them, so they know immediately that they have to preview again to get a new hash. At the very least, they understand that they cannot post immediately.
Please note that there are some users who browse with Javascript turned off. For them, this will not work. They will still be able to click the Post button, and they will still not be allowed to comment until they get to that next preview that generates a valid hash.





















Comments (2)
Hi. I am attempting to install your plugin, mt-approval, but I am getting en error. I beleive it is because I am running this on a windows server (2003):
Loading template 'approval.tmpl' failed: HTML::Template->new() : Cannot open included file header.tmpl : file not found. at c:\apache\cgi-bin\extlib/HTML/Template.pm line 2024.
I cannt seem to figure out where I can effect a change on the / or \ issue.
Can you help?
Thanks,
Chris
Posted by chris witzgall on December 17, 2004 9:20 PM
Hi Chris - I'm not sure what sort of error you are having. In the simplest terms (which should be obivious from the message), it seems that the approval template (approval.tmpl) is unable to find the header template (header.tmpl). I wouldn't worry about the slashes, as I don't think that's your issue (otherwise you would see this message all the tiem).
I'd suspect that the problem might lie in your directory setup. Can you tell me where you've located each file? For instance, the approval.tmpl file should be in tmpl/cms, under your main Movable Type directory (not under the plugins directory). Can you verify these locations for me, and let me know where they are?
Posted by Chad Everett on December 20, 2004 8:59 AM