If you are seeing this message, it is possible the page did not load properly. Please hit reload/refresh on your browser.
If you still see this message, you probably do not have a browser that supports web standards, although its content is accessible to any browser or Internet device.

Cool Tips & Tricks Cool Tips & Tricks

Help Communities:
Help Forums Bug Base
<< Prev Topic | Next Topic >>
Cool Tips & Tricks ::: Javascript FAQ ::: Report a post
New Topic    Add Reply
Topic: Report a post  (?)  Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend
Nutrocker

ezboard Moderator
ezSupporter
Posts: 15902
Posted: 6/16/05 2:43 pm    
Report a post
Summary: Add a link to every post (next to the reply link) which members can use to report a post to a moderator / admin.

HEAD (box #1):
 
<script type="text/javascript">
/* BEGIN EZURL */
ezURL = document.location.href.match("http:\/\/((?:pub|b|p)([0-9]+)|beta|vanchau|inbox)\.ezboard\.com\/(b|f)([a-zA-Z0-9]+(?=frm[0-9]+)|[a-zA-Z0-9]+(?!frm[0-9]+))(frm[0-9]+|)(?:(?:[\.]{1})([a-zA-Z0-9\=\+\&\.]+)|)(?:(?:[\x3F]{1})([a-zA-Z0-9\=\+\&\.]+)|)(?:.*)");
try {
        if (ezURL.length > 0) {
                ezPub = ezURL[2].length > 0 ? ezURL[2] : ezURL[1];
                ezFullPub = ezURL[1];
                ezIsBoard = ezURL[3] == "b" ? true : false;
                ezBoardID = ezURL[4];
                ezForum = ezURL[5];
                ezPage = ezURL[6];
                ezQuery = ezURL[7];
                }
} catch (e) { }
ezURL = null;
/* END EZURL */
</script>

This script is used in many of the other scripts offered here. Only one copy should be installed.

FOOTER (box #4):
 
<script type="text/javascript">
/* REPORT A POST LINK */

if (ezPage == "showMessage" || ezPage == "showMessageRange") {
// FORUM IN WHICH TO POST FLAGGED TOPIC LINKS
sReportForum = "frm4";

// TOPIC IN WHICH TO POST FLAGGED TOPIC LINKS (moderators should subscribe)
// EMPTY STRING FOR NEW TOPIC FOR EACH POST REPORTED
sReportTopic = "1234";

// IMAGE FOR NEW LINK
// EMPTY STRING FOR TEXTUAL LINK
sReportPostImage = "http://www.ezboard.com/themes/ultimate/subscribe.gif";

if (sReportTopic.length == 0) {
        sURL = "http://" + ezFullPub + ".ezboard.com/f" + ezBoardID + sReportForum + ".showAddTopicScreenFromWeb?";
} else {
        sURL = "http://" + ezFullPub + ".ezboard.com/f" + ezBoardID + sReportForum + ".showAddReplyScreenFromWeb?topicID=" + sReportTopic + ".topic&";
}
sSubject = "Reporting: " + document.title.replace(" - www.ezboard.com", "");

        for (l = 0; l < document.links.length; l ++) {
                if (document.links[l].href.indexOf("showAddReply") != -1) {
                        sBody = escape(document.links[l].href.replace("showAddReplyScreenFromWeb","showMessage") + "\n\n" + "Please review this post.");
                        repme = document.createElement("a");
                        if (sReportPostImage.length > 0) {
                                repimg = document.createElement("img");
                                repimg.alt = "Report this Post";
                                repimg.src = sReportPostImage;
                                repimg.align = "absmiddle";
                                repimg.border = 0;
                                repme.appendChild(repimg);
                                } else {
                                repme.innerText = "Report";
                                }
                        repme.href = sURL + "body=" + sBody
                        if (repme.href.length < 270) {
                                repme.href += "&subject=" + escape(sSubject).substr(0, 279 - repme.href.length);
                        }
                        if (repme.href.length > 279) {
                                repme.href = repme.href.substr(0,279);
                        }                        
                        document.links[l].parentNode.insertBefore(repme, document.links[l]);
                        l ++;
                }
        }
}

/* END REPORT A POST LINK */
</script>

History:
05/02/2004 - Updated EZurl script (colo move)
23/4/2004 - Update for new b servers
12/17/2003 - written by phalen180

Credits:
written by phalen180
suggested by OXBrother


  reply to this message

Click to receive email notification of replies Click to stop receiving email notification of replies email this topic to a friend

New Topic    Add Reply

jump to:
Topic Control Image::: Topic Commands
<< Prev Topic | Next Topic >>

Icon Legend

reply button:::Reply to Post Button   edit button:::Edit Post Button  delete button:::Delete Post Button (Moderator Only)

subscribe/unsubscribe to thread button:::Subscribe to Thread Button   email to friend button:::Email to Friend Button  



- Cool Tips & Tricks - Javascript FAQ -

Communitiesezboard Help Communities:

Help Forums Help Forums Bug Base Bug Base





Powered By ezboard® Ver. 7.32
Copyright ©1999-2007 ezboard, Inc.