Post by SubDevo on Jan 27, 2011 0:05:43 GMT -8
Replace HR with Image by SubDevo
Tested in IE, FF, Opera, Safari and Chrome.
This will replace the usual single line HR (horizontal rule) with an image, forum wide.
It will not replace any HRs that are put into a post by a member.
PREVIEW
Enjoy!!!
SubDevo
Variables:
var hrImage="i52.tinypic.com/qqbf5u.png"; // URL to image
Enter the URL to your image here. You may use the one in the code for testing (or just use it!).
For Best Results:
The width of the image used for the HR must be less (not sure how much less) than the width of the post (mini-profile NOT included). You will know if it is too wide, because the post will stretch. I just took a screenshot of a post and measured the width of the original HR as a starting point. Sorry, I can't give an exact answer on this...
Make sure you have about 5 to 10 pixels of transparency at the bottom of the image. If you don't do that, there will not be any space between the HR image and whatever is below it. Once again, trial and error...
Location: Global Footer
<script type="text/javascript">
/* Replace HR with Image by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var hrImage="http://i52.tinypic.com/qqbf5u.png"; // URL to image
var n=document.getElementsByTagName("hr"),a,b,x=-1;
while(n[++x]){ a=n[x];
if(a.width!="40%"){
b=document.createElement("div"); b.style.textAlign="center";
b.innerHTML="<img src='"+hrImage+"' border='0' alt='hr' />";
a.style.display="none"; a.parentNode.insertBefore(b,a);
}}
</script>
Tested in IE, FF, Opera, Safari and Chrome.
This will replace the usual single line HR (horizontal rule) with an image, forum wide.
It will not replace any HRs that are put into a post by a member.
PREVIEW
Enjoy!!!
SubDevo
Variables:
var hrImage="i52.tinypic.com/qqbf5u.png"; // URL to image
Enter the URL to your image here. You may use the one in the code for testing (or just use it!).
For Best Results:
The width of the image used for the HR must be less (not sure how much less) than the width of the post (mini-profile NOT included). You will know if it is too wide, because the post will stretch. I just took a screenshot of a post and measured the width of the original HR as a starting point. Sorry, I can't give an exact answer on this...
Make sure you have about 5 to 10 pixels of transparency at the bottom of the image. If you don't do that, there will not be any space between the HR image and whatever is below it. Once again, trial and error...
Location: Global Footer
<script type="text/javascript">
/* Replace HR with Image by SubDevo */
/* Global Footer - Please leave this header intact. Do not repost. */
/* interoceandesigns.com or lsdp.proboards.com */
var hrImage="http://i52.tinypic.com/qqbf5u.png"; // URL to image
var n=document.getElementsByTagName("hr"),a,b,x=-1;
while(n[++x]){ a=n[x];
if(a.width!="40%"){
b=document.createElement("div"); b.style.textAlign="center";
b.innerHTML="<img src='"+hrImage+"' border='0' alt='hr' />";
a.style.display="none"; a.parentNode.insertBefore(b,a);
}}
</script>