Post by Wild1145 on Dec 26, 2012 21:17:18 GMT
This is designed more for the admins, when they are planning on going away they can set a message, they wont be able to do anything though when in away mode, it will be read only i think
GLOBAL FOOTER
GLOBAL FOOTER
<script type="text/javascript"> /* Fix Password Field for Firefox Users */
/* Main Footers - Open Source */
if(document.modifyForm && document.modifyForm.password && document.addEventListener){
window.onload=function(){
document.modifyForm.password.value="";
}}
</script>
<script type="text/javascript">
<!--
// Away Messageity By Tylr
// Original: [a href="http://support.proboards.com
if(location.href.match("]support.proboards.com
if(location.href.match([/a]'action=modifyprofile') && location.href.match('&goaway')){
var ames=location.href.split('&goaway=')[1]
ames=ames.replace(/%20/g,' ')
document.modifyForm.name.value=document.modifyForm.name.value+' (away)'
document.modifyForm.personaltext.value='ketist'+ames+'ketien'+document.modifyForm.personaltext.value
var td=document.getElementsByTagName('td')
for(i=0;i<td.length;i++){
if(!td.innerHTML.match('profileaction')){
td.style.display='none'
}
}
var bl=document.getElementsByTagName('b')
for(i=0;i<bl.length;i++){
bl.style.display='none'
}
var bl=document.getElementsByTagName('hr')
for(i=0;i<bl.length;i++){
bl.style.display='none'
}
var bl=document.getElementsByTagName('font')
for(i=0;i<bl.length;i++){
if(bl.innerHTML.match('The information you fill out')){
bl.innerHTML+='<br>Sure to set away message to "'+ames+'"?<BR><BR>If so, click Modify Profile.'
}
}
var bl=document.getElementsByTagName('input')
for(i=0;i<bl.length;i++){
if(bl.value=='Delete Account'){
bl.style.display='none'
}
}
}
// End mod profile 1, start mod 2
if(pb_displayname.match('away') && !location.href.match('&comeback')){
var bl=document.getElementsByTagName('td')
for(i=0;i<bl.length;i++){
bl.style.display='none'
}
document.write('<BR><BR><center><h1>You are away.</h1><a href="/index.cgi?action=modifyprofile&user='+pb_username+'&comeback">Come back.</a><BR><BR><BR><BR><BR><BR>')
}
if(location.href.match('action=modifyprofile') && location.href.match('&comeback')){
document.modifyForm.name.value=document.modifyForm.name.value.split(' (awa')[0]
document.modifyForm.personaltext.value=document.modifyForm.personaltext.value.split('ketien')[1]
var td=document.getElementsByTagName('td')
for(i=0;i<td.length;i++){
if(!td.innerHTML.match('profileaction')){
td.style.display='none'
}
}
var bl=document.getElementsByTagName('b')
for(i=0;i<bl.length;i++){
bl.style.display='none'
}
var bl=document.getElementsByTagName('hr')
for(i=0;i<bl.length;i++){
bl.style.display='none'
}
var bl=document.getElementsByTagName('font')
for(i=0;i<bl.length;i++){
if(bl.innerHTML.match('The information you fill out')){
bl.innerHTML+='<br>Sure to come back from away?<BR><BR>If so, click Modify Profile.'
}
}
var bl=document.getElementsByTagName('input')
for(i=0;i<bl.length;i++){
if(bl.value=='Delete Account'){
bl.style.display='none'
}
}
}
// End mod profile 2, start minimod
if(location.href.match(/action=(displ|search2|viewpr|pmv|(user)?rece|cal\w+iew)/)){
var td=document.getElementsByTagName('td')
for(i=0;i<td.length;i++){
if(td.width=="20%" && (td.className=="windowbg" || td.className=="windowbg2") && td.innerHTML.match('keti')){
var awmes=td.innerHTML.split('ketist')[1].split('ketien')[0]
awmes=awmes.replace(/%22/g,'\"')
td.innerHTML=td.innerHTML.replace('ketist'+awmes+'ketien','')
td.innerHTML=td.innerHTML.replace(' (away)','')
td.innerHTML=td.innerHTML.replace('member is offline','member is away<br><font size="1"><a href="javascript:alert(awmes)">view away message</a></font>')
td.innerHTML=td.innerHTML.replace('member is <b>online</b>','member is <b>away</b><br><font size="1"><a href=\'javascript:alert("'+awmes+'")\'>view away message</a></font>')
}
}
}
// End minimod, start general offline
function docon(){
var itybity=prompt('Please enter your away message below.','I am away')
if(itybity){
location.href='/index.cgi?action=modifyprofile&user='+pb_username+'&goaway='+itybity
}
}
document.getElementsByTagName('td')[1].innerHTML+='<br><a href="javascript:docon()">Set my status to away</a>'
//-->
</script>[/size]