Resource icon

Post Content Find / Replace 1.0.0

No permission to download
I responded to your ticket on Sunday night with regards to removing font tags.

Quick Find: [font

Regular Expression: #\[font=([^\]]+)\](.*)\[/font\]#siU

Replacement String: \2
Yes thank you for help i know but i dont want to backup old posts as post history. Plugin does backup the old posts as post history but i dont need it
 
I responded to your ticket on Sunday night with regards to removing font tags.

Quick Find: [font

Regular Expression: #\[font=([^\]]+)\](.*)\[/font\]#siU

Replacement String: \2
However, what is the code for clear all old COLOR tags too.

Actually, i m trying to clear like these posts :)
Ekran Alıntısı.webp
 
I want prevent to save old posts as history. Any way ? I didnt see any option about that. But i can comment some lines in script if possible.

I just backed up mysql database and i want to run just like sql replace command. I dont want any history record because i have about 7million post and i dont want to save old changed posts on database also this process will take a long . I will remove all font styling customizations

Edit history?

Admin CP -> Home -> Options -> Logging Options -> Enable edit history tracking and prune after X days
 
However, what is the code for clear all old COLOR tags too.

Actually, i m trying to clear like these posts :)

Quick Find: [color=

Regular Expression: #\[color=[^\]]+\](.+)\[/color\]#siU

Replacement String: \1

You may find that you have to run this replacement multiple times to handle nested tags. Just keep running it until it doesn't match anymore.
 
I've read through a lot here, you guys are brilliant. What I priceless script. I cannot wait to use this. But, to sound like a bimbo, there isn't any info where this uploads. Where do I install this?

Thanks!
 
I've read through a lot here, you guys are brilliant. What I priceless script. I cannot wait to use this. But, to sound like a bimbo, there isn't any info where this uploads. Where do I install this?

Thanks!
Is it my fault or did you mean to make me laugh so hard (@ sound like a ..) ?


After downloading the archive extract it and upload the PostReplace folder to your 'site/library' and then install as normal.

Make sure to have backups taken first and also when running replacements, test it without the save box checked to make things easier for yourself.
 
@Brogan @Jake Bunce

I run this script today and i fallow the process via post edit history table in sql
It edited the about 4million post and write post edit history but now I m getting following errors:

When i check the checkbox and click to continue, it waiting a little then says "Please enter a valid message" error and process broken.

I tried about 4-5 times but same error .

I think, if any post include only like this [/ font] so replacement value will be = '' (empty) then it may says "Please enter a valid message " or may be different reason ...

Can you fix this error ? @Kier
 
Last edited:
Hello,

I would like to change this URL.

current:
Code:
[media=amazon]B00EIDO5K6[/media]

new:
Code:
http://www.amazon.de/dp/B00EIDO5K6/?tag=AMAZON-ID

Can someone help me please?

thx!
 
That means the post was empty after the replacement. The system doesn't allow empty posts.
Yes but if post will be empty, May plugin no change the post? (Mean skip this post)
Or change with a constant word like dot, comma etc.
Or skip this post

Script stopped at about 4.1million th of 7million post. There are too many post in database which should be replaced.

If need the any file (line) of script, i can do it too for this fail.

However can i find this post in mysql which return the empty after replacement ? I can delete it manually too
 
I have a different (but related to migration to subdomain) image issue. It appears that attachments from my conversion from vB years ago show when logged into the site. Guests see what appears to be a broken image.

Logged in:
Screen Shot 2014-03-05 at 9.09.06 AM.webp

If I'm logged out:
Screen Shot 2014-03-05 at 9.09.24 AM.webp

This is the thread. If you click to open the image, it redirects, but you get this message:

Screen Shot 2014-03-05 at 9.13.23 AM.webp


This is the underlying code:

Code:
<img src="http://www.everythingicafe.com/forum/attachment.php?attachmentid=4400&amp;stc=1&amp;d=1233449449" class="bbCodeImage LbImage" alt="[IMG]" style="">

I'd consider doing a mySQL query, which fixed my last issue, but not sure if it'll correct my problem.

Code:
UPDATE xf_post SET message = REPLACE(message, 'www.everythingicafe.com/forum/attachment','forums.everythingicafe.com/attachment');

Any recommendations are greatly appreciated.
 
Hello,

I would like to change this URL.

current:
Code:
[media=amazon]B00EIDO5K6[/media]

new:
Code:
http://www.amazon.de/dp/B00EIDO5K6/?tag=AMAZON-ID

Can someone help me please?

thx!

Quick Find:
Code:
amazon]

Regular expression:
Code:
#(?:\[media=(amazon)])([^\[]+)(?:\[/media])#siu

Replacement String:
Code:
http://www.\1.de/dp/\2/?tag=AMAZON-ID
 
Quick Find:
Code:
amazon]

Regular expression:
Code:
#(?:\[media=(amazon)])([^\[]+)(?:\[/media])#siu

Replacement String:
Code:
http://www.\1.de/dp/\2/?tag=AMAZON-ID

OMG, I forget the string to make it clickable :cautious:

Now, I have this code
Code:
http://www.amazon.de/dp/B00EIDO5K6/?tag=AMAZON-ID

and need this
Code:
[URL]http://www.amazon.de/dp/B00EIDO5K6/?tag=AMAZON-ID[/URL]
 
OMG, I forget the string to make it clickable :cautious:

Now, I have this code
Code:
http://www.amazon.de/dp/B00EIDO5K6/?tag=AMAZON-ID

and need this
Code:
[URL]http://www.amazon.de/dp/B00EIDO5K6/?tag=AMAZON-ID[/URL]


Quick Find:
Code:
amazon

Regular expression:
Code:
#http://www\.amazon\.de/dp/[^/]+/\?tag=AMAZON-ID#siu

Replacement String:
Code:
[URL]\0[/URL]
 
Last edited:
I need some help with old (imported vb4) BBCodes in the posts.
There are many posts including the following bbcodes:

Code:
[SIZE=1]
[SIZE=2]
[/SIZE]
[FONT=tahoma] etc.


I want to remove these BBCodes from all posts. Is this possible?

Thanks in advance :)
 
Back
Top Bottom