ЧелоВек СОвести – РАзумный, ВолВой, НРАВственный. |
<!-- function collapseThread( theId ) { var comment = document.getElementById(theId); if(!comment) { alert("ERROR:nThe document structure is differentnfrom what Threaded Comments expects.nYou are missing the element '"+theId+"'"); return; } var theBody = findBody(comment); if(comment.className.indexOf("collapsed") > -1) { comment.className = comment.className.replace(" collapsed", "");; } else { comment.className += " collapsed"; } } function expandThread( theId ) { var comment = document.getElementById(theId); if(!comment) { alert("ERROR:nThe document structure is differentnfrom what Threaded Comments expects.nYou are missing the element '"+theId+"'"); return; } var theBody = findBody(comment); if(comment.className.indexOf("collapsed") > -1) { comment.className = comment.className.replace(" collapsed", "");; } } function findBody(el) { var divs = el.getElementsByTagName("div"); var ret; for(var i = 0; i -1) return divs.item(i); } return false; } function onAddComment() { //checkDocumentIntegrity(); var el = document.getElementById("commentform"); // Future release: Check if form is filled correctly and mark the form fields. el.submit(); } function moveAddCommentBelow(theId, threadId, collapse) { expandThread( theId ); var addComment = document.getElementById("addcomment"); if(!addComment) { alert("ERROR:nThreaded Comments can't find the 'addcomment' div.nThis is probably because you have changednthe comments.php file.nMake sure there is a tag around the formnthat has the id 'addcomment'"); return } var comment = document.getElementById(theId); if(collapse) { for(var i = 0; i < comment.childNodes.length; ++i) { var c = comment.childNodes.item(i); if(typeof(c.className) == "string" && c.className.indexOf("collapsed")-1) { addComment.className = addComment.className.replace(" alt", ""); } else { addComment.className += " alt"; } var replyId = document.getElementById("comment_reply_ID"); if(replyId == null) { alert("Brians Threaded Comments Error:nThere is no hidden form field calledn'comment_reply_ID'. This is probably because younchanged the comments.php file and forgotnto include the field. Please take a looknat the original comments.php and copy thenform field over."); } replyId.value = threadId; var reRootElement = document.getElementById("reroot"); if(reRootElement == null) { alert("Brians Threaded Comments Error:nThere is no anchor tag called 'reroot' wherenthe comment form starts.nPlease compare your comments.php to the originalncomments.php and copy the reroot anchor tag over."); } reRootElement.style.display = "block"; var aTags = comment.getElementsByTagName("A"); var anc = aTags.item(0).id; //document.location.rel="nofollow" href = "#"+anc; document.getElementById("comment").focus(); } function checkDocumentIntegrity() { str = ""; str += checkElement("reroot","div tag"); str += checkElement("addcomment", "div tag"); str += checkElement("comment_reply_ID", "hidden form field"); str += checkElement("content", "div tag"); str += checkElement("comment", "textfield"); str += checkElement("addcommentanchor", "anchor tag"); if(str != "") { str = "Brian's Threaded Comments are missing some of the elements that are required for it to function correctly.nThis is probably the because you have changed the original comments.php that was included with the plugin.nnThese are the errors:n" + str; str += "nYou should compare your comments.php with the original comments.php and make sure the required elements have not been removed."; alert(str); } } function checkElement(theId, elDesc) { var el = document.getElementById(theId); if(!el) { if(elDesc == null) elDesc = "element"; return "- The "+elDesc+" with the ID '" +theId + "' is missingn"; } else return ""; } function reRoot() { var addComment = document.getElementById("addcomment"); var reRootElement = document.getElementById("reroot"); reRootElement.style.display = "none"; var content = document.getElementById("content-main"); if( !content ) content = document.getElementById("content"); if( content ) { addComment.parentNode.removeChild(addComme
<!-- function collapseThread( theId ) { var comment = document.getElementById(theId); if(!comment) { alert("ERROR:nThe document structure is differentnfrom what Threaded Comments expects.nYou are missing the element '"+theId+"'"); return; } var theBody = findBody(comment); if(comment.className.indexOf("collapsed") > -1) { comment.className = comment.className.replace(" collapsed", "");; } else { comment.className += " collapsed"; } } function expandThread( theId ) { var comment = document.getElementById(theId); if(!comment) { alert("ERROR:nThe document structure is differentnfrom what Threaded Comments expects.nYou are missing the element '"+theId+"'"); return; } var theBody = findBody(comment); if(comment.className.indexOf("collapsed") > -1) { comment.className = comment.className.replace(" collapsed", "");; } } function findBody(el) { var divs = el.getElementsByTagName("div"); var ret; for(var i = 0; i -1) return divs.item(i); } return false; } function onAddComment() { //checkDocumentIntegrity(); var el = document.getElementById("commentform"); // Future release: Check if form is filled correctly and mark the form fields. el.submit(); } function moveAddCommentBelow(theId, threadId, collapse) { expandThread( theId ); var addComment = document.getElementById("addcomment"); if(!addComment) { alert("ERROR:nThreaded Comments can't find the 'addcomment' div.nThis is probably because you have changednthe comments.php file.nMake sure there is a tag around the formnthat has the id 'addcomment'"); return } var comment = document.getElementById(theId); if(collapse) { for(var i = 0; i < comment.childNodes.length; ++i) { var c = comment.childNodes.item(i); if(typeof(c.className) == "string" && c.className.indexOf("collapsed")-1) { addComment.className = addComment.className.replace(" alt", ""); } else { addComment.className += " alt"; } var replyId = document.getElementById("comment_reply_ID"); if(replyId == null) { alert("Brians Threaded Comments Error:nThere is no hidden form field calledn'comment_reply_ID'. This is probably because younchanged the comments.php file and forgotnto include the field. Please take a looknat the original comments.php and copy thenform field over."); } replyId.value = threadId; var reRootElement = document.getElementById("reroot"); if(reRootElement == null) { alert("Brians Threaded Comments Error:nThere is no anchor tag called 'reroot' wherenthe comment form starts.nPlease compare your comments.php to the originalncomments.php and copy the reroot anchor tag over."); } reRootElement.style.display = "block"; var aTags = comment.getElementsByTagName("A"); var anc = aTags.item(0).id; //document.location.rel="nofollow" href = "#"+anc; document.getElementById("comment").focus(); } function checkDocumentIntegrity() { str = ""; str += checkElement("reroot","div tag"); str += checkElement("addcomment", "div tag"); str += checkElement("comment_reply_ID", "hidden form field"); str += checkElement("content", "div tag"); str += checkElement("comment", "textfield"); str += checkElement("addcommentanchor", "anchor tag"); if(str != "") { str = "Brian's Threaded Comments are missing some of the elements that are required for it to function correctly.nThis is probably the because you have changed the original comments.php that was included with the plugin.nnThese are the errors:n" + str; str += "nYou should compare your comments.php with the original comments.php and make sure the required elements have not been removed."; alert(str); } } function checkElement(theId, elDesc) { var el = document.getElementById(theId); if(!el) { if(elDesc == null) elDesc = "element"; return "- The "+elDesc+" with the ID '" +theId + "' is missingn"; } else return ""; } function reRoot() { var addComment = document.getElementById("addcomment"); var reRootElement = document.getElementById("reroot"); reRootElement.style.display = "none"; var content = document.getElementById("content-main"); if( !content ) content = document.getElementById("content"); if( content ) { addComment.parentNode.removeChild(addComme
Пожаловаться