1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Post Content Find / Replace 1.0.0

Allows an administrator to do a regular expression find and replace in the content of all posts.

  1. Kier
    This is a very simple add-on I put together in order to allow an administrator to do a regular expression find and replace in the content of all posts.

    It was written in order to find all instances of a custom BB code tag for embedding YouTube video in an imported posts, and convert them to XenForo's [media=youtube] tag automatically.

    The interface is simple - you have three text fields and a checkbox.


    The first is a simple text search, which helps to narrow down the number of posts that will be searched with the regular expression.

    The second field should contain a full and valid PCRE regular expression, including flags and terminators.

    The third field will be used to determine the replacement text.

    The checkbox is used to switch between testing and commit mode. Unchecked, the replacements will be displayed but not saved.

    Example usage to convert from [video="http://www.youtube.com/watch?v=ZSW4LDAHIeU"]Video title here[/video] to [media=youtube]ZSW4LDAHIeU[/media]:

    Quick Find:

    Regular Expression:

    Replacement String:

    1. The system will not check that your regular expression is valid, or that it matches. It will fall over if your expression does not compile, and it will simply not match anything if the logic is incorrect.
    2. There is no batch processing in this add-on, so if you are replacing something that occurs in a lot of posts, this could be very slow and might time-out.
    So, given those limitations, I may as well release it seeing as it's written now. It might serve as a useful tutorial in creating an add-on anyway.


    Edit: Jan 10th 2011 - Code updated and fixed. Not sure how I missed that but... oh well. Thanks to whyweprotest for spotting my silly error.

Recent Reviews

  1. dking
    Version: 1.0.0
    WOW, was able to take years of transitions from other forum software and make changes in bulk. This tool allowed me to run the query, sample the test results before making a comitted change and when ready hit it. 879 youtube fixes at one time... Easy and cautious all rolled into one package!
  2. andy_mk3
    Version: 1.0.0
    A very easy 5 stars for this. Used for a vB to XF conversion to update old BBcodes and works flawlessly. Thank you very much for this!
  3. phtvs
    Version: 1.0.0
    You have saved my day. Crapy tapatalk signatures removed with this ad-on! Very nice ad-on 5 stars! Keep up the good work!
  4. Burp
    Version: 1.0.0
    Works fine. Changed lots of links to URL's and pictures, BB codes, youtube and vimeo links. This addon was a life saver.
  5. CreationNation
    Version: 1.0.0
    Works as advertised, and very helpful if you read the related discussion in this thread. Killer and saved me a ton of headaches on VB > XF conversion.
  6. enivid
    Version: 1.0.0
    Excellent addon. Saved me a lot of time going through manual SQL queries. Replaced my legacy VBulletin bbcodes with this.
  7. RichardGaspa
    Version: 1.0.0
    Thanks for creating this addon. Does what it said it would do and does it admirably. It's going to save me lot's of time when searching for text in my message database. A must have addon for an active forum.
  8. Ghostaunt
    Version: 1.0.0
    Work perfectly and replaced more than 10 custom bbcode from my old IP.BOARD.
    Thanks you

  9. cdub
    Version: 1.0.0
    Keeps crashing when I try to run it. I keep getting server errors. I've posted a question on the discussion and no help has come yet. Doesn't seem to be working for me. Hopefully the problem will be fixed soon.
  10. BamaStangGuy
    Version: 1.0.0
    This add-on has helped me fixed 10's of thousands of links, images and videos over various forums that have been converted from other forum software. While I don't know Regex well enough to take advantage of this, the community has come through with answers.