<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
		>
	<channel>
		<title>bbPress Plugin Browser &#187; Topic: Spoiler Tags</title>
		<link>http://bbpress.org/plugins/topic/spoiler-bar/</link>
		<description>bbPress Plugin Browser &#187; Topic: Spoiler Tags</description>
		<language>en-US</language>
		<pubDate>Fri, 10 Feb 2012 02:54:02 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.1</generator>
				<atom:link href="http://bbpress.org/plugins/rss/topic/spoiler-bar" rel="self" type="application/rss+xml" />

		<item>
			<title>PS Vita on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-6493</link>
			<pubDate>Mon, 02 May 2011 16:22:20 +0000</pubDate>
			<dc:creator>PS Vita</dc:creator>
			<guid isPermaLink="false">6493@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Thanks
</p>]]></description>
					</item>
		<item>
			<title>Ipstenu on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2161</link>
			<pubDate>Mon, 03 Nov 2008 14:11:10 +0000</pubDate>
			<dc:creator>Ipstenu</dc:creator>
			<guid isPermaLink="false">2161@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Yeah I did it the long, slow way.  In my head, bad pseudo-html is still bad form ;) Who knows, maybe the W3C will pick up spoiler tags one day!
</p>]]></description>
					</item>
		<item>
			<title>_ck_ on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2159</link>
			<pubDate>Sun, 02 Nov 2008 11:18:54 +0000</pubDate>
			<dc:creator>_ck_</dc:creator>
			<guid isPermaLink="false">2159@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>It's not bad HTML because neither tag can appear in the final HTML of the page that's presented to the browser. It's pseudo markup.</p>
<p>If you want to do it the long, slow way you can just add more rules to your str_replace.</p>
<p>I may have gotten the regex wrong for the bbcode. It's tricky to know which characters to escape and trying to do them as a character sequence may not work. may be easier to do it like  <code>(\&#60;&#124;\[)</code> and change the backreference.<br />
ie.<br />
<pre><code>$content=preg_replace(&#34;@(\&#60;&#124;\[)spoiler(\&#62;&#124;\])(.*)(\&#60;&#124;\[)\/spoiler(\&#62;&#124;\])@simU&#34;,&#34;&#60;span class=&#39;spoiler&#39;&#62;\\3&#60;/span&#62;&#34; , $content);</code></pre>]]></description>
					</item>
		<item>
			<title>Ipstenu on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2152</link>
			<pubDate>Fri, 31 Oct 2008 19:25:27 +0000</pubDate>
			<dc:creator>Ipstenu</dc:creator>
			<guid isPermaLink="false">2152@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>No, I got the point, just not the code (that is the code I got is wrong).  It's basically not parsing the [spoiler] as a valid tag.</p>
<p>And now that I look at it, if I use <code>[\&#60;\[]</code> that leaves the door open for some silly person to do this and have it work:<br />
<code>&#60;spoiler&#62;neener![/spoiler]</code></p>
<p>While that's kinda okay, it's also kinda not (bad HTML among other things).  The preg_replace solution has the same problem, while it's certainly simpler.
</p>]]></description>
					</item>
		<item>
			<title>_ck_ on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2151</link>
			<pubDate>Fri, 31 Oct 2008 15:43:34 +0000</pubDate>
			<dc:creator>_ck_</dc:creator>
			<guid isPermaLink="false">2151@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>No I think you missed my point.<br />
You can make it respond to the bbcode itself and replace the bbcode with the proper html.</p>
<p>this is wrong:<br />
<code>&#60;span class=&#34;spoiler&#34;&#62;[spoiler]Test?[/spoiler]&#60;/span&#62;</code></p>
<p>should just be:<br />
<code>&#60;span class=&#34;spoiler&#34;&#62;Test?&#60;/span&#62;</code></p>
<p>Actually, the entire way your plugin works is overly complex.</p>
<p>You could do the whole thing with one preg_replace.</p>
<pre><code>$content=preg_replace(&#34;&#124;(\&#60;\[]spoiler[\&#62;\]])(.*)([\&#60;\[]\/spoiler[\&#62;\]])&#124;simU&#34;,&#34;&#60;span class=&#39;spoiler&#39;&#62;\\2&#60;/span&#62;&#34; , $content);</code></pre>
<p>(untested)
</p>]]></description>
					</item>
		<item>
			<title>Ipstenu on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2150</link>
			<pubDate>Fri, 31 Oct 2008 14:24:05 +0000</pubDate>
			<dc:creator>Ipstenu</dc:creator>
			<guid isPermaLink="false">2150@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Okay, I've made a .3 for someone with bbcode to test.  When I run <code>[spoiler]Test?[/spoiler]</code> it gives me <code>&#60;span class=&#34;spoiler&#34;&#62;[spoiler]Test?[/spoiler]&#60;/span&#62;</code> so ... er in theory?</p>
