Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.
« Upgraded to WordPress 1.2
Rephlux and PHP memory usage with a PEAR surpise »

WordPress BBCode Plugin

May 26th, 2004

I made a download page for my WordPress BBCode Plugin. Please post any bug reports or comments on the plugin as comments or trackbacks to this post.

Filed Under

  • Open Source, PHP

Related Posts

  • A WordPress bug fix
  • Upgraded to WordPress 1.2
  • Upgraded to WordPress 1.5
  • WordPress Search Engine Spam
  • The Problem with Markup Languages
You can leave a response, or trackback from your own site.

25 Responses to “WordPress BBCode Plugin”

  1. Harry Fuecks says:
    5/27/2004 at 12:27 am

    Word of warning on HTML_BBCodeParser – it’s possible to inject Javascript into links – I’ve mailed the author once but no reaction (will raise it as a PEAR bug shortly). Put an example of the problem here (see the last comment). Note to self – something I should fix in WACT as well!

  2. Jeff Moore says:
    5/27/2004 at 12:41 am

    I am routing the html output of HTML_BBCodeParser through the WordPress HTML sanitizer. (which has its own source forge project). It should take care of any wayward JavaScript.

  3. Mark says:
    8/2/2004 at 3:48 pm

    You mentioned that you have to add [code]$output = convert_chars($output);[/code] to [code]wp-includes/template-functions-post.php file at line 143[/code]. Why not just use this: [code]$output += convert_chars($output);[/code] or if that will not work this: [code]$output .= convert_chars($output);[/code]? I would assume that would work and would not require editing core files.

  4. foo says:
    9/4/2004 at 6:46 am

    images aren’t shown in the comments. how can i solve this problem?

  5. flakaddict says:
    10/2/2004 at 4:20 pm

    How can I edit the wp-comments, wp-comments-popup, and wp-comments-reply files to state that my journal now supports BBCode? I made an HTML page with all of the BBCode tags from your site, I’d like to link to that if possible. Sorry, I know nothing about coding in PHP…

    If you could drop me an email, that would be great…

    Thanks for the awesome plugin…will definitely make my jump to WordPress that much easier.

  6. Steve says:
    10/17/2004 at 8:37 pm

    I added a block of code to enable bbcode [code] blocks. In the current version the [code] block just converts to <code>. No fun. I added a few lines you bbcodes.php where it is parsing the [code] block. Right now the extended filter does not do anything I added the following:

    function _preparse()
    {
    // Declare the format for [code] layout
    $CodeLayout = "'

    Code:
    ' . str_replace('\"','"',htmlspecialchars('\1',ENT_QUOTES)) . '

    '";
    // Check for [code] text
    $this->_preparsed = preg_replace("/\[code\](.+?)\[\/code\]/ies","$CodeLayout", $this->_text);
    }

  7. Steve says:
    10/17/2004 at 9:15 pm

    Boy my previous post was butchered. I was trying to post bit of a fix for [ code ] blocks but I did not have much sucess… kind of speaks to my problem. Either way you can see the details here http://www.smrussell.net/blog/wp-trackback.php/35

  8. Brian says:
    12/16/2004 at 7:25 pm

    Is the patch to template-functions.php still needed in 1.2.2? It looks like it would still apply the same.

    Brian

  9. Jeff Moore’s Blog » Blog Archive » Upgraded to WordPress 1.5 says:
    2/19/2005 at 1:39 am

    [...] error prone than the upgrade from 1.02 to 1.2. The upgrade process is very well done. My BBCode plugin seems to work without modification (so far). The new feat [...]

  10. Lance says:
    2/23/2005 at 3:35 am

    hey man how what code do i input so that it will show up in my comments, reply. etc? Need help thanks!!

  11. About:Blank says:
    9/4/2005 at 9:59 am

    Hi, I would just like to say thank you for this plugin but to make a suggestion: Can you please make the URL tags open in a new window? This is standard BBCode. I’m having a bit of trouble understanding your code since it’s quite complex. Thanks a BUNCH.

  12. Professional PHP » Blog Archive » A WordPress bug fix says:
    9/27/2005 at 9:34 pm

    [...] I upgraded WordPress to 1.5.2 this weekend. This version fixed some bugs that made it necessary to edit WordPress itself in order to get my BBCode plugin to work. That editing is one reason I put off upgrading for so long. I am grateful that my plugin can now exist on its own. (I’ll release a new version in a few days.) [...]

  13. Fox says:
    11/15/2005 at 2:16 pm

    Yo!

    Found a bug. I installed this plugin in WordPress 1.5.2 and can’t insert the missing line, so I don’t know if it’s because of that or not.

    But if I insert a link, like http://www.blah.de (just for testing), then it shows me something like this: http://mypage.de/folder/news/www.blah.de

    Only if I add the http:// tag it works. But what if I want to leave that out so that the plugin recognises the link by itself? Also the code target=new doesn’t work.

    Also I’m pretty curious when the new version will be released.

  14. docdic says:
    11/30/2005 at 4:22 am

    Hi, thanks for the great plugin.
    One question: is there a possibility to make that BBCode works only with the post-comment window and not with the other ones, like the one you use to post a post/page?

    Thanks for your assistance.

  15. Jeff says:
    12/3/2005 at 10:07 am

    The new version should account for all of the comments that people have made on this page. The new version is quite a bit more difficult to write than the current version. Partly because I am writing it from scratch instead of incorporating an external library, and it has to meet my standards. Partly because it needs to support a mix of both BBCode and HTML at the same time. No pre-existing library can do that without a variety of obscure bugs. I am fixing all sorts of obscure problems. I hope to finish the new version before 2.0 final is released. I am working on it this weekend, in fact. Thanks for your interest.

  16. Joseph says:
    12/12/2006 at 1:51 pm

    What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?
    Thanks.

  17. Samuel says:
    2/22/2007 at 5:56 am

    Your download link is broken.

  18. grt says:
    3/18/2007 at 1:32 pm

    k, first i dont hav ethis file. “http://www.rune-nation.net/rune-paper/wp-includes/template-functions-post.php”
    never got it. my blog works fine. so what now?

  19. HP says:
    7/31/2007 at 5:50 am

    When I click on the download link it doesn’t download. Please check it.

    Thanks

  20. Jo0Lz says:
    9/28/2007 at 11:38 am

    Hi there!

    Great plugin, I think it actually works! (And I’m on WP 2.3, running the K2 Theme).
    Have to test some though, but the old posts (HTML) are still parsed, as is the BBCode, for as far as I’ve had any chance to test it…

    @HP, the download link isn’t broken, your browser just doesn’t recognize the extension, and that’s a client side issue, really. You have to right click and “save as” afterwards, you will have no trouble opening the archive.

    :D Thanks!

  21. Wordpress 2.3 at Jo0Lz.nl says:
    10/1/2007 at 12:59 am

    [...] BBCode & HTML: Ik kan nu berichtjes typen in HTML en in BBCode. Ook in de reacties kun je beide manieren gebruiken. [...]

  22. lucas03 says:
    11/3/2007 at 10:23 am

    hi,
    Can you pls set size to phpbb3 size. from 0 to 200.
    And can you also set that not only bbcode will be there, but also default wordpress coding. Because I have 500 post by wordpress coding and when I use your plugin, it ruin all of them. There are clicable links and html tags.

  23. Márcio Pereira says:
    12/11/2007 at 3:57 pm

    I’d like to add my own bbcodes. Is there a way to do this?

  24. wow says:
    4/6/2008 at 12:52 am

    Cool, the post.
    @
    Thanks for the information.

  25. smolenskiy says:
    8/4/2008 at 7:38 am

    WP 2.5.* no file wp-includes/template-functions-post.php

