Resource icon

Post Content Find / Replace 1.0.0

No permission to download
As that issue has cropped up a few times, I have just repackaged the resource.

It now follows the standard format which is:

PostReplace_1.0.0
↳ upload
↳ library
↳ PostReplace​
 
Currently I have this problem after converting to XenForo from vBulletin:
Code:
[quote=user' date='Jul 3 2006, 05:56 PM']
They could tell me how to convert them:
Code:
[quote='user']
I tested the example in this topic, but did not work.
Thank you very much.
PD: Using translator, sorry
 
I replaced in nearly 1.6 Million Posts something and now I just noticed that on all these posts there is a "Last edited by a moderator"-notice? What can I do?
 
I'm trying to replace

Code:
[video=youtube;UM9aPy7H534]https://www.youtube.com/watch?v=UM9aPy7H534[/video]

with this

Code:
[media=youtube]UM9aPy7H534[/media]

Using Quick Find -
Code:
[video

Regular Expression -
Code:
#\[video=youtube;([^"]+)">.+\]https://www\.youtube\.com/watch\?v="([^"]+)">([^<]+)\[video\]#siU

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


When I click the proceed button, the page reloads but nothing happens - doesn't give a list or replace the text.

Am I doing something wrong?.
 
I'm trying to replace

Code:
[video=youtube;UM9aPy7H534]https://www.youtube.com/watch?v=UM9aPy7H534[/video]

with this

Code:
[media=youtube]UM9aPy7H534[/media]

Using Quick Find -
Code:
[video

Regular Expression -
Code:
#\[video=youtube;([^"]+)">.+\]https://www\.youtube\.com/watch\?v="([^"]+)">([^<]+)\[video\]#siU

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


When I click the proceed button, the page reloads but nothing happens - doesn't give a list or replace the text.

Am I doing something wrong?.
Your expression is a bit off for this task so the app is showing the correct results by not listing or replacing anything (always test your expressions without save changes checked and peruse the list before checking to make sure you aren't erasing large swathes of text because of a bad expression that gets too greedy).

Try this:


Quick Find:
Code:
[video

Regular expression:
Code:
#\[video=youtube;([a-z0-9_-]{11})][^\[]+\[/video]#siu

Replacement String:
Code:
[media=youtube]\1[/media]
 
Is it safe to use this for replacing words with other words?
And does this also work for thread titles or only for post contents?

Is this the correct way:
Code:
hello world

# hello world #su

Hello World

So only exact matches (and also for non-english characters), will this work?

And also does this work on soft-deleted posts?
 
Last edited:
Hi.

I am trying to use this plugin on my forum that I've recently migrated from vBulletin 4.

I've installed the plugin via admin control panel, and uploaded the PostReplace-folder to root/library as instructed.

I'm looking to replace my [mention=USERID]USER[/mention], and have used the following settings:

Quickfind: [mention
Regex: #\[mention=([^\]]+)\]([^\[]+)\[/mention\]#siU
Replacement: @\2

However, when I click "Continue", I only get a completely blank screen (url:/admin.php?post-replace/replace).

Does anyone know what the problem might be?

I'm running XF 1.4.6
 
Hi.

I am trying to use this plugin on my forum that I've recently migrated from vBulletin 4.

I've installed the plugin via admin control panel, and uploaded the PostReplace-folder to root/library as instructed.

I'm looking to replace my [mention=USERID]USER[/mention], and have used the following settings:

Quickfind: [mention
Regex: #\[mention=([^\]]+)\]([^\[]+)\[/mention\]#siU
Replacement: @\2

However, when I click "Continue", I only get a completely blank screen (url:/admin.php?post-replace/replace).

Does anyone know what the problem might be?

I'm running XF 1.4.6

I figured it out. My FTP had, for some reason, decided not to upload one of the plugin files. Everything works OK now :)
 
Hello. Tell me, please, how can I replace this code?

HTML:
<a href="http://site.com/wp-content/uploads/img-700x625.jpg"><img class="alignnone size-large wp-image-7587" src="http://site.com/wp-content/uploads/img-700x625.jpg" alt="Cars review" width="700" height="625" /></a></p>

On this
Code:
[IMG]http://site.com/wp-content/uploads/img-700x625.jpg[/IMG]
Thank you.
 
I just uninstall Double Post Merge addon of @wmtech .
But it leaves it's BBcodes in all post merged before.
With this code:
[DOUBLEPOST=1421280062][/DOUBLEPOST]

What is the right Quick Find, Regular Expression to use to erase all instances of it?
Thanks!
 
Rather than ping the addon author, you should link to the addon if anything.
Code:
doublepost
it looks like it uses timestamps so
Code:
#\[(doublepost)=[0-9]{10}]\[/\1]#siu
 
I've done some conversions for youtube videos, and some of the links have turned out to be inside in the URL BB code

Code:
[URL='http://[media=youtube]DexDu4FDEWM[/media]'][video=youtube_share;DexDu4FDE...player_embedded]http://www.youtube.com/watch?v=DexDu4FDE...player_embedded[/video][/URL]

How would I go about matching those to remove everything apart from the new media=youtube section?

Thanks
 
I've done some conversions for youtube videos, and some of the links have turned out to be inside in the URL BB code

Code:
[URL='http://[media=youtube]DexDu4FDEWM[/media]'][video=youtube_share;DexDu4FDE...player_embedded]http://www.youtube.com/watch?v=DexDu4FDE...player_embedded[/video][/URL]

How would I go about matching those to remove everything apart from the new media=youtube section?

Thanks
If you can edit posts (or otherwise create another) would you add a couple more examples of those erroneous strings (preferably as unique as possible) so that I can see if a true pattern can be derived. It's a big enough pattern (with plenty of spots that I can imagine uniqueness in) where I need to run a test on it before posting an answer.
 
Run this query and make a backup first just incase something goes wrong
Code:
UPDATE xf_post
SET message = REPLACE(message, 'ibf.rocks', 'j.mp')
 
hehe. did just that. funny thing happening now. if i load a post with the ibf link, the post itself shows the ibf link. but if i edit the post, it shows the j.mp link. i am guessing i need to clear some cache or something?
 
Back
Top Bottom