Post by oracleargon on Jul 18, 2013 10:38:38 GMT -8
I've not been able to find any codes to make UBBC work in personal text. e-e It vex's me. I just want to put a little image that says 'Staff' but it's giving me guff. If anyone has any ideas, I'd love to hear them.
However, I did find this code for making UBBC work in topic titles. It does not however, work. v.v It is three years old so I'm not sure if proboards has since done and update that threw it all off. I haven't updated to proboards v.5 yet. I'm holding out till december because I'm stubborn and don't yet want to learn how to use all the new stuff.
This is teh code for topic title UBBC;
(It reportedly goes in Global Footers)
If anyone could help me out, there's a pretty good chance I'd love you forever. o-o
However, I did find this code for making UBBC work in topic titles. It does not however, work. v.v It is three years old so I'm not sure if proboards has since done and update that threw it all off. I haven't updated to proboards v.5 yet. I'm holding out till december because I'm stubborn and don't yet want to learn how to use all the new stuff.
This is teh code for topic title UBBC;
(It reportedly goes in Global Footers)
<script type="text/javascript">
<!--
/*
Thread Title Images
by Todge
Copyright © 2010
Please keep this header intact
*/
var pih = '50px';
// Add option in posting page to title thread with an image..
if(document.postForm
&& (!location.href.match(/&thread=/) ||
document.postForm.message.value.match(/\[url=title\]/)))
{
var subJ = document.postForm.subject.parentNode.parentNode;
var titleIMG = document.createElement('tr');
var td1 = document.createElement('td');
var td2 = document.createElement('td');
with(td1){
innerHTML = '<font size="2">Title Image:</font>';
className = 'windowbg2';}
with(td2){
innerHTML = '<input type="text" tabindex="1" maxlength="100" size="40" name="titleimg">';
innerHTML +='<font size="1"> If you\'d like to use an image as the title, add the full URL here.</font>';
className = 'windowbg2';}
with(titleIMG){appendChild(td1); appendChild(td2);}
subJ.parentNode.insertBefore(titleIMG,subJ.nextSibling);
if(document.postForm.message.value.match(/\[url=title\]/))
{
document.postForm.titleimg.value = document.postForm.message.value.split('[/url]')[0].split('title]')[1];
document.postForm.message.value = document.postForm.message.value.replace(/^\[url=title\]http:\/\/(\w+\.?\/?-?)+\[\/url\] /,'');
}
function titleImage()
{
if(document.postForm.titleimg.value.match(/^http:\/\/(\w+\.?\/?-?)+\.(png|jpg|jpeg|gif)$/))
{
var url = '[url=title]'+document.postForm.titleimg.value+'[/url] ';
document.postForm.message.value = url+document.postForm.message.value;
}
return;
}
if(window.addEventListener)
{
document.postForm.addEventListener('submit', titleImage, false);
}
else if(window.attachEvent)
{
document.postForm.attachEvent('onsubmit', titleImage);
}
else
{
document.modifyForm.onsubmit = titleImage();
}}
// Add image to thread title and remove image from post..
if(pb_action == 'display')
{
var titleimg = document.getElementsByTagName('a');
for(t=0; t<titleimg.length; t++)
{
if(titleimg[t].href.match(/http:\/\/title/))
{
titleimg[t].style.display = 'none';
titleimg = titleimg[t].innerHTML;
break;
}}}
if(pb_action == 'boardindex')
{
var td = document.getElementsByTagName('td');
for(t=0; t<td.length; t++)
{
if(td[t].className.match(/windowbg/)
&& td[t].title &&
td[t].title.match(/^http:\/\/(\w+\.?\/?-?)+\.(png|jpg|jpeg|gif)/))
{
var titleimg = td[t].title.split(' ')[0];
td[t].title = td[t].title.replace(titleimg,'');
var threadTitle = td[t].getElementsByTagName('b')[0].firstChild;
titleimg
= '<img src="'+titleimg+'" title="'+threadTitle.innerHTML+'"
alt="'+threadTitle.innerHTML+'" height="'+pih+'" border="0">';
threadTitle.innerHTML = titleimg;
}}}
// -->
</script>
If anyone could help me out, there's a pretty good chance I'd love you forever. o-o