Post by Tylr on Jan 16, 2007 20:10:11 GMT -8
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
<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: 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.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>
No editing required.
(Repost if header stays in tact.)
Note: You'll have problems if FireFox automatically fills in your password.
Preview of the effect on the mini-profile.
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: 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.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>
No editing required.
(Repost if header stays in tact.)