<p>The trunk is available for testing: <a href="http://plugins-svn.bbpress.org/spoiler-bar/trunk/spoiler-tags.php" rel="nofollow">http://plugins-svn.bbpress.org/spoiler-bar/trunk/spoiler-tags.php</a></p>
<p>If someone who uses BBcode would be so kind :)
</p>]]></description>
					</item>
		<item>
			<title>Ipstenu on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2149</link>
			<pubDate>Fri, 31 Oct 2008 13:24:39 +0000</pubDate>
			<dc:creator>Ipstenu</dc:creator>
			<guid isPermaLink="false">2149@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Wouldn't I also have to change this bit?</p>
<pre><code>function bb_spoiler( $matches )
{
        $text = $matches[0];
        $text = str_replace(&#34;&#60;spoiler&#62;&#34;, &#34;&#34;, $text);
        $text = str_replace(&#34;&#60;/spoiler&#62;&#34;, &#34;&#34;, $text);
        return &#34;&#60;span class=\&#34;spoiler\&#34;&#62;$text&#60;/span&#62;&#34;;
}</code></pre>
<p>And naturally I'm not using BBcode so I can't easily test that myself. I suppose I could uglify it and make separate bbcode functions but I'll go play with regex cause that would be better ;)
</p>]]></description>
					</item>
		<item>
			<title>_ck_ on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2148</link>
			<pubDate>Fri, 31 Oct 2008 13:17:41 +0000</pubDate>
			<dc:creator>_ck_</dc:creator>
			<guid isPermaLink="false">2148@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>The easiest way to change it for bbcode is to change the regex pattern to look for either character, ie.  <code>[\&#60;\[]spoiler[\&#62;\]](.*)[\&#60;\[]\/spoiler[\&#62;\]]</code><br />
(untested)
</p>]]></description>
					</item>
		<item>
			<title>Ipstenu on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2147</link>
			<pubDate>Fri, 31 Oct 2008 13:06:34 +0000</pubDate>
			<dc:creator>Ipstenu</dc:creator>
			<guid isPermaLink="false">2147@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>_ck_, sure! I haven't even looked at the BBCode since I've 'trained' my blog commenters on how to use HTML ;) I figured keeping it the same would be better for their non-techie heads.
</p>]]></description>
					</item>
		<item>
			<title>_ck_ on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2146</link>
			<pubDate>Fri, 31 Oct 2008 06:58:56 +0000</pubDate>
			<dc:creator>_ck_</dc:creator>
			<guid isPermaLink="false">2146@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>With a slight change in your regex you can also support bbcode too. Let me know if you need help with the pattern.
</p>]]></description>
					</item>
		<item>
			<title>Ipstenu on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2143</link>
			<pubDate>Thu, 30 Oct 2008 20:50:58 +0000</pubDate>
			<dc:creator>Ipstenu</dc:creator>
			<guid isPermaLink="false">2143@http://bbpress.org/plugins/</guid>
			<description><![CDATA[<p>Please excuse the spazola here, I've never used SVN on my Windows box and, naturally, goofed it up badly.  The .2 trunk has the correct documentation. No code is different between the two versions.
</p>]]></description>
					</item>
		<item>
			<title>Ipstenu on "Spoiler Tags"</title>
			<link>http://bbpress.org/plugins/topic/spoiler-bar/#post-2142</link>
			<pubDate>Thu, 30 Oct 2008 16:54:25 +0000</pubDate>
			<dc:creator>Ipstenu</dc:creator>
			<guid isPermaLink="false">2142@http://bbpress.org/plugins/</guid>
			<description><![CDATA[Allow users to include &#60;spoiler&#62;&#60;/spoiler&#62; tags in their posts.]]></description>
					</item>

	</channel>
</rss>

