Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sephiroth's Spoilers - Change Image to Text
#1
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:

$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='&lt;img title=&quot;[+]&quot; alt=&quot;[+]&quot; src=&quot;images/collapse_collapsed.png&quot; class=&quot;expand&quot; /&gt;$1';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='&lt;img title=&quot;[-]&quot; alt=&quot;[-]&quot; src=&quot;images/collapse.png&quot; class=&quot;expand&quot; /&gt;$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='&lt;img title=&quot;[+]&quot; alt=&quot;[+]&quot; src=&quot;images/collapse_collapsed.png&quot; class=&quot;expand&quot; /&gt;Spoiler';}else {parentNode.parentNode.getElementsByTagName('div')[1].style.display='block';this.innerHTML='&lt;img title=&quot;[-]&quot; alt=&quot;[-]&quot; src=&quot;images/collapse.png&quot; class=&quot;expand&quot; /&gt;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. Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)