<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: BBCode for author description</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: BBCode for author description</description>
<language>en</language>
<pubDate>Tue, 24 Nov 2009 05:37:33 +0000</pubDate>

<item>
<title>NotAlame on "BBCode for author description"</title>
<link>http://wordpress.org/support/topic/255140#post-1190130</link>
<pubDate>Thu, 27 Aug 2009 17:05:34 +0000</pubDate>
<dc:creator>NotAlame</dc:creator>
<guid isPermaLink="false">1190130@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi!&#60;/p&#62;
&#60;p&#62;I want to know how to insert this function in the function file of a wordpress theme so that we can use it...&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>dilneiss88 on "BBCode for author description"</title>
<link>http://wordpress.org/support/topic/255140#post-1024921</link>
<pubDate>Tue, 24 Mar 2009 12:10:39 +0000</pubDate>
<dc:creator>dilneiss88</dc:creator>
<guid isPermaLink="false">1024921@http://wordpress.org/support/</guid>
<description>&#60;p&#62;i found an way..&#60;br /&#62;
but need to make this as a plugin.. anybody can help me to create a plugin for this?&#60;/p&#62;
&#60;p&#62;open: wp-includes/author-template.php&#60;br /&#62;
Replace&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function the_author_description() {
	echo get_the_author_description();
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;with&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function the_author_description() {
	echo bbcode(get_the_author_description());
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;save send back to server&#60;/p&#62;
&#60;p&#62;open: ur themefolder/author.php&#60;/p&#62;
&#60;p&#62;replace: &#60;code&#62;&#38;lt;?php echo $curauth-&#38;gt;user_description; ?&#38;gt;&#60;/code&#62;&#60;br /&#62;
with: &#60;code&#62;&#38;lt;?php echo bbcode($curauth-&#38;gt;user_description); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;open: wp-includes/functions.php&#60;br /&#62;
add in the last line before the ?&#38;gt;&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function bbcode($sText)
{
   $sTagArray[&#38;#39;B)&#38;#39;] = array(&#38;#39;tag&#38;#39;=&#38;gt;&#38;#39;XX&#38;#39;);
   $sTagArray[&#38;#39;o}o&#38;#39;] = array(&#38;#39;tag&#38;#39;=&#38;gt;&#38;#39;XX&#38;#39;);
   $sTagArray[&#38;#39;br&#38;#39;] = array(&#38;#39;tag&#38;#39;=&#38;gt;&#38;#39;&#38;lt;br /&#38;gt;&#38;#39;);
   $sTagArray[&#38;#39;hr&#38;#39;] = array(&#38;#39;tag&#38;#39;=&#38;gt;&#38;#39;&#38;lt;hr&#38;gt;&#38;#39;);

   $atagArray[&#38;#39;img&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;img src=&#38;quot;&#38;#39;,&#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot;&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;IMG&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;img src=&#38;quot;&#38;#39;,&#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot;&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;b&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;b&#38;gt;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;lt;/b&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;B&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;b&#38;gt;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;lt;/b&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;i&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;i&#38;gt;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;lt;/i&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;u&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;u&#38;gt;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;lt;/u&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;url&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;a href=&#38;quot;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot; target=&#38;quot;_blank&#38;quot;&#38;gt;\\1&#38;lt;/a&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;URL&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;a href=&#38;quot;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot; target=&#38;quot;_blank&#38;quot;&#38;gt;\\1&#38;lt;/a&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;email&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;a href=&#38;quot;mailto:&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot;&#38;gt;\\1&#38;lt;/a&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;url=(.*)&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;a href=&#38;quot;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot; target=&#38;quot;_blank&#38;quot;&#38;gt;\\2&#38;lt;/a&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;URL=(.*)&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;a href=&#38;quot;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot; target=&#38;quot;_blank&#38;quot;&#38;gt;\\2&#38;lt;/a&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;email=(.*)&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;a href=&#38;quot;mailto:&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot;&#38;gt;\\2&#38;lt;/a&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;color=(.*)&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;font color=&#38;quot;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot;&#38;gt;\\2&#38;lt;/font&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;size=(.*)&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;font size=&#38;quot;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot;&#38;gt;\\2&#38;lt;/font&#38;gt;&#38;#39;);
   $atagArray[&#38;#39;font=(.*)&#38;#39;] = array(&#38;#39;open&#38;#39;=&#38;gt;&#38;#39;&#38;lt;font face=&#38;quot;&#38;#39;, &#38;#39;close&#38;#39;=&#38;gt;&#38;#39;&#38;quot;&#38;gt;\\2&#38;lt;/font&#38;gt;&#38;#39;);

   foreach ($atagArray as $stagName =&#38;gt; $replace)
   {
       $tagEnd = preg_replace(&#38;quot;/\W/sUi&#38;quot;, &#38;quot;&#38;quot;, $stagName);

       $sText = preg_replace(
           &#38;quot;&#124;\[$stagName\](.*)\[/$tagEnd\]&#124;sUi&#38;quot;,
           &#38;quot;$replace[open]\\1$replace[close]&#38;quot;,
           $sText
       );
   }

   foreach ($sTagArray as $stagName =&#38;gt; $replace)
   {
       if (eregi(&#38;quot;[)(#$]&#38;quot;, $stagName))
       {
           $stagNameNew = preg_replace(&#38;quot;#([\)\(\$\#])#&#38;quot;, &#38;quot;\\ \\1&#38;quot;, $stagName);
           $stagNameNew = preg_replace(&#38;quot;#( +)#&#38;quot;, &#38;quot;&#38;quot;, $stagNameNew);
           $sTagArray[ $stagNameNew ] = array(&#38;#39;tag&#38;#39; =&#38;gt; $replace[&#38;#39;tag&#38;#39;]);
           unset($sTagArray[ $stagName ]);
       }
   }

   foreach ($sTagArray as $stagName =&#38;gt; $replace)
   {
       $sText= preg_replace(&#38;quot;&#124;\[$stagName\]&#124;sUi&#38;quot;, &#38;quot;$replace[tag]&#38;quot;, $sText);
   }

   return $sText;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;done :D&#60;/p&#62;
&#60;p&#62;now, need to improve this as a plugin..
&#60;/p&#62;</description>
</item>
<item>
<title>dilneiss88 on "BBCode for author description"</title>
<link>http://wordpress.org/support/topic/255140#post-1022883</link>
<pubDate>Sun, 22 Mar 2009 06:24:47 +0000</pubDate>
<dc:creator>dilneiss88</dc:creator>
<guid isPermaLink="false">1022883@http://wordpress.org/support/</guid>
<description>&#60;p&#62;hi&#60;/p&#62;
&#60;p&#62;i'd like to make the bbcode to author descriptions works, like [img][url] &#60;/p&#62;
&#60;p&#62;i will make the description works like a signature (like forums)&#60;/p&#62;
&#60;p&#62;i searched alot and did'nt found anything...
&#60;/p&#62;</description>
</item>

</channel>
</rss>
