victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Feb 23, 2010 2:46:02 GMT -8
You fixed the last one. This is the same problem. When an Advanced Moderation it does not work.
<script type='text/javascript'> /* Dual-Image Sticky Splitter by Scorpian [url]http://roddyinnovations.com[/url] */
/*=== Edit These ===*/ var headImg = ['yes','URL_OF_HEAD_IMAGE']; // [Turn on head image? 'yes or 'no', url of the head image] var baseImg = ['yes','URL_OF_BASE_IMAGE']; // [Turn on base image? 'yes or 'no', url of the base image] var gHeight = '20'; // Distance between tables
var cNames = ['Important Topics','Normal Topics']; // Names of the tables
/*=== No Touchy! ===*/ var riTable = document.getElementsByTagName('table'); var hImg = document.createElement('img'); var bImg = document.createElement('img'); hImg.src = headImg[1]; bImg.src = baseImg[1]; var gDiv = document.createElement('div'); gDiv.style.height = gHeight + 'px'; var theMainTable = document.createElement('table'); with(theMainTable){ cellSpacing = 1; cellPadding = 4; border = 0; align = 'center' width = '100%'; className = 'bordercolor'; appendChild(document.createElement('tbody')); } if(location.href.match(/board=/i) && !location.href.match(/action=/i)){ for(a=0; a<riTable.length; a++){ if(riTable[a].rows[0].cells[0].className == 'titlebg' && riTable[a].rows[1] && riTable[a].rows[1].cells[0].className == 'catbg'){ if(riTable[a].rows[0].cells[0].colSpan == 8){ break; } var stickies = false; var anyTopics = false; riTable[a-1].style.backgroundColor = 'transparent'; var newCellA = riTable[a-1].insertRow(-1).insertCell(0); var newCellB = riTable[a-1].insertRow(-1).insertCell(0); if(headImg[0] == 'yes'){ newCellA.appendChild(hImg.cloneNode(true)); } newCellA.appendChild(theMainTable.cloneNode(true)); if(baseImg[0] == 'yes'){ newCellA.appendChild(bImg.cloneNode(true)); } newCellA.appendChild(gDiv.cloneNode(true)); if(headImg[0] == 'yes'){ newCellB.appendChild(hImg.cloneNode(true)); } newCellB.appendChild(theMainTable.cloneNode(true)); if(baseImg[0] == 'yes'){ newCellB.appendChild(bImg.cloneNode(true)); } var tbodA = newCellA.getElementsByTagName('table')[0].firstChild; var tbodB = newCellB.getElementsByTagName('table')[0].firstChild; tbodA.appendChild(riTable[a].rows[1].cloneNode(true)); tbodB.appendChild(riTable[a].rows[1].cloneNode(true)); tbodA.parentNode.rows[0].cells[2].firstChild.firstChild.innerHTML = cNames[0]; tbodB.parentNode.rows[0].cells[2].firstChild.firstChild.innerHTML = cNames[1]; for(b=0; b<riTable[a].rows.length; b++){ if(riTable[a].rows[b].cells[0] && riTable[a].rows[b].cells[0].className == 'windowbg2' && riTable[a].rows[b].cells[1] && riTable[a].rows[b].cells[1].className == 'windowbg2'){ if(riTable[a].rows[b].cells[0].innerHTML.match(/sticky/i) && riTable[a].rows[b].cells[2] && !riTable[a].rows[b].cells[2].innerHTML.match(/Announcement:/i)){ var word = '<font size="2">Sticky:</font> '; var isStick = true; var stickies = true; }else if(riTable[a].rows[b].cells[2].innerHTML.match(/Announcement:/i)){ var word = ''; var isStick = true; var stickies = true; }else{ var word = ''; var isStick = false; var anyTopics = true; } riTable[a].rows[b].cells[2].innerHTML = word + riTable[a].rows[b].cells[2].innerHTML; if(isStick){ tbodA.appendChild(riTable[a].rows[b].cloneNode(true)); }else{ tbodB.appendChild(riTable[a].rows[b].cloneNode(true)); } riTable[a].rows[b].style.display = 'none'; } } tbodA.appendChild(riTable[a].rows[0].cloneNode(true)); tbodB.appendChild(riTable[a].rows[0].cloneNode(true)); riTable[a-1].rows[0].style.display = 'none'; if(stickies || anyTopics){ newCellA.style.display = (stickies) ? '' : 'none'; newCellB.style.display = (anyTopics) ? '' : 'none'; }else{ newCellA.style.display = 'none'; var nCell = tbodB.parentNode.insertRow(1).insertCell(0); nCell.className = 'windowbg'; nCell.align = 'center'; nCell.colSpan = 7; nCell.style.fontStyle = 'italic'; nCell.style.fontSize = '12px'; nCell.appendChild(document.createTextNode('There are no topics in this board.')); } break; } } } </script>
|
|
|
Post by Wormopolis on Mar 1, 2010 23:24:43 GMT -8
I dont know if this can be done.. the author actually wrote a line into it preventing it from working in moderation mode on purpose...
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Mar 2, 2010 7:42:42 GMT -8
I dont know if this can be done.. the author actually wrote a line into it preventing it from working in moderation mode on purpose... OK. Thanks Wormopolis for looking!
|
|
|
Post by Wormopolis on Mar 3, 2010 20:33:37 GMT -8
all the edits I tried doing to it went ALL sorts of wrong when I ran it in moderation mode. its the structure of how he scans through lookign for where to divide.
if I can figure something out I will put an edit in this thread, but things are looking grim right now.
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Mar 4, 2010 0:52:18 GMT -8
all the edits I tried doing to it went ALL sorts of wrong when I ran it in moderation mode. its the structure of how he scans through lookign for where to divide. if I can figure something out I will put an edit in this thread, but things are looking grim right now. The 1st one you fixed for me, I would have loved to keep it but the head/base images for the stickies were hanging in IE. Even though they would show, everything would be merged and Photobucket took a long time to finish download these 2 images, also I would sometime have to refresh to get it to display properly. Then I would get an Index error display after they download in IE. Since I use Firefox, it was no problem for me but I don't know how many members and visitors browse with IE so I had to remove it (works on all browsers but IE). Gosh, I really hate IE and don't know why every other browser behaves differently then it when Microsoft been in the game so long! I might get you to revisit the 1st one to see why it does that later on since this one seems a little more complicated. I'll definitely check this thread occasionally, just in case there's a new development. Thanks again!
|
|
|
Post by Wormopolis on Mar 4, 2010 1:52:02 GMT -8
oddly.. I kinda alternate between both.
would th eimages load badly by themselves in IE?
|
|
victory1
Full Member
Posts: 102
victory1 said 0 great things
|
Post by victory1 on Mar 4, 2010 3:12:31 GMT -8
oddly.. I kinda alternate between both. would the images load badly by themselves in IE? No, it has to be the script. All of my images are coming from the same file in Photobucket, in fact some are even in the same folder as the sticky images and they don't hang and I don't get an error. I forgot to add that I'm using the same sticky images in the above script and it does not hang nor do I need to refresh to get it to display properly in IE.
|
|