Post Content Find / Replace 2.0.3

XF 2.1 / 2.2 / 2.3 Post Content Find / Replace 2.0.3

Add-on xenforo 2

Ressources et modules complémentaires pour XenForo 2

Styles xenforo 2

Styles / Thèmes et apparence pour xenforo 2

Templates xenforo 2

Codes pour modifier les templates sur xenforo 2

Section Premium

Add-on et Styles pour membre Premium
  • ⚠️ Section Premium. Réserver aux Membres Premium ⚠️
Post Content Find / Replace 2.0.3

XF 2.1 / 2.2 / 2.3 Post Content Find / Replace 2.0.3

Catégorie Catégorie Add-Ons
Titre du sujet Titre du sujet Post Content Find \/ Replace 2.0.3
Auteur de la discussion Auteur de la discussion laurent68
Date de début Date de début
Réponses Réponses 0
Affichages Affichages 6
Réaction Réaction 0
Dernier message par Dernier message par laurent68

laurent68

Fondateur

Staff
fondateur
Réputation: 100%
Discussions
5 112
Messages
13 400
Solutions
85
J'aime
8 158
Points
198
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 [/ICODE]:

Quick Find:

[video

Regular Expression:

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

Replacement String:

[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.
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.

Télécharger V2.0.3 :
 

Pièces jointes

  • 1794302628940.webp
    1794302628940.webp
    27.8 KB · Affichages: 2
Contenu similaire Les plus vues Voir plus
Retour
Haut Bas