Resource icon

xF1 Add-on Post Content Find / Replace 1.0.0

No permission to download
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 :

Quick Find:
[video

Regular Expression:
#\[video=youtube;([^\]]+)\]([^\[]+)\[/video\]#siU

Replacement String:

Limitations:
  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.


Enjoy.

Edit: Jan 10th 2011 - Code updated and fixed. Not sure how I missed that but... oh well. Thanks to whyweprotestfor spotting my silly error.
Author
AnimeHaxor
Size
8.4 KB
Extension
zip
Downloads
23
Views
1,932
First release
Last update

More resources from AnimeHaxor

Similar resources

Resource Delete Post Content Admin
Allow the resource delete post to be customised at delete time...
0.00 star(s) 0 ratings
Downloads
7
Updated
Censoring posts using regular expressions. Helps prevent spam.
0.00 star(s) 0 ratings
Downloads
7
Updated
[TH] Post on Reported Content
Creates a new thread in a forum of admins choice on report in addition to filing report as normal.
0.00 star(s) 0 ratings
Downloads
1
Updated
Add rich username (CSS) to last post section in forum index and thread list
0.00 star(s) 0 ratings
Downloads
24
Updated
Brivium - Individual Post AnimeHaxor
This addon adds a link to the post and it will "jump" to correct post.
0.00 star(s) 0 ratings
Downloads
3
Updated