jackattack
Not New Member
Posts: 4
jackattack said 0 great things
|
Post by jackattack on Oct 9, 2010 9:17:10 GMT -8
Hi,
This is actually a quite simple request most likely, but it stumps me. I need the username/display name to appear as "Bold", instead of normal, on both my board mod and the thread mod. Note in the thread mod, it was already bolded on one of the cell be a friend who is too busy to help anymore. All codes do have permission by original coder to be modified.
Board Mod:
<script type="text/javascript"> <!--
/*Board Modification - By Alex - Open Source*/ // mod by Wormo for sub-board inclusion (must be in global footer now)
var jackattack_Request = {
Category_Gradient: "http://wimg.co.uk/6x1.png", //Category gradient
Category_Left_Image: "http://wimg.co.uk/6x1.png", //Image for left category gradient
Board_Top_Left: "http://imgur.com/S0doq.png", //Image for top left board
Board_Bottom_Left: "http://imgur.com/tWKm1.png", //Image for bottom left board
Board_Top_Right: "http://imgur.com/H9t5C.png", //Image for top right board
Board_Bottom_Right: "http://imgur.com/ellq8.png", //Image for bottom right board
Category_Expand: "http://imgur.com/2JB7Y.png", //Image for expand
Category_Collapse: "http://imgur.com/EIXMF.png", //Image for collapse
Category_Split_Height: "30px", //Category splitter height
Board_Split_Height: "5px", //Board splitter height
Category_Text: "16px", //Category text size
Text_Size: "12px", //Font size
Board_Text_Size: "14px", //Board title text size
Location_Check: function(){
if(pb_action.match(/(home|boardindex)/)){
this.Board_Mod();
}
},
Board_Mod: function(){
var Td = document.getElementsByTagName('td');
var i = Td.length-1;
do{
if (pb_action=='boardindex' && Td[i].className=='titlebg' && Td[i].colSpan==2 && Td[i].innerHTML.match(/Sub-Boards/)) { Td[i].colSpan=5; Td[i].className='catbg'; var brdname=location.href.match(/board=(.*?)($|&)/) ? RegExp.$1 : 'ignore'; Td[i].innerHTML+='<a name="'+brdname+'subs">'; } if(Td.item(i).className=="catbg" && Td.item(i).colSpan=="5" && Td.item(i).align!="right"){
var Parent = Td.item(i).parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode;
Parent.style.display = 'none';
var Category_font = Td.item(i).getElementsByTagName('font').item(0);
Category_font.style.fontFamily = 'Arial';
Category_font.style.fontSize = this.Category_Text;
var Category_name = Td.item(i).getElementsByTagName('a').item(0).name;
var Category_div = document.createElement('div');
var Collapse_Or_Expand = (document.cookie.match(Category_name+'=Collapsed'))? this.Category_Expand : this.Category_Collapse;
Category_Hold = '<table width="100%" cellspacing="0" cellpadding="0" border="0" style="background-image: url('+this.Category_Gradient+')"><tr><td width="12px" height="25px"><img src="'+this.Category_Left_Image+'" /></td><td height="25px" valign="top">'+Td.item(i).innerHTML+'</td><td align="right"><a href="javascript: void(0)" onclick="jackattack_Request.Collapse_Categories(this)" id="Collapse_Link"><img src="'+Collapse_Or_Expand+'" border="0" /></a></td></tr>';
Category_div.innerHTML = Category_Hold;
var Board_div = document.createElement('div');
Board_Hold = '';
while(Td.item(i).parentNode.nextSibling && Td.item(i).parentNode.nextSibling.firstChild.className!="catbg"){
var Board_Grab = Td.item(i).parentNode.nextSibling;
Board_Grab.cells[1].firstChild.firstChild.style.fontSize = this.Board_Text_Size;
Board_Grab.cells[1].firstChild.firstChild.style.textDecoration = 'underline';
for(var Board_Font=Board_Grab.cells[1].getElementsByTagName('font'), z=1;z<Board_Font.length;z++){
Board_Font[z].style.fontSize = this.Text_Size;
}
Board_Grab.cells[1].width='50%';
Board_Grab.cells[1].rowSpan = '2';
var Mouse_Over = document.createElement('div');
Mouse_Over.appendChild(Board_Grab.cells[1].cloneNode(true));
Board_Hold+='<div style="height: '+this.Board_Split_Height+'"></div><table border="0" cellpadding="0" cellspacing="1" bgcolor="C4C4C4" width="100%"><tr><td><table border="0" cellpadding="0" cellspacing="1" bgcolor="FAF9FA" width="100%"><tr><td><table cellspacing="0" cellpadding="4" width="100%" border="0"><tr><td class="windowbg" align="left" valign="top" width="4px"><img src="'+this.Board_Top_Left+'" style="position: relative; bottom: 6px; right: 6px;" /></td><td rowspan="2" class="windowbg" valign="middle" width="5%" align="center"><span style="position: relative; right: 4px;">'+Board_Grab.cells[0].innerHTML+'</span></td>'+Mouse_Over.innerHTML+'<td class="windowbg" width="20%" valign="middle" rowspan="2" align="center"><font style="font-size: '+this.Text_Size+';">'+Board_Grab.cells[2].firstChild.innerHTML+' Topics - '+Board_Grab.cells[3].firstChild.innerHTML+' Posts</font></td><td class="windowbg2" width="25%" valign="middle" rowspan="2"><font style="font-size: '+this.Text_Size+';">'+((Board_Grab.cells[4].firstChild.innerHTML.match(/^(on\s)?(.+?)<br\s?\/?>/i))? RegExp.$2 : '')+((Board_Grab.cells[4].firstChild.innerHTML.match(/^(.+?)<br\s?\/?>(.+?)<br\s?\/?>/i))? ' '+RegExp.$2 : '')+((Board_Grab.cells[4].firstChild.innerHTML.match(/^(.+?)<br\s?\/?>(.+?)<br\s?\/?>(.+?)$/i))? '<br>'+RegExp.$3 : 'No Posts')+'</font></td><td class="windowbg2" valign="top" align="right" width="4px"><img src="'+this.Board_Top_Right+'" style="position: relative; left: 6px; bottom: 6px;" /></td></tr><tr><td class="windowbg" align="left" valign="bottom" width="4px"><img src="'+this.Board_Bottom_Left+'" style="position: relative; top: 6px; right: 6px;" /></td><td class="windowbg2" align="right" valign="bottom" width="4px"><img src="'+this.Board_Bottom_Right+'" style="position: relative; top: 6px; left: 6px;" /></td></tr></table></td></tr></table></td></tr></table>';
Td.item(i).parentNode.parentNode.removeChild(Td.item(i).parentNode.nextSibling);
}
Board_div.innerHTML = Board_Hold;
Parent.parentNode.insertBefore(Board_div, Parent.nextSibling);
Parent.parentNode.insertBefore(Category_div, Parent.nextSibling);
if(Td[i].parentNode.previousSibling && Td.item(i).parentNode.previousSibling.rowIndex!="0"){
var Category_Splitter = document.createElement('div');
Category_Splitter.style.height = this.Category_Split_Height;
Parent.parentNode.insertBefore(Category_Splitter, Parent.nextSibling);
}
(document.cookie.match(Category_name+'=Collapsed'))? this.Collapse_Categories(document.getElementById('Collapse_Link')) : '';
}
i--;
}
while(i>5);
},
Collapse_Categories: function(Expand_Collapse){
var Parent = Expand_Collapse.parentNode.parentNode.parentNode.parentNode.parentNode;
(Parent.nextSibling.style.display=="none")? document.cookie=Expand_Collapse.parentNode.parentNode.cells[1].firstChild.name+'=Collapsed;expires=Sat, 20 Jan 1990 12:12:12 UTC; path=/;' : document.cookie=Expand_Collapse.parentNode.parentNode.cells[1].firstChild.name+'=Collapsed;expires=Sat, 20 Jan 2050 12:12:12 UTC; path=/;';
(Parent.nextSibling.style.display=="none")? Expand_Collapse.firstChild.src=this.Category_Collapse : Expand_Collapse.firstChild.src=this.Category_Expand;
(Parent.nextSibling.style.display=="none")? Parent.nextSibling.style.display='' : Parent.nextSibling.style.display='none';
}
}; jackattack_Request.Location_Check();
//--> </script>
Thread Mod:
<script type="text/javascript"> /* AdverCity Thread List Remodel Coding by JD, concept by iiPod Do not rip, use, reclaim etc. */
var Thread_Top_Left = "http://imgur.com/S0doq.png"; var Thread_Bottom_Left = "http://imgur.com/tWKm1.png"; var Thread_Top_Right = "http://imgur.com/H9t5C.png"; var Thread_Bottom_Right = "http://imgur.com/ellq8.png";
if(pb_action.match(/boardindex/i)){ function remodelThread(){ for(b = 0; b < dtD.length; b++){ if(dtD[b].width == "5%" && dtD[b+1].width == "5%" && dtD[b].innerHTML.match(/img/i)){ var threadIcon = dtD[b].innerHTML; var threadName = dtD[b+2].innerHTML; threadName = threadName.replace(/(<b>|<\/b>)/i, ""); //threadName = threadName.replace(/"2"/i, "1"); var threadStart = dtD[b+3].innerHTML; threadStart = threadStart.replace(/<font size="1">/i, "<span style='font-size: 12px'><b>"); threadStart = threadStart.replace(/<\/font>/i, "</b></span>"); var threadRep = dtD[b+4].innerHTML; threadRep = threadRep.replace(/<font size="2">/i, "<span style='font-size: 12px'>"); threadRep = threadRep.replace(/<\/font>/i, "</span>"); var threadView = dtD[b+5].innerHTML; var threadStat = dtD[b+6].innerHTML; threadStat = threadStat.replace(/<font size="1">/i, "<span style='font-size: 12px'>"); threadStat = threadStat.replace(/<\/font>/i, "</span>"); dtD[b+1].style.display = dtD[b+2].style.display = dtD[b+3].style.display = dtD[b+4].style.display = dtD[b+5].style.display = dtD[b+6].style.display = "none" dtD[b].colSpan = "7"; dtD[b].width = "100%"; dtD[b].parentNode.parentNode.parentNode.bgcolor = "#e9e9e9"; dtD[b].parentNode.parentNode.parentNode.cellSpacing = "0"; dtD[b].innerHTML = '<table width = "100%" border = "0" cellspacing = "0" cellpadding = "0" style = "border: 1px solid #c4c4c4"><tr><td width = "4px" vAlign = "top" height = "30"><img src = "'+Thread_Top_Left+'" style = "position: relative; bottom: 1px; right: 1px;" /></td><td bgcolor = "ededed" width = "5%" rowspan = "2" align = "center" style = "border-top: 1px solid #faf9fa; border-bottom: 1px solid #faf9fa">'+threadIcon+'</td><td width = "58%" rowspan = "2" style = "border-top: 1px solid #faf9fa; border-bottom: 1px solid #faf9fa; background: #e6e6e6; padding-left: 4px;"><strong>'+threadName+'</strong></td><td bgcolor = "ededed" width = "17%" align = "center" rowspan = "2" style = "border-top: 1px solid #faf9fa; border-bottom: 1px solid #faf9fa; padding-left: 4px; font-size: 12px;">This topic was started by<br /> '+threadStart+' and has '+threadRep+' posts</td><td rowspan = "2" style = "border-top: 1px solid #faf9fa; border-bottom: 1px solid #faf9fa; background: #e6e6e6; padding-left: 4px;">'+threadStat+'</td><td width = "4px" vAlign = "top"><img src = "'+Thread_Top_Right+'" style = "position: relative; bottom: 1px; left: 1px;" /></td></tr><tr><td width = "4px" vAlign = "bottom"><img src = "'+Thread_Bottom_Left+'" style = "position: relative; top: 1px; right: 1px;" /></td><td width = "4px" vAlign = "bottom"><img src = "'+Thread_Bottom_Right+'" style = "position: relative; top: 1px; left: 1px;" /></td></tr></table>'; }else if(dtD[b].width == "5%" && dtD[b+1].innerHTML.match(/Subject/i)){ dtD[b].parentNode.style.display = "none"; }else if(dtD[b].innerHTML.match(/\[Search\sThis\sBoard\]/i) && dtD[b].className == "titlebg"){ var threadButtons = dtD[b].innerHTML; dtD[b].parentNode.style.display = "none"; } } } remodelThread(); } </script>
Thanks in advanced!
|
|
|
Post by Wormopolis on Oct 9, 2010 11:48:42 GMT -8
these running somewhere I can see what they look like without having to install them on a test board?
|
|
jackattack
Not New Member
Posts: 4
jackattack said 0 great things
|
Post by jackattack on Oct 9, 2010 13:07:07 GMT -8
|
|
|
Post by Wormopolis on Oct 9, 2010 18:23:42 GMT -8
after this line: var Board_Grab = Td.item(i).parentNode.nextSibling; put this: for (ulnks=Board_Grab.getElementsByTagName('a'), ul=0; ul<ulnks.length; ul++) { if (ulnks
|
|
jackattack
Not New Member
Posts: 4
jackattack said 0 great things
|
Post by jackattack on Oct 9, 2010 21:29:18 GMT -8
Works awesome. Can you please hand me what to do in the thread remodel as well?
|
|
|
Post by Wormopolis on Oct 9, 2010 23:32:33 GMT -8
oh... I thought you said someone already did it... change var threadRep = dtD[b+4].innerHTML; to var threadRep = dtD[b+4].innerHTML; for (ulnks=threadRep.getElementsByTagName('a'), ul=0; ul<ulnks.length; ul++) { if (ulnks
|
|
jackattack
Not New Member
Posts: 4
jackattack said 0 great things
|
Post by jackattack on Oct 10, 2010 5:02:41 GMT -8
Not exactly - He only did one of the two columns. If you click on the board, you will see what I mean.
BTW, code didn't work when I added this.
|
|
|
Post by Wormopolis on Oct 10, 2010 11:22:25 GMT -8
I dont see any changes to the code.
|
|
|
Post by Wormopolis on Oct 10, 2010 20:43:58 GMT -8
that should be threadStat and threadStart ... not threadRep
|
|