Resource icon

Post Content Find / Replace 1.0.0

No permission to download
I am getting the following error when trying to use this..


Some of my posts have as many as 11 videos.

Never mind found this two posts back :giggle: - http://xenforo.com/community/threads/post-content-find-replace.6548/page-9#post-306593

Darn.. I have more than 30 videos in a post somewhere. What is the optimum value for this?
Just set it to a ridiculously high number when making the replacements and then set it back to where ever you want after you are done...unless someone corrects me here, I believe that this will only effect new posts being made and changes trying to be saved after.... posts that were imported I think don't apply to this because they already exist in the db ..again I think but am not sure.
 
Yeah I have set it to 45 but was wondering if there is any problem in doing so. I will set it back to 20 for now.
 
Nah it is really up to you and how much you want to limit for whatever reason be it to reduce clutter or senseless posts or to make pages load faster or whatever.

On the other hand having 800 YT video trying to load on a single page load is going to make for a horrible experience in my opinion...you just gotta play around and figure out what is the happy medium for you.
 
Can I use this tool to remove multiple carriage returns between paragraphs (see thumbnail below). During one of the migrations this travesty happened to all the forum posts and is an eye sore to me. If yes, then how?

carriage.webp
 
Can I use this tool to remove multiple carriage returns between paragraphs (see thumbnail below). During one of the migrations this travesty happened to all the forum posts and is an eye sore to me. If yes, then how?

View attachment 43796

I believe you can modify anything in a post but haven't tried this specifically.

Click edit on that post then click the 'use bbcode editor' button and copy that whole post and then post it in a code box here. If you could do this for two posts it would be better as it would give me more to test with. Seeing that it is regex we are dealing with, the more things to test an expression against the better.
 
Couple of posts from the BB code editor.

Code:
being such a reputed company seagate needs to think abt it
 
 
 
 
 
also guys office work monday to friday(9to5 pm) also on saturday...except 2nd and 4th of every month
 
 
 
sunday closed........
 
hope this info helps somone


Code:
[B]Re: HDTV buying advice thread[/B]
 
1. Budget.- [U]45,000[/U]
 
 
 
2. Viewing distance.- [U]8 feet[/U]
 
 
 
3. Sources/inputs such as HD DTH/consoles/stand-alone media players etc. - [U]cable and USB [/U]
 
 
 
4. Preference for plasma TV/LCD TV/LED-LCD TV. - [U]LED TV[/U]
 
 
 
5. Preference for brands. - [U]Samsung & Sony[/U]
 
 
 
6. Willing to purchase it from the grey market? - [U]No[/U]
 
 
 
7. Ambient lighting conditions of the room. - [U]Medium (Controllable) [/U]
 
 
 
8. Any other feature you are looking for such as 3D support on the HDTV, DLNA capabilities etc. - [U]None[/U]
 
If everything in your forum is like this and all content in your forum is from the import this should work... (please have a backup ready as I can't fully test this with two posts, however this worked in my tests with those two posts and two posts I created which I added a new line to for each new line)

Regular Expression: #((\n)\s\[{0}\n)#
Replacement String: \2


Please let me know if this:
A. Works great
B. Is still missing something
C. Fails horribly.
 
I just did a test run and got this

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 79 bytes) in /home/domain/public_html/community/library/Zend/Db/Statement/Mysqli.php on line 304
 
ohh damn....if I had to guess I would say that you have a LOT of posts that need to be changed as in you have a huge imported DB and this happened to literally every post?


I would wait and see what someone else has to say to this...but it looks like you have mysql limited to 128 Megabytes...I wonder if this would work with a higher memory limit?
 
Please let me know if this:
A. Works great.
Thanks a lot. Its been working great so far. (y)

A question though. Some posts which show up in the tool, when I open them they show error as if do not exist and show I do not have enough privileges. Any clue?

Edit:
Fatal error: Maximum execution time of 30 seconds exceeded
Seems it will take forever to go through the entire DB. I am getting the above with just 5K post blocks. 1.7M more posts to go through. :p

Edit 2: Just got around 2.5K alerts :O for threads from 2005.
 
I have bb codes from vBulletin, and would like to convert them. below is the code:

[ARB]Text[/ARB]
Would like to replace the above to:
[arabic]Text[/arabic]

please do let me know how to replace the above bb code?

Thanks,
 
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 262144 bytes) in /var/sites/m/mohaddis.com/public_html/testxf2/library/XenForo/Model.php on line 223

I received the above error after clicking on the proceed button. below are the code i used

Quick Find : [ARB
Regular Expression: #\[ARB](\w+)\[/ARB\]#siU
Replacement string: [arabic]\1[/arabic]

What would be the cause of above error?
 
Went through this thread twice and can't seem to find what I need

Code:
[video=youtube;fn7BRf7XSsU]http://www.youtube.com/watch?feature=player_embedded&v=fn7BRf7XSsU
 
Went through this thread twice and can't seem to find what I need

Code:
[video=youtube;fn7BRf7XSsU]http://www.youtube.com/watch?feature=player_embedded&v=fn7BRf7XSsU

Do you also need to capture the closing [/video] tag?


If you only want to capture what you posted up...try this...
Quick Find: [video=youtube;​
Regular expression: #\[video=youtube\;([a-z0-9]+)\]http.+\/watch.+v=[a-z0-9]+#siu​
Replacement String: [media=youtube]\1[/media]​
If you also need to capture the [/video] tag,
example:
[video=youtube;fn7BRf7XSsU]http://www.youtube.com/watch?feature=player_embedded&v=fn7BRf7XSsU[/video]​

you can use this instead for the Regular expression:
#\[video=youtube\;([a-z0-9]+)\]http.+\/watch.+v=[a-z0-9]+\[\/video\]#siu​


Edited: note to self...remember to use plain tags before posting things that will parse :-/
 
Top Bottom