Leave a Reply

Click here to cancel reply.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

code: use [code=php][/code].

Comment Preview

    Subscribe Feed
    Share Subscribe to this blog…
    Share Bookmark or share this page…
  • About

    My name is Jeff Moore. I'm a PHP programmer living in San Francico and working for a startup.

    More about me…

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (17)
    • Open Source (14)
    • PHP (98)
    • Software Design (29)
    • Usability (14)
    • Web Design (20)
  • Recent Comments

    • Looking Towards the Cloud  23
      Betty Saletta, Driver License, Jamel Sawyer [...]
    • Benchmarking PHP's Magic Methods  12
      Article Marketing Strategy, Magento Development, Vance Lucas [...]
    • Improved Error Messages in PHP 5  32
      Terry Nessel, css, Amsterdam [...]
    • Keywords and Language Simplicity  11
      kim kardashian sex tape price, nokia, per Rechnung bestellen [...]
    • flickr case study  3
      bookmarking demon software, php-trivandrum.org, Harry Fuecks
    • rsync to remote server via ssh  7
      Burton Haynes, James, Mike [...]
    • Yahoo YUI wins JavaScript Library Wars  10
      Lera Bride, Scott, Jeff [...]
    • OOP is Mature, not Dead  15
      Avery Depew, Fernando, deltawing [...]
    • Ruby versus PHP or There and Back Again  10
      Solar Pumps, Amsterdam, Hari K T [...]
    • ZendCon: Writing Maintainable PHP Code  8
      IT Ninja, nicopico, Arif [...]
  • Recent Posts

    • ZendCon: Writing Maintainable PHP Code
    • Looking Towards the Cloud
    • Holiday Tech Support
    • Closures are coming to PHP
    • php | tek Wrapup
    • php | tek 2008
    • Sarah Snow Stever
    • Benchmarking PHP’s Magic Methods
    • The Endpoints of the Scale of Stupidity on Video
    • Working with PHP 5 in Mac OS X 10.5 (Leopard)
  • Site

    • Archives
    • Log in
  • Search