inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 21, 2010 15:15:49 GMT -8
Do the first src change. Simple enough and using getElementsByTagName vs firstChild is an insignificant speed change if, given 133 boards, it is ran only 133 times. Not 133 boards, 133 TD tag elements. 133 boards means way more TD tags. Copypasta "javascript:alert(document.getElementsByTagName("td").length);void(0);" into the address box and that will give you the current number of TD tags on the board home.
|
|
inherit
16846
0
Nov 19, 2012 15:20:20 GMT -8
Chris
3,036
December 2003
cddude
|
Post by Chris on Nov 21, 2010 15:34:27 GMT -8
Do the first src change. Simple enough and using getElementsByTagName vs firstChild is an insignificant speed change if, given 133 boards, it is ran only 133 times. Not 133 boards, 133 TD tag elements. 133 boards means way more TD tags. Copypasta "javascript:alert(document.getElementsByTagName("td").length);void(0);" into the address box and that will give you the current number of TD tags on the board home. I'm well aware. You seemed to have been referring to the setter only however, which will only be called 133 times.
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 21, 2010 16:28:25 GMT -8
I'm well aware. You seemed to have been referring to the setter only however, which will only be called 133 times. Wait, alright, each time switchy is called without "break;", the boolean is checked 133 times and the on or off assignment only happens once, if I call switchy 19 times, 2,527 checks and 11* assignments. With "break;", 1,674 checks and 11* assignments. That's a difference of 853 checks that didn't need to happen. * I put the code in global footer because I wanted sub-boards to have a different icon. If I put in main footer and have no sub-board icons (11 calls and 11 assignments), without "break;" would be 1,463, with "break;" 610. Same difference of 853 checks that didn't need to happen.
|
|
inherit
16846
0
Nov 19, 2012 15:20:20 GMT -8
Chris
3,036
December 2003
cddude
|
Post by Chris on Nov 21, 2010 17:05:39 GMT -8
I think you're missing what I said. Again, the SETTER. As in, only in the case of *.src = "URL". I never argued against you for the fact a break should be used or the alt should be kept.
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 21, 2010 17:22:38 GMT -8
I'm well aware. You seemed to have been referring to the setter only however, which will only be called 133 times. I think you're missing what I said. Again, the SETTER. As in, only in the case of *.src = "URL". I never argued against you for the fact a break should be used or the alt should be kept. Um, the setter only gets called once, not 133 times, with or without "break;". If I'm still not getting you, I don't know how to understand.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Nov 21, 2010 17:31:12 GMT -8
OK.. The two additional suggestions have been added to the code.
Thanks Chris for getting in touch with Crazy_J
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Nov 21, 2010 21:00:51 GMT -8
I'm well aware. You seemed to have been referring to the setter only however, which will only be called 133 times. Wait, alright, each time switchy is called without "break;", the boolean is checked 133 times and the on or off assignment only happens once, if I call switchy 19 times, 2,527 checks and 11* assignments. With "break;", 1,674 checks and 11* assignments. That's a difference of 853 checks that didn't need to happen. * I put the code in global footer because I wanted sub-boards to have a different icon. If I put in main footer and have no sub-board icons (11 calls and 11 assignments), without "break;" would be 1,463, with "break;" 610. Same difference of 853 checks that didn't need to happen.Interesting discussion but if you're concerned about the number of iterations on each call to the function then caching which cells are the ones of interest on first call then on subsequent calls iterate over just the cached cells would give a much more dramatic loop count decrease than what you've proposed. With 19 board cells for example each subsequent call would loop 19 times(worst case) rather than 2527 or even 1674. I was however under the impression this thread was dedicated to identifying malfunctioning codes, not some kind of critique on proficiency. Nothing wrong with taking an existing code and tearing it apart to see how it works and perhaps even improved, that's the best way to learn, we all do it...
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 21, 2010 21:40:40 GMT -8
Interesting discussion but if you're concerned about the number of iterations on each call to the function then caching which cells are the ones of interest on first call then on subsequent calls iterate over just the cached cells would give a much more dramatic loop count decrease than what you've proposed. With 19 board cells for example each subsequent call would loop 19 times(worst case) rather than 2527 or even 1674. Interesting, how would you code it then? I'm interested. I was however under the impression this thread was dedicated to identifying malfunctioning codes, not some kind of critique on proficiency. Nothing wrong with taking an existing code and tearing it apart to see how it works and perhaps even improved, that's the best way to learn, we all do it... Well then again I never placed that restriction because this thread is "Code Database Updates" not "Code Database Updates For Only Malfunctioning Codes" or something. Yes first post said what was happening with some codes as ProBoards had changes made but never said anything about updating only the codes affected by the changes.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Nov 23, 2010 18:14:09 GMT -8
Interesting discussion but if you're concerned about the number of iterations on each call to the function then caching which cells are the ones of interest on first call then on subsequent calls iterate over just the cached cells would give a much more dramatic loop count decrease than what you've proposed. With 19 board cells for example each subsequent call would loop 19 times(worst case) rather than 2527 or even 1674. Interesting, how would you code it then? I'm interested. Interesting enough to try coding it yourself?
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 29, 2010 1:23:34 GMT -8
Interesting enough to try coding it yourself? I got nothing. That's why I'm asking you!
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Nov 29, 2010 5:00:19 GMT -8
Hmmm... I was just hoping you would take the next step in the maturation process by rolling up your sleeve and spitting out something spawned from your own blood, sweat and tears, something you can slap your name on and truly call your own. A code with an algorithm you yourself thought out step by step while sitting on the throne or taking a shower. Many never step up to that stage and feel content just scavenging the works of others.
One coder that recently impressed me is iPokemon, his style tag code is a thing of beauty and is quickly gaining a cult-like following. He was never afraid to roll up his sleeve and create something from scratch because even in failure he still learned how to not fail like that again, and that made the successes that much sweeter.
I could give you the code but how would that help improve your analytical reasoning. It is by going through the creation process that you exercise that critical skill. I'll just say it involves prototyping a static variable (avoid global) to have a static element collection available on subsequent invocations of the function.
There's a hidden link in the post where I first commented on this if you desire further clarity.
|
|
inherit
The Final Cylon
31521
0
Mar 3, 2015 14:39:33 GMT -8
Trublu
Maybe the duck is in the hat.
12,323
October 2004
trublusvufan
|
Post by Trublu on Dec 3, 2010 10:58:50 GMT -8
And this is the point in the thread where I ask that any more personal conversations be taken to PM, thanks.
|
|
tuck
inherit
-4268337
0
Nov 26, 2024 13:11:50 GMT -8
tuck
0
January 1970
GUEST
|
Post by tuck on Dec 5, 2010 21:44:16 GMT -8
Another Code that needs updating or removed?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Dec 6, 2010 11:42:56 GMT -8
[CB] Highlight Tags v2Highlight Tags v2 is outdated and has several flaws in execution. Below is a complete overhaul named Highlight Tags v3 that has several fixes including: - When you press , , or , the tag wouldn't parse in the Topic Summary table. That's been fixed.
- Pressing Preview will also make the tag parse.
- The way this code runs will parse in locations that default ProBoards UBBC tags do.
<script language="javascript"> //Highlight Tags v3 //By Code Dragon //Revised By wildgoosespeeder //Global Footer //No need to edit if(!location.href.match(/action=(headersfooters|boardmodify|categorymodify|settings|membergroupmodify|modifyprofile&user=|modifycalendarentry)/)) { var td = document.getElementsByTagName("td"); var x=td.length; while(--x) { if(!document.postForm && td[x].innerHTML.match(/\[highlight=(.+?)\](.+?)\[\/highlight\]/gi) || document.postForm && (td[x].width=="100%" && td[x].className.match(/windowbg2/) && td[x].innerHTML.match(/\[highlight=(.+?)\](.+?)\[\/highlight\]/gi) && td[x].parentNode.parentNode.parentNode.cellPadding=="4" || td[x].height=="100%" && td[x].width=="80%" && td[x].vAlign=="top" && td[x].align=="left" && td[x].className.match(/windowbg(2)?/) && td[x].innerHTML.match(/\[highlight=(.+?)\](.+?)\[\/highlight\]/gi))) { td[x].innerHTML = td[x].innerHTML.replace(/\[highlight=(.+?)\](.+?)\[\/highlight\]/gi, "<span style='background-color: $1'>$2</span>"); } } } </script> Code has been updated. Thank you.
|
|
inherit
124121
0
Nov 12, 2012 0:58:58 GMT -8
clares
WOOO beta!
345
May 2008
clares
|
Post by clares on Dec 12, 2010 5:05:10 GMT -8
Hi there,
the code which is to remove the IC from the guests is not working anymore:
<script type="text/javascript"> /* remove info center for guests by elindir do not redistribute */ var table = document.getElementsByTagName('table'); if(table[0].innerHTML.match(/Welcome Guest/) && table[0].className.match(/bordercolor/)){for (m=0;m<table.length;m++) { if (table[m].innerHTML.match(/Info Center/) && table[m].width.match(/100%/)){ table[m].style.display="none"; }}} </script>
|
|