Post by Todge on May 25, 2009 4:15:03 GMT -8
This will add an extra field in the posting page to allow you to add extra information that will appear at the base of the post..
Goes in the Global Footer.
Edit this line near the top of the code with the title you want given to the extra info area..
Goes in the Global Footer.
<script type="text/javascript">
<!--
/*
Extra field in posting page to give optional info at bottom of post..
by Todge
Copyright © 2009
Please keep this header intact
*/
if(document.postForm)
{
// Edit Below...
var inputName = 'Additional Info:';
// Edit Above...
var iName = document.createElement('font');
with (iName) { size='2'; innerHTML=inputName; }
var inTD = document.createElement('td');
inTD.appendChild(iName);
with (inTD) { className='windowbg'; width='30%'; }
var newInfo = document.createElement('input');
with (newInfo) { name='newInfo'; size='70'; maxLength='70'; type='text'; }
var niTD = document.createElement('td');
with (niTD) { className='windowbg'; width='70%'; vAlign='middle'; }
niTD.appendChild(newInfo);
var newTR = document.createElement('tr');
newTR.appendChild(inTD);
newTR.appendChild(niTD);
var putHere = document.postForm.counter.parentNode.parentNode.nextSibling;
putHere.parentNode.insertBefore(newTR,putHere);
document.postForm.onsubmit = function(){if(newInfo.value != ''){ document.postForm.message.value += '[data]'+newInfo.value;} }
if(location.href.match(/action=modifypost/) && document.postForm.message.value.match(/\[data\]/))
{
newInfo.value = document.postForm.message.value.split(/\[data\]/)[1];
document.postForm.message.value = document.postForm.message.value.split(/\[data\]/)[0];
}
if(location.href.match(/quote=/) && document.postForm.message.value.match(/\[data\]/))
{
document.postForm.message.value = document.postForm.message.value.replace(/\[data\](.)+\[\//,'[/');
}}
if(location.href.match('action=display') || document.title.match(/- (Search Results|Preview)/))
{
var posts = document.getElementsByTagName('font');
for(p=0; p<posts.length; p++)
{
if(posts[p].innerHTML.match(/google_ad_section_start/) && posts[p].innerHTML.match(/\[data\]/))
{
var data = document.createElement('div');
data.innerHTML = '<font size="2"><br><br>'+posts[p].innerHTML.split(/\[data\]/)[1]+'<br><br></font>';
posts[p].innerHTML = posts[p].innerHTML.split(/\[data\]/)[0];
var p1 = 1;
while(!posts[p+p1].innerHTML.match(/Back to Top/))
{
p1++
}
p1--
posts[p+p1].parentNode.nextSibling.vAlign = 'bottom';
posts[p+p1].parentNode.insertBefore(data,posts[p+p1].parentNode.firstChild);
}}}
// -->
</script>
Edit this line near the top of the code with the title you want given to the extra info area..
var inputName = 'Additional Info:';