Resource icon

Post Content Find / Replace 1.0.0

No permission to download
It probably just seems like it does nothing because you have so many posts which contain matches to your expression.

And yes, pretty much you run it until it stops matching, you can set the offset to a higher number until you find a sweet spot for your hardware where you can run without exhausting your memory. This wont run through 4.5 million posts unless 4.5 million posts contain matches to your expression.
 
I made those changes and nothing lists out and nothing changes. I'm confused on what it does. Do I need to keep running it over and over or does it only process the first 5000 posts of my 4.5m? D0 I need to up the offset by 5000 then? Thanks!

The idea here is that you would run each replacement multiple times until it matches zero posts which means it has done them all.

So if the batch is 5000 and there are 12500 posts then the first load would match 5000, the second would match 5000, and the third would match 2500. You would be done after three reloads.
 
So if the batch is 5000 and there are 12500 posts then the first load would match 5000, the second would match 5000, and the third would match 2500. You would be done after three reloads.
Gotcha, I couldn't tell if the offset was changing each time I pressed the button. thanks!
 
Regex Help Needed for this conversion...

I need to change this:
domain.com/ANYTHING
to:
domain.com/XYZ/ANYTHING

Basically need to add XYZ after domain.com in all domain.com links. The thing is that I might need to do this processing on a regular basis to update new links posted so the problem here is that the process needs to check for XYZ... If it exists, ignore that link otherwise add it. Hopefully I was able to explain the requirement. Thanks!

PS: I am not sure it Post Content Find / Replace is suitable for this conversion.
 
I'm getting preg_match errors when trying to run this.

I'm trying to replace "’" with an apostrophe. Maybe it occurs too often on my site. It would be in almost all of my old threads from before the conversion.
 

Attachments

  • Screenshot 2014-09-26 at 10.37.34 PM.webp
    Screenshot 2014-09-26 at 10.37.34 PM.webp
    12.1 KB · Views: 4
It won't install the xml file, shows an error.
I uploaded all the folders from the download into the root and that didn't work, so I uploaded all the folders into the /library and that didn't work.
What am I doing wrong?
 
So trying to work this out as there are zero instruction in there to put the files and reading comments at the start of the Thread is confusing.

I uploaded the files into library/xenforo then the folders matching But the /Model folder has a post.php file which asked if I wanted to overwrite the the already post.php file in there, which I didn't as they are very different sizes.

So finally still can't test this mod out...

UPDATE:
Worked it out, just install the downloaded file into the Library.

Now it's working I just converted my Thumbnail pictures to full size images
Great little tool...

How would I set this up..
My Youtube on my vB is:

PHP:
[url="http://youtu.be/Hu1urqM7rRc"]Barney and Friends - Shapes and Colors All Around (FULL) - YouTube[/url]

How would I go about so it will convert my youtube to Xenforo?

Quick Find:


Regular Expression:


Replacement String:
 
Last edited:
Hello Gang!

I was using a bbcode editor for a short time and noticed the bbcode does not work on tapatalk so I 'm resorting to uninstalling the bbcode add-on. when I do it leaves threads and posst with exposed bbcoed like
, and [fleft]. I installed PostReplace and entered
to be removed and it left me with []. I then tried to delete [] and that made a lot of the text disappear from the threads. I'm not trying to replace code just delete it. I reverted to my backup DB so no harm done but does anyone know of a safe way to remove the bbcode short of going into each thread?

Many thanks,
Nick​
 
Hello Gang!

I was using a bbcode editor for a short time and noticed the bbcode does not work on tapatalk so I 'm resorting to uninstalling the bbcode add-on. when I do it leaves threads and posst with exposed bbcoed like
, and [fleft]. I installed PostReplace and entered
to be removed and it left me with []. I then tried to delete [] and that made a lot of the text disappear from the threads. I'm not trying to replace code just delete it. I reverted to my backup DB so no harm done but does anyone know of a safe way to remove the bbcode short of going into each thread?

Many thanks,
Nick​

The only safe way, is to either learn regex syntax, or hire someone to do it for you.

First off, you need delimiters to tell regex where things start and stop. Since [ can actually be a valid delimiter, your expression is literally matching only the text in between [ ] and using those brackets as its delimiters.

I use # because I find it to be the character I have in matches the least which makes it easy to identify things and makes for the least amount of escaping. What I use is preference but you can use any non-alphanumeric, non-backslash, non-whitespace character. Just remember that whatever character you use for a delimiter must be escaped if used in the expression.​
 
The only safe way, is to either learn regex syntax, or hire someone to do it for you.

First off, you need delimiters to tell regex where things start and stop. Since [ can actually be a valid delimiter, your expression is literally matching only the text in between [ ] and using those brackets as its delimiters.

I use # because I find it to be the character I have in matches the least which makes it easy to identify things and makes for the least amount of escaping. What I use is preference but you can use any non-alphanumeric, non-backslash, non-whitespace character. Just remember that whatever character you use for a delimiter must be escaped if used in the expression.
Thank you for the info. I ended up using the add-on to search for the bbcode and I manually edited each post.
 
This is a very useful and needed Add-on. With all the xfers to Xenforo these days it would be super useful if there was a summary page somewhere that had say all the popular regular expressions for phpBB, or vbulletin such as AME, 's, youtube, etc. I've ready through 44 pages of the stuff and I'm not sure I have them all and with the edits and corrections in the 44 pages of posts it makes it very difficult to tell. Almost anyone who is converting from some other board to Xenforo will need to do this so it would save new Xenforo users a ton of time.... just saying.
 
How can I change

#0008

to

Code:
:thumbsup:


(and also, additionally, how can I replace #0006 with nothing, i.e. empty space, basically remove all mentions of #0006?)

Thanks in advance!

...
figured it out myself.

Code:
Search: #0008

Regexp: #\#0008#

Replace: :thumbsup:
 
Last edited:
sorry for a stupid question

how to install
model -> post.php already exists
i was uploading it to root/library/xenforo/Model
 
Hello. We have successfully installed this addon (just extracted the archive and moved the PostReplace directory under library/, then loaded the xml file). However whenever we try to use it we either receive no data back, or it just seems to hang, or our other admin said he once received just "1" as response. Initially I received an php error about that the script was unable to allocate memory so I raised the limit, since then there is no error and no data coming back. Any ideas? XenForo 1.4.2, php 5.4.33, apache with mod_php
 
Top Bottom