|
Post by Mordecai on Jun 6, 2005 18:30:20 GMT -8
On the main page, there's this little arrow: Can I have that code that does that? Or is it only for Hatake Forums?
|
|
|
Post by CD on Jun 6, 2005 21:44:02 GMT -8
|
|
|
Post by Mordecai on Jun 7, 2005 3:13:39 GMT -8
Sorry I didn't see it! Thanks! Can you modify the code so that the arrow brings to the last post made on that board instead of the last poster's profile? <script> // Add Image to Right of Last Post by CDDude229 // Original Concept by Naruto, Coded with Permission // May not be redistributed outside of Hatake Forum // This header must remain intact at all times
// URL to Image var IMGURL= "http://www.yourhost.ext/path/to/file/file_name.ext"
// No editing below here. var aTD= document.getElementsByTagName("TD"); var aA= document.getElementsByTagName("A");
for(x=0;x<aTD.length;x++){ if(aTD[x].width=="24%" && aTD[x].vAlign=="middle" && aTD[x].className=="windowbg2" && aTD[x].innerHTML.match(/action=viewprofile/i)){
if(navigator.appName.match(/Microsoft/i)) { var LPS1= aTD[x].innerHTML.split("<B"+"R>"); } else { var LPS1= aTD[x].innerHTML.split("<b"+"r>"); } var PRLI= aTD[x].getElementsByTagName("A")[0].href
aTD[x].innerHTML="<table border='0' cellpadding='0' cellspacing='0' width='100%' align='center'><tr><td valign='middle' align='left' nowrap>"+LPS1[0]+" <br> "+LPS1[1]+"</td><td valign='middle' align='center'><a href='"+PRLI+"' target='_top'><img src='"+IMGURL+"' border='0'></a></td></tr></table>"; }} </script>
|
|
|
Post by CD on Jun 7, 2005 10:38:51 GMT -8
Did you see if it worked first? That was a previous request, so its ok that you didn't see it. <script> // Add Image to Right of Last Post by CDDude229 // Original Concept by Naruto, Coded with Permission // May not be redistributed outside of Hatake Forum // This header must remain intact at all times
// URL to Image var IMGURL= "http://www.yourhost.ext/path/to/file/file_name.ext"
// No editing below here. var aTD= document.getElementsByTagName("TD"); var aA= document.getElementsByTagName("A");
for(x=0;x<aTD.length;x++){ if(aTD[x].width=="24%" && aTD[x].vAlign=="middle" && aTD[x].className=="windowbg2" && aTD[x].innerHTML.match(/action=viewprofile/i)){
if(navigator.appName.match(/Microsoft/i)) { var LPS1= aTD[x].innerHTML.split("<B"+"R>"); } else { var LPS1= aTD[x].innerHTML.split("<b"+"r>"); } var PRLI= aTD[x].getElementsByTagName("A")[1].href
aTD[x].innerHTML="<table border='0' cellpadding='0' cellspacing='0' width='100%' align='center'><tr><td valign='middle' align='left' nowrap>"+LPS1[0]+" <br> "+LPS1[1]+"</td><td valign='middle' align='center'><a href='"+PRLI+"' target='_top'><img src='"+IMGURL+"' border='0'></a></td></tr></table>"; }} </script>
That should be it. Try it now.
|
|
|
Post by Mordecai on Jun 7, 2005 20:30:33 GMT -8
Did you see if it worked first? That was a previous request, so its ok that you didn't see it. <script> // Add Image to Right of Last Post by CDDude229 // Original Concept by Naruto, Coded with Permission // May not be redistributed outside of Hatake Forum // This header must remain intact at all times
// URL to Image var IMGURL= "http://www.yourhost.ext/path/to/file/file_name.ext"
// No editing below here. var aTD= document.getElementsByTagName("TD"); var aA= document.getElementsByTagName("A");
for(x=0;x<aTD.length;x++){ if(aTD[x].width=="24%" && aTD[x].vAlign=="middle" && aTD[x].className=="windowbg2" && aTD[x].innerHTML.match(/action=viewprofile/i)){
if(navigator.appName.match(/Microsoft/i)) { var LPS1= aTD[x].innerHTML.split("<B"+"R>"); } else { var LPS1= aTD[x].innerHTML.split("<b"+"r>"); } var PRLI= aTD[x].getElementsByTagName("A")[1].href
aTD[x].innerHTML="<table border='0' cellpadding='0' cellspacing='0' width='100%' align='center'><tr><td valign='middle' align='left' nowrap>"+LPS1[0]+" <br> "+LPS1[1]+"</td><td valign='middle' align='center'><a href='"+PRLI+"' target='_top'><img src='"+IMGURL+"' border='0'></a></td></tr></table>"; }} </script>
That should be it. Try it now. I get this error: 'aTD[...].getElementsByTagName(...).1.href' is null or not an object.
|
|
|
Post by CD on Jun 7, 2005 22:07:57 GMT -8
Its cause they added a bunch of info. Let me recode it. Edit: Its because that board has no posts in it. Also, here's a shorter version I coded trying to fix it. <script> // Add Image to Right of Last Post by CDDude229 // Original Concept by Naruto, Coded with Permission // May not be redistributed outside of Hatake Forum // This header must remain intact at all times
// URL to Image var IMGURL= "http://www.wontgetlost.com/dgf_lastpost.gif"
// No editing below here. var aTD = document.getElementsByTagName("TD");
for(x=0;x<aTD.length;x++){ if(aTD[x].width=="24%" && aTD[x].vAlign=="top" && aTD[x].className=="windowbg2" && aTD[x].innerHTML.match(/on/i)){
var PRLI= aTD[x].getElementsByTagName("A")[1].href;
aTD[x].innerHTML="<table border='0' cellpadding='0' cellspacing='0' width='100%' align='center'><tr><td valign='middle' align='left'>"+aTD[x].innerHTML+"</td><td valign='middle' align='center'><a href='"+PRLI+"' target='_top'><img src='"+IMGURL+"' border='0'></a></td></tr></table>"; }} </script>
Last Edit: Jun 7, 2005 22:13:46 GMT -8 by CD
|
|
|
Post by Mordecai on Jun 8, 2005 20:24:00 GMT -8
Its cause they added a bunch of info. Let me recode it. Edit: Its because that board has no posts in it. Also, here's a shorter version I coded trying to fix it. <script> // Add Image to Right of Last Post by CDDude229 // Original Concept by Naruto, Coded with Permission // May not be redistributed outside of Hatake Forum // This header must remain intact at all times
// URL to Image var IMGURL= "http://www.wontgetlost.com/dgf_lastpost.gif"
// No editing below here. var aTD = document.getElementsByTagName("TD");
for(x=0;x<aTD.length;x++){ if(aTD[x].width=="24%" && aTD[x].vAlign=="top" && aTD[x].className=="windowbg2" && aTD[x].innerHTML.match(/on/i)){
var PRLI= aTD[x].getElementsByTagName("A")[1].href;
aTD[x].innerHTML="<table border='0' cellpadding='0' cellspacing='0' width='100%' align='center'><tr><td valign='middle' align='left'>"+aTD[x].innerHTML+"</td><td valign='middle' align='center'><a href='"+PRLI+"' target='_top'><img src='"+IMGURL+"' border='0'></a></td></tr></table>"; }} </script> Nope... Still doesn't work for me... The arrow isn't even showing up now... I'm using it on a SuddenLaunch board, by the way...
|
|
|
Post by CD on Jun 8, 2005 21:22:26 GMT -8
Sudden launch? GAH! #@$^@$#& @$%&* @$%@$ %^@#$%^ @$% &@$ &* <.< >.> ><;; It is helpful to tell people these things. Use the second code I posted. It should work fine. If not, link?
|
|
|
Post by Mordecai on Jun 8, 2005 21:48:38 GMT -8
The only one that worked fine was this one:
<script> // Add Image to Right of Last Post by CDDude229 // Original Concept by Naruto, Coded with Permission // May not be redistributed outside of Hatake Forum // This header must remain intact at all times
// URL to Image var IMGURL= "http://www.yourhost.ext/path/to/file/file_name.ext"
// No editing below here. var aTD= document.getElementsByTagName("TD"); var aA= document.getElementsByTagName("A");
for(x=0;x<aTD.length;x++){ if(aTD[x].width=="24%" && aTD[x].vAlign=="middle" && aTD[x].className=="windowbg2" && aTD[x].innerHTML.match(/action=viewprofile/i)){
if(navigator.appName.match(/Microsoft/i)) { var LPS1= aTD[x].innerHTML.split("<B"+"R>"); } else { var LPS1= aTD[x].innerHTML.split("<b"+"r>"); } var PRLI= aTD[x].getElementsByTagName("A")[0].href
aTD[x].innerHTML="<table border='0' cellpadding='0' cellspacing='0' width='100%' align='center'><tr><td valign='middle' align='left' nowrap>"+LPS1[0]+" <br> "+LPS1[1]+"</td><td valign='middle' align='center'><a href='"+PRLI+"' target='_top'><img src='"+IMGURL+"' border='0'></a></td></tr></table>"; }} </script> But the arrow redirected to the last poster's profile instead of the last post made.
|
|
|
Post by CD on Jun 8, 2005 22:03:56 GMT -8
See, SL uses PBv3 coding, and without being able to access part of the script (Which no one can, except SL staff), I can't make that link. I'm sorry, but that's the best possible wtih PBv4 forum software.
|
|