2019-05-16, 09:45 PM
Hi!
I'm using Sephiroth's Spoiler plugin on my board, and I was wondering if there was a way to change the image it uses for the expand/collapse to pure text. The reason I want to do this is because the image has to be globally used across all themes, and there isn't a single image I can use that would work on multiple themes, so I figured it would be easier to just change the image to text such as [+] / [-] or [Expand] / [Collapse] because it wouldn't be as restrictive.
I did try editing the php file myself, but I don't really know anything about php to tell exactly how to replace the parts I need to replace. All I think I know is that this is the line I need to make changes to:
Thank you to anyone who takes time out of their day to read this and offer assistance to me.
I'm using Sephiroth's Spoiler plugin on my board, and I was wondering if there was a way to change the image it uses for the expand/collapse to pure text. The reason I want to do this is because the image has to be globally used across all themes, and there isn't a single image I can use that would work on multiple themes, so I figured it would be easier to just change the image to text such as [+] / [-] or [Expand] / [Collapse] because it wouldn't be as restrictive.
I did try editing the php file myself, but I don't really know anything about php to tell exactly how to replace the parts I need to replace. All I think I know is that this is the line I need to make changes to:
$replace = array("<div class=\"spoiler_wrap\"><div class=\"spoiler_header\"><a href=\"javascript:void(0);\" onclick=\"javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='<img title="[+]" alt="[+]" src="images/collapse_collapsed.png" class="expand" />$1';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='<img title="[-]" alt="[-]" src="images/collapse.png" class="expand" />$1';}\"><img title=\"[+]\" alt=\"[+]\" src=\"images/collapse_collapsed.png\" style=\"float: right; margin-top: 2px; cursor: pointer;\" />$1</a></div><div class=\"spoiler_body\" style=\"display: none;\">$2</div></div>", "<div class=\"spoiler_wrap\"><div class=\"spoiler_header\"><a href=\"javascript:void(0);\" onclick=\"javascript:if(parentNode.parentNode.getElementsByTagName('div')[1].style.display=='block'){parentNode.parentNode.getElementsByTagName('div')[1].style.display='none';this.innerHTML='<img title="[+]" alt="[+]" src="images/collapse_collapsed.png" class="expand" />Spoiler';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='<img title="[-]" alt="[-]" src="images/collapse.png" class="expand" />Spoiler';}\"><img title=\"[+]\" alt=\"[+]\" src=\"images/collapse_collapsed.png\" style=\"float: right; margin-top: 2px; cursor: pointer;\" />Spoiler</a></div><div class=\"spoiler_body\" style=\"display: none;\">$1</div></div>");
Thank you to anyone who takes time out of their day to read this and offer assistance to me.