18-Jul-2010, 02:43 AM
There is one ban reason that is very annoying: mismatching data. It occurs whenever there is something submitted that isn't supposed to be. To see what I mean, try the following:
In order to stop this from happening, do the following:
No more bans on mismatched data will occur. Don't know why it would be considered a ban in the first place. Not really a security threat in most cases. If I'm mistaken, then please tell me.
- Open a comment form with a rating field
- Open the Commentics admin panel
- Disable the rating field
- Finish writing the comment and submit it
In order to stop this from happening, do the following:
- Go to 'path to commentics here'/comments/includes/functions/processor.php
- Edit the functions validate_country and validate_rating so that the lines "ban(BAN_REASON_MISMATCHING_DATA)" are "error(ERROR_MESSAGE_INVALID_COUNTRY)" and "error(ERROR_MESSAGE_INVALID_RATING)" respectively
- Go to 'path to commentics here'/comments/includes/app/processor.php
- Find and replace all "ban(BAN_REASON_MISMATCHING_DATA)" strings with "error(ERROR_MESSAGE_MISMATCHING_DATA)" or alternitavely something more fitting to the context it's in such as "error(ERROR_MESSAGE_INVALID NAME)" for the name part
- Go to 'path to commentics here'/comments/includes/language/processer.php
- Add the following lines to the end of the error section: "define ('ERROR_MESSAGE_INVALID_COUNTRY', 'There was an error while proccessing the selected country. Please try again.');" and "define ('ERROR_MESSAGE_INVALID_RATING', 'There was an error while proccessing the selected rating. Please try again.');"
- If you did "error(ERROR_MESSAGE_MISMATCHING_DATA)" for step 4 then also add "define ('ERROR_MESSAGE_MISMATCHING_DATA', 'There was data in your post that\'s not supposed to be there.');"
No more bans on mismatched data will occur. Don't know why it would be considered a ban in the first place. Not really a security threat in most cases. If I'm mistaken, then please tell me.
I'm giving you three guesses...