Post by LaOutcast on Apr 17, 2013 13:16:40 GMT -8
A little help here please. I found out that you can make awesome Text Tables that make replies more personal to you character. I found a code...but it doesn't seem to be working. here is the code preview:
thTEXTY YAYA. TEXT, TEXT I LOVE TEXT!
background-color:#65663
I tweaked the code I found here: darkenedglory.proboards.com/index.cgi?board=art&action=display&thread=35&page=1
and here is the original code:
[center][/div][div][table][tr][td][img]picture goes here![/img][/div][div][size=1][/div][div][th][font=georgia]TEXTY YAYA. TEXT, TEXT I LOVE TEXT![/div][div][/font][/div][div][/size][/div][div][atrb=border,0,true][/div][div][atrb=width,400,true][/div][div][bg=teal][/div][div][/td][/tr][/table][/div][div][/center]
The problem is--I've looked all over for a code that make the middle section unite with the top and bottom with a background color. Maybe I'm not using the right colors or the right code. But so far, I've looked everywhere and gotten no help.
Here's the code I found that I used that allows you to use text tables.
<style>
.nospaces br { display: none; }
</style>
<script type="text/javascript">
/********
Style UBBC Tags v2.1.2
Coded by iPokemon
Special thanks to Eton Bones and Wormopolis
Eton: For helping with optimization
Wormopolis: For being an awesome guy and letting me bounce ideas off of him
Do not repost or claim as your own
*********/
/***** Edit Below Here *****/
var protectedClasses = [".class1","#id",".class3:hover"]; //user-defined protected classes
var showQuickReply = true; //show quick reply buttons; true = yes, false = no
var customClass = "windowbg2"; //post form or modify form
var customClass2 = "windowbg"; //quick reply area
var predictive = true; //true = convert old style tags when posting or modifying, false = leave old tags alone but make them work
/***** Edit Above Here *****/
var pbClasses = /^(\.windowbg|\.windowbg2|\.titlebg|\.catbg|\.cattext|\.titletext|\.nav|\.hr|\.bordercolor|\.quote|\.code|\.menubg|\.newstitlebg|\.forumjump|\.pagedropmenu)/;
function inArray(v,a){
for(w=0;w<a.length;w++){ if(a[w] == v) return true; } return false;
}
function curlyBrackets(){
var text = document.getElementsByName("message")[0].value;
text = text.replace(/\{div\}/g,"
").replace(/\{\/div\}/g,"
").replace(/\{nospaces\}/g,"[nospaces]").replace(/\{\/nospaces\}/g,"[/nospaces]").replace(/\{div\s(.+?)\}/g,"");
document.getElementsByName("message")[0].value=text;
}
function post_converter(){
var text = document.getElementsByName("message")[0].value;
text = text
.replace(/newclass=\.\./gi,"newclass=")
.replace(/newclass=\./gi,"newclass=")
.replace(/\
/gi,"
")
.replace(/\[\/classy\]/gi,"
") .replace(/&{1}#0*91;/g,"[")
.replace(/&{1}#0*93;/g,"]")
.replace(/\
/gi,"
")
.replace(/\[\/style\]/gi,"
") .replace(/\[newclass=.(.+?)\]/gi,"[newclass=.$1]")
.replace(/&{1}quot;/g,'"');
document.getElementsByName("message")[0].value = text;
}
function board_converter(text){
text = text
.replace(/\
Am I missing another code? Or is the one I want to use completely wrong?
I've looked all over the proboards support and found some people with the same problem, but I haven't been able to make much sense of it.
Could someone help please?
/gi,"
")
.replace(/\[\/classy\]/gi,"
") .replace(/\
/gi,"
")
.replace(/\[\/style\]/gi,"
") .replace(/\[newclass=.(.+?)\]/gi,"[newclass=.$1]");
return text;
}
if(document.postForm || document.modifyForm){
if(predictive) post_converter();
var sub = document.getElementsByName("message")[0].parentNode.parentNode.parentNode.nextSibling;
var clo = sub.cloneNode(true);
clo.id = "style-tags-tr";
clo.firstChild.className = customClass;
clo.firstChild.id = "style-tags";
clo.firstChild.firstChild.innerHTML = "Style Tags:";
clo.firstChild.nextSibling.innerHTML = "<input type='button' onclick='post_converter();' value='Converter' /> <input type='button' onclick='curlyBrackets();' value='Style Checker' /> <input type='button' onclick='document.getElementsByName(\"message\")[0].value+=\"[newclass=.class][/newclass]\";' value='Add Class' /> <input type='button' onclick='document.getElementsByName(\"message\")[0].value+=\"\";' value='Add Div' />";
clo.firstChild.nextSibling.className = customClass;
clo.firstChild.nextSibling.id = "style-tags-2";
sub.parentNode.insertBefore(clo, sub.previousSibling);
}
if(showQuickReply){
if(pb_action == "display"){
if(document.getElementsByName("message")[0]){
var tr = document.getElementsByName("message")[0].parentNode.parentNode.parentNode.parentNode.parentNode.insertRow(1);
tr.id = "style-tags-tr";
var tm = tr.insertCell(0);
tm.id = "style-tags";
tm.innerHTML = "<font size='2'>Style Tags:</font> <input type='button' onclick='post_converter();' value='Converter' /> <input type='button' onclick='curlyBrackets();' value='Style Checker' /> <input type='button' onclick='document.getElementsByName(\"message\")[0].value+=\"[newclass=.class][/newclass]\";' value='Add Class' /> <input type='button' onclick='document.getElementsByName(\"message\")[0].value+=\"\";' value='Add Div' />";
tm.className=customClass2;
}
}
}
if(pb_action.match(/(calendar|pm|pre)view|viewprofile|search2|display/i)){
var userDefined = "";
var alreadyUsed = [];
var checkMatch = /\[div /i;
var newClass = /\[newclass=/i;
var nospace = /\[nospaces\]/i;
var newClassR = /\[newclass=.(.+?)\](.+?)\[\/newclass\](\<br\>)?/gi;
var td = document.getElementsByTagName("td");
var table = document.getElementsByTagName('table');
for(x=5;x<table.length;x++){
if(table[x].className == "code" && table[x].innerHTML.match(/(\[div|\[newclass|\[nospaces)/i)){
table[x].innerHTML = table[x].innerHTML
.replace(/\
/g,"{div $1}")
.replace(/\[\/div\]/g,"{/div}")
.replace(/\[newclass=.(.+?)\](.+?)\[\/newclass\]/gi,"{newclass=$1}$2{/newclass}")
.replace(/\[nospaces\]/gi,"{nospaces}")
.replace(/\[\/nospaces\]/gi,"{/nospaces}");
}
}
for(x=0;x<td.length;x++){
var tdhtml = td[x].innerHTML;
if(td[x].width == "80%" && tdhtml.match(/(\[style=|\[classy=)/i)){
tdhtml = board_converter(tdhtml);
}
if(td[x].width == "80%" && tdhtml.match(nospace)){
tdhtml = tdhtml.replace(nospace,"<span class='nospaces'>").replace(/\[\/nospaces\]/ig,"</span>");
}
if(td[x].width == "80%" && tdhtml.match(newClass)){
var result = newClassR.exec(tdhtml);
while(result != null){
if(!RegExp.$1.match(pbClasses) && !inArray(RegExp.$1,protectedClasses)){
if(!userDefined.match(RegExp.$1)){
userDefined += RegExp.$1+",";
tdhtml = tdhtml.replace(newClassR, "<style type=\"text/css\"> $1 {$2} </style>");
} else {
tdhtml = tdhtml.replace(newClassR, "");
alreadyUsed.push(RegExp.$1);
}
}
result = newClassR.exec(tdhtml);
}
}
if(td[x].width == "80%" && tdhtml.match(checkMatch)){
var tags = tdhtml.split("[div ");
for(l=1;l<tags.length;l++){
var ok = false;
var attributes = tags[l].split("]")[0].split(" ");
for(q=0;q<attributes.length;q++){
if(attributes[q].split("=")[0] == "style"){
var val = attributes[q].split("=")[1].substr(1,attributes[q].split("=")[1].length-2);
if(!val.match("expression") && !val.match("'")){
ok = true;
}
} else if(attributes[q].split("=")[0].match(/^(id|class|rel|title|style)$/)){
ok = true;
}
}
var content = tags[l].split("]")[1].split("[")[0];
if(ok){
var toReplace = "[div ";
var att = "";
var attributes = tags[l].split("]")[0].split(" ");
for(q=0;q<attributes.length;q++){
toReplace += attributes[q]+" ";
att += attributes[q]+" ";
}
att = att.substr(0, att.length - 1);
toReplace = toReplace.substr(0, toReplace.length - 1);
toReplace = toReplace + "]";
tdhtml = tdhtml.replace(toReplace,"<div "+att+">").replace("
","</div>"); }
}
}
if(tdhtml != td[x].innerHTML) td[x].innerHTML = tdhtml;
}
}
</script>
I placed it in the global footer because that's where it told me to place it.
Am I missing another code? Or is the one I want to use completely wrong?
I've looked all over the proboards support and found some people with the same problem, but I haven't been able to make much sense of it.
Could someone help please?