Post by hey on Dec 2, 2005 14:37:26 GMT -8
DO NOT PM ME FOR SUPPORT
This code is literally a replica of vBulletin's mini profile, which puts the mini profile in the posts on top of the post instead of on the left. This only modifies the post view page, it will not modify the profile view or search post pages.
This code looks great with Peter's post split code!
- Note that personal text and chat icons are not supported yet as of now.
9-9-09: Fixed a bug where in Firefox 3, posts would not extend entirely across the screen when viewed by a guest.
PREVIEW: heytest7.proboards.com/index.cgi?board=miniprofile&action=display&thread=48
Cross Browser, global footer:
<script type="text/javascript">
/*
Fusion Mini Profile A By hey
No reposting and keep header intact.
Feel Free To Modify, but keep this header intact
*/
var td = document.getElementsByTagName('td');
function executeMiniProfileA(){
for(t=0;t<td.length;t++){
if(td[t].className=="titlebg" && td[t].colSpan>1 && td[t].innerHTML.match(/searchpopup&/) && td[t].innerHTML.match(/showShareUI/)){
td[t].colSpan='1';
}
if(td[t].width=="20%" && td[t].innerHTML.match(/(Posts:|<b>Poll<\/b><\/font>|Author|Guest<br\s?\/?>)/i)){
td[t].style.display='none';
}
if(td[t].width=="20%" && td[t].innerHTML.match(/Posts:/i) && !td[t].innerHTML.match(/Guest/i)){
td[t+2].parentNode.style.display='none';
var threadSymbol = td[t+2].innerHTML;
var date = td[t+1].getElementsByTagName('font')[1].innerHTML.replace('«','').replace('»','');
miniHolder = '<table width="100%" cellpadding="0"><tr><td width="100%">';
miniHolder += '<table cellpadding="0" width="100%"><tr><td width="99%" colspan="3" valign="middle">';
miniHolder += '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td width="50%" colspan="3" valign="middle">';
miniHolder += ''+threadSymbol+date+'';
miniHolder += '</td>';
var offlineOnline = (td[t].innerHTML.match(/member is (.+?)<br\s?\/?>/i)) ? RegExp.$1: '';
miniHolder += '<td width="50%" colspan="3" valign="middle" align="right">';
miniHolder += 'This member is currently '+offlineOnline+'.';
miniHolder += '</td></tr></table></td></tr>';
miniHolder += '<tr><td colspan="3" width="100%">';
miniHolder += '<hr width="99%" size="1" class="hr" />';
miniHolder += '</td></tr>';
var avatarImage = (td[t].getElementsByTagName('center')[0].innerHTML.match(/(.+?)<br\s?\/?>/i)) ? RegExp.$1: '';
miniHolder += '<tr><td width="1%">';
miniHolder += ''+avatarImage+'';
miniHolder += '</td>';
if(td[t].innerHTML.match(/(.+?)<br\s?\/?>(.+?)<br\s?\/?>(.+?)<br\s?\/?>(.+?)<br\s?\/?>/i)){
var screenName = RegExp.$1;
var statusRank = RegExp.$2;
var statusImages = RegExp.$3;
var statusTitle = RegExp.$4;
if(!statusTitle.match (/member is/i)){
var customTitle = ' - '+RegExp.$4;
} else {
var customTitle = '';
}
}
miniHolder += '<td width="50%" valign="middle"><font size="3">';
miniHolder += ''+screenName+' ';
miniHolder += ' </font>';
miniHolder += ''+statusImages+'';
miniHolder += '<br />';
miniHolder += ''+statusRank+customTitle+'';
miniHolder += '<br />';
if(td[t].innerHTML.match(/Karma:/i)){
var karmaWord = 'Karma: ';
var karmaArea = td[t].innerHTML.split(/Karma: /i)[1];
} else {
var karmaWord = '';
var karmaArea = '';
}
miniHolder += ''+karmaWord+karmaArea+'';
miniHolder += '</td>';
var joinDate = (td[t].innerHTML.match(/Joined: (.+?)<br\s?\/?>/i)) ? 'Joined: '+RegExp.$1+'<br />': '';
miniHolder += '<td width="49%" align="right">';
miniHolder += ''+joinDate+'';
var locattion = (td[t].innerHTML.match(/Location: (.+?)<br\s?\/?>/i)) ? 'Location: '+RegExp.$1+'<br />': '';
miniHolder += ''+locattion+'';
var gender = (td[t].innerHTML.match(/Gender: (.+?)<br\s?\/?>/i)) ? 'Gender: '+RegExp.$1+'<br />': '';
miniHolder += ''+gender+'';
var postCount = (td[t].innerHTML.match(/Posts: (.+?)<br\s?\/?>/i)) ? 'Posts: '+RegExp.$1+'<br />': '';
miniHolder += ''+postCount+'';
miniHolder += '</td></tr>';
var postInfo = td[t+1].innerHTML;
miniHolder += '<tr><td width="100%" colspan="3">';
miniHolder += ''+postInfo+'';
miniHolder += '</td></tr>';
miniHolder += '<tr><td width="100%" colspan="3" valign="middle">';
miniHolder += '<hr width="99%" size="1" class="hr" />';
miniHolder += '</td></tr>';
miniHolder += '<tr><td width="99%" colspan="3" valign="middle">';
miniHolder += '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr>';
var buttons = td[t+4].innerHTML;
miniHolder += '<td width="100%" colspan="3" valign="middle" align="right">';
miniHolder += ''+buttons+'';
miniHolder += '</td></tr></table';
miniHolder += '</td></tr></table>';
miniHolder += '</td></tr></table>';
td[t+1].innerHTML=''+miniHolder+'';
}
if(td[t].width=="20%" && !td[t].innerHTML.match(/Posts:/i) && td[t].innerHTML.match(/Guest/i)){
td[t+2].parentNode.style.display='none';
var threadSymbol = td[t+2].innerHTML;
var date = td[t+1].getElementsByTagName('font')[1].innerHTML.replace('«','').replace('»','');
miniHolder = '<table width="100%" cellpadding="0"><tr><td width="100%">';
miniHolder += '<table cellpadding="0" width="100%"><tr><td width="100%" colspan="3" valign="middle">';
miniHolder += ''+threadSymbol+date+'';
miniHolder += '</td></tr>';
if(td[t].innerHTML.match(/(.+?)<br\s?\/?>(.+?)<br\s?\/?>/i)){
var guestName = RegExp.$1;
var guestGuest = RegExp.$2;
}
miniHolder += '<tr><td colspan="3" width="100%">';
miniHolder += '<hr width="100%" size="1" class="hr" />';
miniHolder += '</td></tr>';
miniHolder += '<tr><td width="1%">';
miniHolder += '</td>';
miniHolder += '<td width="99%" valign="middle">';
miniHolder += '<font size="3">';
miniHolder += ''+guestName+' ';
miniHolder += '</font>';
miniHolder += '<br />';
miniHolder += ''+guestGuest+'';
miniHolder += '</td></tr>';
var postInfo = td[t+1].innerHTML;
miniHolder += '<tr><td width="100%" colspan="3">';
miniHolder += ''+postInfo+'';
miniHolder += '</td></tr>';
var buttons = td[t+4].innerHTML;
miniHolder += '<tr><td width="100%" colspan="3" valign="middle">';
miniHolder += '<hr width="99%" size="1" class="hr" />';
miniHolder += '</td></tr>';
miniHolder += '<tr><td width="50%" colspan="3" align="right">';
miniHolder += ''+buttons+'';
miniHolder += '</td></tr></table>';
miniHolder += '</td></tr></table>';
td[t+1].innerHTML=''+miniHolder+'';
}
}
}
if(location.href.match(/action=display/) && !location.href.match(/action=viewprofile/)){
executeMiniProfileA();
}
</script>
Note that this will not modify the profile page. Otherwise, this will work anywhere else.
*4-18-11 update: since send to friend no longer exists, updated code to look for something else in there (courtesy subdevo) - Wormo
This code is literally a replica of vBulletin's mini profile, which puts the mini profile in the posts on top of the post instead of on the left. This only modifies the post view page, it will not modify the profile view or search post pages.
This code looks great with Peter's post split code!
- Note that personal text and chat icons are not supported yet as of now.
9-9-09: Fixed a bug where in Firefox 3, posts would not extend entirely across the screen when viewed by a guest.
PREVIEW: heytest7.proboards.com/index.cgi?board=miniprofile&action=display&thread=48
Cross Browser, global footer:
<script type="text/javascript">
/*
Fusion Mini Profile A By hey
No reposting and keep header intact.
Feel Free To Modify, but keep this header intact
*/
var td = document.getElementsByTagName('td');
function executeMiniProfileA(){
for(t=0;t<td.length;t++){
if(td[t].className=="titlebg" && td[t].colSpan>1 && td[t].innerHTML.match(/searchpopup&/) && td[t].innerHTML.match(/showShareUI/)){
td[t].colSpan='1';
}
if(td[t].width=="20%" && td[t].innerHTML.match(/(Posts:|<b>Poll<\/b><\/font>|Author|Guest<br\s?\/?>)/i)){
td[t].style.display='none';
}
if(td[t].width=="20%" && td[t].innerHTML.match(/Posts:/i) && !td[t].innerHTML.match(/Guest/i)){
td[t+2].parentNode.style.display='none';
var threadSymbol = td[t+2].innerHTML;
var date = td[t+1].getElementsByTagName('font')[1].innerHTML.replace('«','').replace('»','');
miniHolder = '<table width="100%" cellpadding="0"><tr><td width="100%">';
miniHolder += '<table cellpadding="0" width="100%"><tr><td width="99%" colspan="3" valign="middle">';
miniHolder += '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr><td width="50%" colspan="3" valign="middle">';
miniHolder += ''+threadSymbol+date+'';
miniHolder += '</td>';
var offlineOnline = (td[t].innerHTML.match(/member is (.+?)<br\s?\/?>/i)) ? RegExp.$1: '';
miniHolder += '<td width="50%" colspan="3" valign="middle" align="right">';
miniHolder += 'This member is currently '+offlineOnline+'.';
miniHolder += '</td></tr></table></td></tr>';
miniHolder += '<tr><td colspan="3" width="100%">';
miniHolder += '<hr width="99%" size="1" class="hr" />';
miniHolder += '</td></tr>';
var avatarImage = (td[t].getElementsByTagName('center')[0].innerHTML.match(/(.+?)<br\s?\/?>/i)) ? RegExp.$1: '';
miniHolder += '<tr><td width="1%">';
miniHolder += ''+avatarImage+'';
miniHolder += '</td>';
if(td[t].innerHTML.match(/(.+?)<br\s?\/?>(.+?)<br\s?\/?>(.+?)<br\s?\/?>(.+?)<br\s?\/?>/i)){
var screenName = RegExp.$1;
var statusRank = RegExp.$2;
var statusImages = RegExp.$3;
var statusTitle = RegExp.$4;
if(!statusTitle.match (/member is/i)){
var customTitle = ' - '+RegExp.$4;
} else {
var customTitle = '';
}
}
miniHolder += '<td width="50%" valign="middle"><font size="3">';
miniHolder += ''+screenName+' ';
miniHolder += ' </font>';
miniHolder += ''+statusImages+'';
miniHolder += '<br />';
miniHolder += ''+statusRank+customTitle+'';
miniHolder += '<br />';
if(td[t].innerHTML.match(/Karma:/i)){
var karmaWord = 'Karma: ';
var karmaArea = td[t].innerHTML.split(/Karma: /i)[1];
} else {
var karmaWord = '';
var karmaArea = '';
}
miniHolder += ''+karmaWord+karmaArea+'';
miniHolder += '</td>';
var joinDate = (td[t].innerHTML.match(/Joined: (.+?)<br\s?\/?>/i)) ? 'Joined: '+RegExp.$1+'<br />': '';
miniHolder += '<td width="49%" align="right">';
miniHolder += ''+joinDate+'';
var locattion = (td[t].innerHTML.match(/Location: (.+?)<br\s?\/?>/i)) ? 'Location: '+RegExp.$1+'<br />': '';
miniHolder += ''+locattion+'';
var gender = (td[t].innerHTML.match(/Gender: (.+?)<br\s?\/?>/i)) ? 'Gender: '+RegExp.$1+'<br />': '';
miniHolder += ''+gender+'';
var postCount = (td[t].innerHTML.match(/Posts: (.+?)<br\s?\/?>/i)) ? 'Posts: '+RegExp.$1+'<br />': '';
miniHolder += ''+postCount+'';
miniHolder += '</td></tr>';
var postInfo = td[t+1].innerHTML;
miniHolder += '<tr><td width="100%" colspan="3">';
miniHolder += ''+postInfo+'';
miniHolder += '</td></tr>';
miniHolder += '<tr><td width="100%" colspan="3" valign="middle">';
miniHolder += '<hr width="99%" size="1" class="hr" />';
miniHolder += '</td></tr>';
miniHolder += '<tr><td width="99%" colspan="3" valign="middle">';
miniHolder += '<table cellpadding="0" cellspacing="0" border="0" width="100%"><tr>';
var buttons = td[t+4].innerHTML;
miniHolder += '<td width="100%" colspan="3" valign="middle" align="right">';
miniHolder += ''+buttons+'';
miniHolder += '</td></tr></table';
miniHolder += '</td></tr></table>';
miniHolder += '</td></tr></table>';
td[t+1].innerHTML=''+miniHolder+'';
}
if(td[t].width=="20%" && !td[t].innerHTML.match(/Posts:/i) && td[t].innerHTML.match(/Guest/i)){
td[t+2].parentNode.style.display='none';
var threadSymbol = td[t+2].innerHTML;
var date = td[t+1].getElementsByTagName('font')[1].innerHTML.replace('«','').replace('»','');
miniHolder = '<table width="100%" cellpadding="0"><tr><td width="100%">';
miniHolder += '<table cellpadding="0" width="100%"><tr><td width="100%" colspan="3" valign="middle">';
miniHolder += ''+threadSymbol+date+'';
miniHolder += '</td></tr>';
if(td[t].innerHTML.match(/(.+?)<br\s?\/?>(.+?)<br\s?\/?>/i)){
var guestName = RegExp.$1;
var guestGuest = RegExp.$2;
}
miniHolder += '<tr><td colspan="3" width="100%">';
miniHolder += '<hr width="100%" size="1" class="hr" />';
miniHolder += '</td></tr>';
miniHolder += '<tr><td width="1%">';
miniHolder += '</td>';
miniHolder += '<td width="99%" valign="middle">';
miniHolder += '<font size="3">';
miniHolder += ''+guestName+' ';
miniHolder += '</font>';
miniHolder += '<br />';
miniHolder += ''+guestGuest+'';
miniHolder += '</td></tr>';
var postInfo = td[t+1].innerHTML;
miniHolder += '<tr><td width="100%" colspan="3">';
miniHolder += ''+postInfo+'';
miniHolder += '</td></tr>';
var buttons = td[t+4].innerHTML;
miniHolder += '<tr><td width="100%" colspan="3" valign="middle">';
miniHolder += '<hr width="99%" size="1" class="hr" />';
miniHolder += '</td></tr>';
miniHolder += '<tr><td width="50%" colspan="3" align="right">';
miniHolder += ''+buttons+'';
miniHolder += '</td></tr></table>';
miniHolder += '</td></tr></table>';
td[t+1].innerHTML=''+miniHolder+'';
}
}
}
if(location.href.match(/action=display/) && !location.href.match(/action=viewprofile/)){
executeMiniProfileA();
}
</script>
Note that this will not modify the profile page. Otherwise, this will work anywhere else.
*4-18-11 update: since send to friend no longer exists, updated code to look for something else in there (courtesy subdevo) - Wormo