Post by Isa The Great on Jul 26, 2009 10:32:02 GMT -5
Puts a link in the welcome table to set yourself to away, then prompts for an away message. A link will be added to your mini-profile to a pop-up with your away message in it. Works whether you're online or offline, if you're online it has away in bold if your offline it's normal. If you are away you are not able to do anything until you come back.
Preview of the effect on the mini-profile.
Global Footer
No editing required.
(Repost if header stays in tact.)
Preview of the effect on the mini-profile.
Global Footer
<script language="JavaScript">
<!--
// Away Messageity By T.J.
// Original: support.proboards.com
if(location.href.match('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[i].innerHTML.match('profileaction')){
td[i].style.display='none'
}
}
var bl=document.getElementsByTagName('b')
for(i=0;i<bl.length;i++){
bl[i].style.display='none'
}
var bl=document.getElementsByTagName('hr')
for(i=0;i<bl.length;i++){
bl[i].style.display='none'
}
var bl=document.getElementsByTagName('font')
for(i=0;i<bl.length;i++){
if(bl[i].innerHTML.match('The information you fill out')){
bl[i].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[i].value=='Delete Account'){
bl[i].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[i].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[i].innerHTML.match('profileaction')){
td[i].style.display='none'
}
}
var bl=document.getElementsByTagName('b')
for(i=0;i<bl.length;i++){
bl[i].style.display='none'
}
var bl=document.getElementsByTagName('hr')
for(i=0;i<bl.length;i++){
bl[i].style.display='none'
}
var bl=document.getElementsByTagName('font')
for(i=0;i<bl.length;i++){
if(bl[i].innerHTML.match('The information you fill out')){
bl[i].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[i].value=='Delete Account'){
bl[i].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[i].width=="20%" && (td[i].className=="windowbg" || td[i].className=="windowbg2") && td[i].innerHTML.match('keti')){
var awmes=td[i].innerHTML.split('ketist')[1].split('ketien')[0]
awmes=awmes.replace(/%22/g,'\"')
td[i].innerHTML=td[i].innerHTML.replace('ketist'+awmes+'ketien','')
td[i].innerHTML=td[i].innerHTML.replace(' (away)','')
td[i].innerHTML=td[i].innerHTML.replace('member is offline','member is away<br><font size="1"><a href="javascript:alert(awmes)">view away message</a></font>')
td[i].innerHTML=td[i].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>
No editing required.
(Repost if header stays in tact.)