Hey,
this MOD adds checkboxes to the validation area. The ticked boxes will be entered into the textarea.
!! This MOD requires Email image validation results to the user v2 !!Let's start:Files to edit:admin/validateimages.phplang/yourlang/admin.php1.1) Open
admin/validateimages.php and find
<td class=\"tableseparator\">".$lang['validate_msg']."</td>\nAdd below:
<td class=\"tableseparator\">".$lang['validate_reasons']."</td>\n1.2) Find:
echo "<td>".(($image_row['user_id'] != GUEST) ? "<textarea name=\"msg_list[".$image_row['image_id']."]\" id=\"msg\" rows=\"3\" cols=\"57\">".((isset($HTTP_POST_VARS['msg_list'][$image_row['image_id']])) ? stripslashes($HTTP_POST_VARS['msg_list'][$image_row['image_id']]) : "")."</textarea>" : "")."</td>";Add below:
echo "<script>
// Erwartet die ID der Textarea als ersten und den einzufügenden Text als zweiten Parameter
function insertHTML(elementID, content) {
// Fügt über innerHTML den als zweiten Parameter übergebenen Text in die Textarea ein
document.getElementById(elementID).innerHTML += content;
}
</script>";To insert the checkboxes, add below:
<td style=\"background-color:#F5F5F5; color:#0F5475;\">
<input type=\"checkbox\" onclick=\"insertHTML('msg[".$image_row['image_id']."]','Reason1')\" value=\"Reason1\" > Reason1<br>
<input type=\"checkbox\" onclick=\"insertHTML('msg[".$image_row['image_id']."]','Reason2')\" value=\"Reason2\" > Reason2
</td>\n2.1) Open
lang/yourlang/admin.php and search for ?>
Add above closing ?>:
$lang['validate_reasons'] = "Reasons";3.1) Have fun
See also:
http://www.cwcity.de/community/board/showthread_6_4_44552-In-javascript-onclick-Variable-benutzen.htmlRegards,
Patrick