|
Post by Wormopolis on Jan 10, 2011 20:56:42 GMT -8
Browser Tested: IE, FF, and Chrome placement: board footer of your affiliate board
Uses a basic posting template system that embeds the banner image and displays it as an icon next to the site name that is clickable and takes people to the site itself.
code:
<script type="text/javascript"> <!-- // affiliate request system v1.0 // by Wormopolis - www.wormocodes.com // shoutout to Todge // keep header intact - do not repost
// put into affiliate board footer
var thumbnailCaption="Click to check this site out!";
if (pb_action=='boardindex') { for (tds=document.getElementsByTagName('td'), ac=0; ac<tds.length; ac++) { if (tds[ac].width.match(/4(3|8)%/) && tds[ac].className.match(/windowbg/) && tds[ac].title && tds[ac].title.match(/\*!\*(.*?)\s(.*?)\*!\*/)) { var affSrc=RegExp.$1; var affUrl=RegExp.$2; tds[ac].title=''; var affClick=document.createElement('a'); affClick.title=thumbnailCaption; affClick.onclick="javascript: pb_bubble=0;"; affClick.href=affUrl; affClick.target='_blank'; var affImg=document.createElement('img'); affImg.width='88'; affImg.height='31'; affImg.border='0'; affImg.src=affSrc; affImg.style.verticalAlign='middle'; affImg.style.marginLeft='20px'; clltmp=tds[ac].getElementsByTagName('a')[0].parentNode; affClick.appendChild(affImg); clltmp.appendChild(affClick); } } } if (pb_action.match(/display|search2/)) { for (tds=document.getElementsByTagName('td'), ac=0; ac<tds.length; ac++) { if (tds[ac].width.match(/80%/) && tds[ac].className.match(/windowbg/) && tds[ac].vAlign=='top' && tds[ac].innerHTML.match(/\*!\*(.*?)\s(.*?)\*!\*/)) { var affSrc=RegExp.$1; var affUrl=RegExp.$2; tds[ac].innerHTML=tds[ac].innerHTML.replace(/\*!\*(.*?)\s(.*?)\*!\*/,''); var postArea= tds[ac].getElementsByTagName('table')[0].rows[1].cells[0].getElementsByTagName('font')[0]; postArea.innerHTML="<b>Board URL: </b><a href='"+ affUrl+ "' target='_blank'>"+ affUrl+ "</a><br><b>Banner Url: </b>"+ affSrc+ "<br><br>"+ postArea.innerHTML; } } } if (pb_action.match(/post/)) { var mmsg=document.postForm.message; var colorField=document.postForm.color.parentNode.parentNode.parentNode; var subField=document.postForm.subject.parentNode.parentNode;
subField.firstChild.firstChild.innerHTML="Affiliate Name:"; mmsg.parentNode.parentNode.parentNode.firstChild.firstChild.innerHTML="Description/Other info:";
var nwAffUrlField=colorField.cloneNode(true); var nwAffBannerField=colorField.cloneNode(true);
nwAffUrlField.firstChild.firstChild.innerHTML="Enter Affiliate Site URL:"; nwAffUrlField.firstChild.nextSibling.firstChild.innerHTML="<input name='affurl' maxLength='80' size='40'>";
nwAffBannerField.firstChild.firstChild.innerHTML="Enter Affiliate Site Banner URL:"; nwAffBannerField.firstChild.nextSibling.firstChild.innerHTML="<input name='affbanurl' maxLength='80' size='40'>";
subField.parentNode.insertBefore(nwAffUrlField, subField.nextSibling); subField.parentNode.insertBefore(nwAffBannerField, subField.nextSibling);
if (mmsg.value.match(/\*!\*(.*?)\s(.*?)\*!\*/)) { affSrc=RegExp.$1; affUrl=RegExp.$2; document.postForm.affurl.value=affUrl; document.postForm.affbanurl.value=affSrc; mmsg.value=mmsg.value.replace(/\*!\*(.*?)\s(.*?)\*!\*/,''); }
function insertAffStuff() { if (document.postForm.affbanurl.value!='' && document.postForm.affurl.value!='') { document.postForm.message.value= "*!*"+ document.postForm.affbanurl.value+ " "+ document.postForm.affurl.value+ "*!*"+ document.postForm.message.value; } }
if (document.postForm.addEventListener) { document.postForm.addEventListener('submit',insertAffStuff,true); } else { document.postForm.attachEvent('onsubmit',insertAffStuff); } }
// --> </script>
using it in affiliate request section
|
|
|
Post by randie on Jan 10, 2011 21:33:45 GMT -8
You share everything don't you. Nice!
|
|
|
Post by Wormopolis on Jan 10, 2011 22:09:29 GMT -8
its not as if people come here to bask in the glory of the stuff I DONT share...
|
|