Resource icon

Post Content Find / Replace 1.0.0

No permission to download
Give me an example of some that it didn't catch and I can see if a second expression will catch the rest that the first missed.
 
It's hard to say, because it's just a word marked as link. But when I click on it it won't find the right topic or post.

Nevemind, it's ok for important posts.
 
Oh, sorry, already edit this post where that link was. If I found something similiar, I'll let you know.
 
Oh, sorry, already edit this post where that link was. If I found something similiar, I'll let you know.

(response to Convo)

This should catch the rest of those links.

Quick Find:
Code:
<a class="postlink

Regular expression:
Code:
#<a\sclass\=\"postlink\"\shref\=\"([^<\"]+)\"\sonclick\=\"window\.open\(this\.href\)\;return\sfalse\;\"\>([^<\<]+)<\/a>#siu

Replacement String:
Code:
[URL="\1"]\2[/URL]
 
(response to Convo)

This should catch the rest of those links.

Quick Find:
Code:
<a class="postlink

Regular expression:
Code:
#<a\sclass\=\"postlink\"\shref\=\"([^<\"]+)\"\sonclick\=\"window\.open\(this\.href\)\;return\sfalse\;\"\>([^<\<]+)<\/a>#siu

Replacement String:
Code:
[URL="\1"]\2[/URL]
Ok, I'll try it.
 
Hello,

I'm doing a vb -> xf convert and i always get crushed on regular expressions. I'm trying to convert the following bbcode:
Code:
[video=youtube;YOUTUBEID]http://www.youtube.com/watch?v=YOUTUBEID&SOMEJUNK[/video]

to the standard media bbcode:
Code:
[media=youtube]YOUTUBEID[/media]

Can someone who doesn't mind regular expressions help me on this one? :) Also, I'm not too good with mysql regex REPLACES as well!

THanks!




Quick Find:
Code:
[video=youtube

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

Replacement String:
Code:
[media=\1]\2[/media]
 
Last edited:
I've made a lot of replaces on xf 1.2, but now on 1.2.1 it doesn't work. Always the error appears, that the memory limit is reached. That can not be, the current memory limit on our test server is 1024MB!
 
Need some help with Find / Replace after final import from vB into XF

After I have successfully imported my vB forum into XF I have some strange BBCode snippets in some posts. As per the user the text was originally formatted with Arial font.

Now there are the following snippets all over the posts:

[FONT=&amp].....[/FONT]

There are several different characters between those two tags, digits, letters, full sentences and even whole paragraphs.

Now I have two options:
1. To remove these BBCode snippets completely or
2. change [FONT=&amp] back into [FONT=ARIAL]

Any idea how to realize this?
 
Try this...


Quick Find:
Code:
[FONT=&amp]

Regular expression:
Code:
#\[font\=\&amp\]#siu

Replacement String:
Code:
[FONT=ARIAL]
 
I cant get my AME media to convert. Here is how my links appear.
Code:
[ame=http://www.youtube.com/watch?v=34cHfvYOYS0]The Politics of Litter - YouTube[/ame]
 
Hello,

How would I go about removing both
as well as
? I do not use them anymore and they mess up my posts.

I have tried this so far

Code:
Quick Find: [spoiler
Regular expression: #\[spoiler\]#siu

But this is what I get if I check the Save changes option

Code:
Server Error

Undefined index: match_146
1.XenForo_Application::handlePhpError() in XenForo/Model/UserTagging.php at line 133
2.XenForo_Model_UserTagging->_getTagMatchUsers() in XenForo/Model/UserTagging.php at line 16
3.XenForo_Model_UserTagging->getTaggedUsersInMessage() in XenForo/DataWriter/DiscussionMessage/Post.php at line 70
4.XenForo_DataWriter_DiscussionMessage_Post->_messagePreSave() in XenForo/DataWriter/DiscussionMessage.php at line 391
5.XenForo_DataWriter_DiscussionMessage->_preSave() in XenForo/DataWriter.php at line 1434
6.XenForo_DataWriter->preSave() in XenForo/DataWriter.php at line 1373
7.XenForo_DataWriter->save() in PostReplace/ControllerAdmin/PostReplace.php at line 45
8.PostReplace_ControllerAdmin_PostReplace->actionReplace() in XenForo/FrontController.php at line 337
9.XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
10.XenForo_FrontController->run() in /usr/share/nginx/webs/xft/admin.php at line 13

Can anyone help me out?
 
Last edited:
I am not sure what I am doing wrong, I have entered the following and when leaving the Save Changes box un-ticked I see nothing after running proceed and I think I should get a list of matches displayed.

Any ideas, anyone?

Quick Find
Code:
[youtube

Regular Expression
Code:
#\[(youtube):([a-z0-9_]+)\](.*)\[/\1:\2]#siU

Replacement String
Code:
[\1]\3[/\1]
 
Back
Top Bottom