Post by (¯`•DregondRahl•._) on Oct 20, 2006 6:12:12 GMT -8
what this code does is add a feild in the modify profile section where you can add in your picture URL and it will show it on the main profile page
Just edit this
var Title = "Member's Picture";
MAIN FOOTER
<script type="text/javascript">
<!--
/* Member's Picture Section - DregondRahl
Donot Repost this code or edit this copyright
support.proboards.com */
var Title = "Member's Picture";
//Do not Edit Below
var tr = document.getElementsByTagName("tr");
var td = document.getElementsByTagName("td");
if(document.modifyForm && document.modifyForm.signature){
Form = document.modifyForm;
AH = Form.avatarheight.parentNode.parentNode.parentNode;
MpTr = AH.parentNode.insertRow(1);
MpTr.insertCell(0).innerHTML = '<font size=2>Profile Image</font>';
MpTr.insertCell(1).innerHTML = '<input type="text" size="35" name="mpimg">';
MpTr.insertCell(2).innerHTML = '<font size=1>Enter the URL Of Profile Image</font>';
if(Form.signature.value.match(/\[YmP:(.+?)\]/))
Form.mpimg.value=RegExp. $1;
Form.signature.value = Form.signature.value.replace(/\[YmP:(.+?)\]/,'');
function doImg(){
if(!Form.mpimg.value == "" ){
ppImage = Form.mpimg.value;
Form.signature.value = '[YmP:'+ppImage+']' +Form.signature.value;
}
}
if(document.addEventListener){
Form.profileaction[0].addEventListener('click',doImg,false);
} else {
Form.profileaction[0].attachEvent('onclick',doImg);
}
}
if(location.href.match(/viewprofile/)){
pImg = false;
for(t=0; t<td.length; t++){
if(td[t].colSpan == '2' && td[t].innerHTML.match(/\[YmP:(.+?)\]/)){
ppImg = (RegExp.$1.replace(/ /g,''))
pImg = true;
td[t].innerHTML= td[t].innerHTML.replace(/\[YmP:(.+?)\]/,' ');
}
}
for(i=tr.length-1;i>0;i--){
if(tr.cells[0].innerHTML.match("View Profile") && tr.cells[0].className=="titlebg" && pImg){
with(tr.parentNode.insertRow(tr.parentNode.rows.length).insertCell(0)){
className = "catbg";
colSpan = "2";
appendChild(document.createTextNode(Title));
}
var proImg = new Image();
proImg.src = ppImg;
var row2 = tr.parentNode.insertRow(tr.parentNode.rows.length);
with(row2.insertCell(0)){
className = "windowbg2";
align = "center";
vAlign = "center";
width = "100%";
colSpan = "2";
appendChild(proImg);
}
break;
}
}
}
// -->
</script>
GLOBAL FOOTER
<script type="text/javascript">
<!--
/* Member's Picture Section - DregondRahl
GLOBAL FOOTER
support.proboards.com */
var td = document.getElementsByTagName("td");
if(!location.href.match(/viewprofile/)){
for(t=0; t<td.length; t++){
if(td[t].colSpan== '3' && td[t].innerHTML.match(/\[YmP:(.+?)\]/)){
td[t].innerHTML= td[t].innerHTML.replace(/\[YmP:(.+?)\]/,' ');
}
}
}
// -->
</script>
Enjoy
Also, it should be compatible with most any profile editable code
Note for When Removing this Code:
This code stores information in the "Signature" field of the users profile. If at some point you decide to remove this code or for whatever reason the code stops working then that information will remain visible in the signature until you or the user removes it. This information would look something like: [YmP:http://yourhost.com/picture.gif]
UPDATED Nov' 5th
Just edit this
var Title = "Member's Picture";
MAIN FOOTER
<script type="text/javascript">
<!--
/* Member's Picture Section - DregondRahl
Donot Repost this code or edit this copyright
support.proboards.com */
var Title = "Member's Picture";
//Do not Edit Below
var tr = document.getElementsByTagName("tr");
var td = document.getElementsByTagName("td");
if(document.modifyForm && document.modifyForm.signature){
Form = document.modifyForm;
AH = Form.avatarheight.parentNode.parentNode.parentNode;
MpTr = AH.parentNode.insertRow(1);
MpTr.insertCell(0).innerHTML = '<font size=2>Profile Image</font>';
MpTr.insertCell(1).innerHTML = '<input type="text" size="35" name="mpimg">';
MpTr.insertCell(2).innerHTML = '<font size=1>Enter the URL Of Profile Image</font>';
if(Form.signature.value.match(/\[YmP:(.+?)\]/))
Form.mpimg.value=RegExp. $1;
Form.signature.value = Form.signature.value.replace(/\[YmP:(.+?)\]/,'');
function doImg(){
if(!Form.mpimg.value == "" ){
ppImage = Form.mpimg.value;
Form.signature.value = '[YmP:'+ppImage+']' +Form.signature.value;
}
}
if(document.addEventListener){
Form.profileaction[0].addEventListener('click',doImg,false);
} else {
Form.profileaction[0].attachEvent('onclick',doImg);
}
}
if(location.href.match(/viewprofile/)){
pImg = false;
for(t=0; t<td.length; t++){
if(td[t].colSpan == '2' && td[t].innerHTML.match(/\[YmP:(.+?)\]/)){
ppImg = (RegExp.$1.replace(/ /g,''))
pImg = true;
td[t].innerHTML= td[t].innerHTML.replace(/\[YmP:(.+?)\]/,' ');
}
}
for(i=tr.length-1;i>0;i--){
if(tr.cells[0].innerHTML.match("View Profile") && tr.cells[0].className=="titlebg" && pImg){
with(tr.parentNode.insertRow(tr.parentNode.rows.length).insertCell(0)){
className = "catbg";
colSpan = "2";
appendChild(document.createTextNode(Title));
}
var proImg = new Image();
proImg.src = ppImg;
var row2 = tr.parentNode.insertRow(tr.parentNode.rows.length);
with(row2.insertCell(0)){
className = "windowbg2";
align = "center";
vAlign = "center";
width = "100%";
colSpan = "2";
appendChild(proImg);
}
break;
}
}
}
// -->
</script>
GLOBAL FOOTER
<script type="text/javascript">
<!--
/* Member's Picture Section - DregondRahl
GLOBAL FOOTER
support.proboards.com */
var td = document.getElementsByTagName("td");
if(!location.href.match(/viewprofile/)){
for(t=0; t<td.length; t++){
if(td[t].colSpan== '3' && td[t].innerHTML.match(/\[YmP:(.+?)\]/)){
td[t].innerHTML= td[t].innerHTML.replace(/\[YmP:(.+?)\]/,' ');
}
}
}
// -->
</script>
Enjoy
Also, it should be compatible with most any profile editable code
Note for When Removing this Code:
This code stores information in the "Signature" field of the users profile. If at some point you decide to remove this code or for whatever reason the code stops working then that information will remain visible in the signature until you or the user removes it. This information would look something like: [YmP:http://yourhost.com/picture.gif]
UPDATED Nov' 5th