Resource icon

Post Content Find / Replace 1.0.0

No permission to download
Thanks EQnoble,

In this case, I have products that were linked over the years , members know of them or I actually created them through autolinks, then the manufacturer hires a new webmaster who feels changing the urls is a good idea. I had a few dozen links that regex found and got them all in one shot. Love this add-on.
 
Hello.
I was using addon TagMe on my former XF 1.1.3
with my new setup all taggued name in thread are displayed like this format : [member=15614]user[/member]
do you think it would be possible to replace this with @User ?
Thanks for your support.
 
Hello.
I was using addon TagMe on my former XF 1.1.3
with my new setup all taggued name in thread are displayed like this format : [member=15614]user[/member]
do you think it would be possible to replace this with @User ?
Thanks for your support.
I haven't tested this as I just wrote it here in this post so try without saving first.

Quick Find:
Code:
member

Regular expression:
Code:
#\[(member)(=[0-9]+])(.*?(?!\[/\1]?).)(\[/\1])#siu

Replacement String:
Code:
[user\2@\3[/user]

Thanks for your patronage.
 
Last edited:
user in [member=1234]user[/member] may take several values
will this keep the username between the bbcode ?
 
Thanks for your quick answer Eqnoble. I will try in this way and let you know.
I changed the expression so you would have to try again if you have already, remember not to save until after you check, and yes the name will remain the same and have the @ added to it.

Again I note that the above post has been changed.


.
 
I have 2,000,000+ posts on my forum. I was able to use this to replace a small number of values, but if I try to do [video] tag, I just end up at a blank page. I'm assuming it's choking on the amount of data. Any suggestions?
 
I think this add-on was a bad idea to release to general public. The stupid code that could be generated by the unknowing is unlimited.
 
php was hitting a memory wall... temporarily bumped it to a GB and it worked :)
There is this as well
https://xenforo.com/community/threads/import-from-ipb-3-2-posts-not-parsed-at-all.39577/#post-435226

I think this add-on was a bad idea to release to general public. The stupid code that could be generated by the unknowing is unlimited.



While opinions of the addon being released are kind of off topic here I will indulge your view and offer my response to it.

Technically code is never generated by this addon. This addon checks post data in the database using an expression that an individual manually sets in the ACP to run against the posts but yes the idea behind what you are saying is completely correct, if you put in what is considered valid regex, and you put the wrong expression for your situation you can generate an unlimited amount of erroneous changes and problems.

However as an analogy to what you are suggesting: A car is a very destructive weapon, but just about any adult can get one if they are willing and able to pay and when used for no reason at all they call it joyriding if you can believe that. What I am getting at is that used improperly almost anything can be dangerous.

Because of the addon I have been able to easily help a bunch of people convert their boards (and generally change post content) and for long time didn't have to charge anyone to do it...pretty much because the tool made my job easy and take less time then writing scripts to work the DB from scratch....it's all how you look at it I suppose.
 
Greetings,
For some reason, after migration from 1.3 to 1.4 some thread titles contains '.' before and after :
ex: .this is a thread title.
Does your addon might be able to remove both '.' ? What would be the argument?
Thanks @EQnoble
 
Greetings,
For some reason, after migration from 1.3 to 1.4 some thread titles contains '.' before and after :
ex: .this is a thread title.
Does your addon might be able to remove both '.' ? What would be the argument?
Thanks @EQnoble
No despite my helpings around this thread it is not my addon and no this addon does not effect thread titles, only messages.

The only way to programmatically modify all thread titles matching a given pattern is either direct queries or a custom script.
 
what this could mean
7b64d3d3ca1dba855e79cc7cc66f643a.png
 
Try this:


Quick Find:
Code:
attachment

Regular expression:
Code:
#(?:\[attachment=)([^\]]+)(?:])#siu

Replacement String:
Code:
[attach]\1[/attach]

This works for me, thanks. But it shows only a link to the image: "View attachment xxx"
Is it possible to show a clickable thumbnail or the image directly?
 
After migrate from another forum platform I found plain text like
Code:
https://youtu.be/rO5X2PslDJ4
doesn't display the Youtube video. Which regular expression and replacement string should I set to automatically embed all videos in this format?
 
Top Bottom