[XF 2] Post Content Find / Replace

xxF

Legend
LEGEND
ULTIMATE
PREMIUM
MEMBER
Joined
Jul 26, 2025
Messages
3,589
Reaction score
48,471
Deposit
0$
[XF 2] Post Content Find / Replace



Плагин Post Content Find / Replace - Регулярные выражения для поиска и замены содержимого во всех сообщениях

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:
Code:
[video="http://www.youtube.com/watch?v=ZSW4LDAHIeU"]Video title here[/video] на такой: [media=youtube]ZSW4LDAHIeU[/media]

Quick Find:
Code:
[video

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

Replacement String:
Code:
[media=youtube]\1[/media]

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.

[XF 2] Post Content Find / Replace 2.0.1
Hidden text, you need have 15 messages or buy VIP, now you have 0 posts.
https://anon.to/?
M:
https://anon.to/?

View hidden content is available for registered users!
 
Top Bottom