I found Greasemonkey extension for IPB for moderating WARN feature. You can have lists of commonly used warning messages and have it as pull-down menu style when issuing a warning. Very cool! The simple thing about this extension is how easy to modify to fit your needs.
This extension, called IPB Moderator Reasonator ( http://www.whiteacid.org/greasemonkey/#ipb...ator_reasonator ), shows only when you are at the warning page. Installation is very simple. After the installation open Manage User Scripts and edit the URL to your own IPB forum board (currently installed for Trap17 on my Firefox).
It is simply amazing.
The source code is listed here just in case the site does not show
CODE
// ==UserScript==
// @name IPB moderator reasonator
// @namespace http://mywebsite.com/myscripts
// @description Provides a select box with common reasons to warn people on the IPB warning page
// @include http://www.cirticalsecurity.net/index.php?act=warn&type=add&*
// ==/UserScript==
textarea = document.getElementsByName('reason')[0]
parent = textarea.parentNode
br = document.createElement('br')
//The drop down menu
select = document.createElement('select')
select.setAttribute('onchange','warn_add_reason(this.value)')
//Now lets create the "append rules link" button
button = document.createElement('input')
button.type = "button"
button.value = "append rules link"
button.setAttribute('onclick','warn_add_rules()')
//Add the reasons
reasons = new Array()
reasons[0] = new Array("Select a reason","Select a reason") //Do not change
reasons[1] = new Array("Multiple consecutive posts","You have created several consecutive posts in one thread. This is usually regarded as spam.")
reasons[2] = new Array("Linking to a site/program with relation to hacking it","You have linked to a site with relation to hacking it, this is against our rules. I have removed your thread.")
reasons[3] = new Array("Spamming","You have have spammed, the offending post has been removed")
reasons[4] = new Array("Necroposting","You have posted a non-constructive post in a long dead topic.")
reasons[5] = new Array("Abuse","You have been abusing other members on the forum.")
reasons[6] = new Array("Posting spoilers","You have posted blatant spoilers.")
reasons[7] = new Array("Asking for warez","You have asked where you can get illegal programs/music/films.")
reasons[8] = new Array("Giving link to warez","You have given links to illegal programs/music/films.")
reasons[9] = new Array("Signature too large","Your signature is too large.")
reasons[10] = new Array("Avatar too large","Your avatar is too large.")
for (i=0; i<reasons.length; i++)
{
eval("child_"+i+" = document.createElement('option')")
reason = escape(reasons[i][1]) //so quotes can be used
eval("child_"+i+".value = '"+reason+"'")
eval("child_"+i+".innerHTML = '"+reasons[i][0]+"'")
eval("select.appendChild(child_"+i+")")
}
parent.insertBefore(select,textarea)
parent.insertBefore(button,textarea)
parent.insertBefore(br,textarea)
// executed from within the page
function warn_add_reason(reason)
{
document.getElementsByName('reason')[0].value = unescape(reason)
}
function warn_add_rules()
{
domain = location.href.substr(0,location.href.substring(8,location.href.length).indexOf("/")+8) //get the domain name
document.getElementsByName('reason')[0].value += "\n[url=\""+domain+"/?act=boardrules\"]Read the rules[/url]"
}
unsafeWindow.eval(warn_add_reason.toString())
unsafeWindow.eval(warn_add_rules.toString())
// @name IPB moderator reasonator
// @namespace http://mywebsite.com/myscripts
// @description Provides a select box with common reasons to warn people on the IPB warning page
// @include http://www.cirticalsecurity.net/index.php?act=warn&type=add&*
// ==/UserScript==
textarea = document.getElementsByName('reason')[0]
parent = textarea.parentNode
br = document.createElement('br')
//The drop down menu
select = document.createElement('select')
select.setAttribute('onchange','warn_add_reason(this.value)')
//Now lets create the "append rules link" button
button = document.createElement('input')
button.type = "button"
button.value = "append rules link"
button.setAttribute('onclick','warn_add_rules()')
//Add the reasons
reasons = new Array()
reasons[0] = new Array("Select a reason","Select a reason") //Do not change
reasons[1] = new Array("Multiple consecutive posts","You have created several consecutive posts in one thread. This is usually regarded as spam.")
reasons[2] = new Array("Linking to a site/program with relation to hacking it","You have linked to a site with relation to hacking it, this is against our rules. I have removed your thread.")
reasons[3] = new Array("Spamming","You have have spammed, the offending post has been removed")
reasons[4] = new Array("Necroposting","You have posted a non-constructive post in a long dead topic.")
reasons[5] = new Array("Abuse","You have been abusing other members on the forum.")
reasons[6] = new Array("Posting spoilers","You have posted blatant spoilers.")
reasons[7] = new Array("Asking for warez","You have asked where you can get illegal programs/music/films.")
reasons[8] = new Array("Giving link to warez","You have given links to illegal programs/music/films.")
reasons[9] = new Array("Signature too large","Your signature is too large.")
reasons[10] = new Array("Avatar too large","Your avatar is too large.")
for (i=0; i<reasons.length; i++)
{
eval("child_"+i+" = document.createElement('option')")
reason = escape(reasons[i][1]) //so quotes can be used
eval("child_"+i+".value = '"+reason+"'")
eval("child_"+i+".innerHTML = '"+reasons[i][0]+"'")
eval("select.appendChild(child_"+i+")")
}
parent.insertBefore(select,textarea)
parent.insertBefore(button,textarea)
parent.insertBefore(br,textarea)
// executed from within the page
function warn_add_reason(reason)
{
document.getElementsByName('reason')[0].value = unescape(reason)
}
function warn_add_rules()
{
domain = location.href.substr(0,location.href.substring(8,location.href.length).indexOf("/")+8) //get the domain name
document.getElementsByName('reason')[0].value += "\n[url=\""+domain+"/?act=boardrules\"]Read the rules[/url]"
}
unsafeWindow.eval(warn_add_reason.toString())
unsafeWindow.eval(warn_add_rules.toString())

