Resource icon

Post Content Find / Replace 1.0.0

No permission to download
When we moved from VB to XF many quote marks and the like were imported incorrectly. Both databases were UTF8.

For example ' was imported as ’

This seems like the perfect tool to change all these discrepancies. I've read the previous warnings about running '’' before 'â€' etc, but I just don't know how to work out what the settings would be for this plugin to make the change.

Any help would be appreciated.

Regards

Chris
 
Hi, I'm trying to correct the URLs for all the media files on the forum so I can use "s9e Media pack." I uploaded your addon's folders to my server, but when I select the xml file to install a new addon in my ACP, I get this error message:

Invalid class: PostReplace_Route_PrefixAdmin_PostReplace

What could be the problem? I'm using Xen 1.4.

upload_2015-4-5_15-54-41.webp
 
Hi, I'm trying to correct the URLs for all the media files on the forum so I can use "s9e Media pack." I uploaded your addon's folders to my server, but when I select the xml file to install a new addon in my ACP, I get this error message:

Invalid class: PostReplace_Route_PrefixAdmin_PostReplace

What could be the problem? I'm using Xen 1.4.

View attachment 103148
This addon is packaged slightly differently from what most have made common practice since.

You need to move those files you uploaded (the 'PostReplace' directory) inside of yourforum/library
 
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.
 
Top Bottom