Resource icon

Post Content Find / Replace 1.0.0

No permission to download
This addon broke my post.php page. After installing it I get this error when trying to view posts:

ErrorException: Fatal Error: Class 'XenForo_Model_Post' not found - library/XenForo/Model/Post.php:4
Stack Trace
Code:
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
Code:
array(3) {
["url"] => string(73) "http://aoahosting.webfactional.com/threads/extra-life-2013-join-us.26390/"
["_GET"] => array(1) {
["/threads/extra-life-2013-join-us_26390/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
Code:
[URL]https://www.facebook.com/photo.php?v=164624740391963&set=vb.539110052800217&type=2&theater[/URL]

Need to convert these into facebook video.

Code:
[video=dailymotion;x14tmd0]http://www.dailymotion.com/video/x14tmd0_kaltak17sep2013_news#from=embediframe[/video]

Need this to convert in daily motion video.
 
This addon broke my post.php page. After installing it I get this error when trying to view posts:

ErrorException: Fatal Error: Class 'XenForo_Model_Post' not found - library/XenForo/Model/Post.php:4
Stack Trace
Code:
#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}
Request State
Code:
array(3) {
["url"] => string(73) "http://aoahosting.webfactional.com/threads/extra-life-2013-join-us.26390/"
["_GET"] => array(1) {
["/threads/extra-life-2013-join-us_26390/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
It looks like you uploaded the files to the wrong directory and written over a stock file needed by and included with xenforo.


Try this...

Find the .zip with your copy of xenforo.
-
extract it and go to the following directory...
-
/library/XenForo/Model ,then find Post.php
-
Copy that file and upload it to your server inside the following directory - /library/XenForo/Model/


After re-uploading that file and overwriting the existing one in that folder...check that page that threw you the error before.

If you don't have that error anymore you only need to upload the addon to the proper directory...

extract the zip containing the addon from this thread and upload the entire PostReplace folder to the library folder on your server.

Let me know if that solves the issue.





Code:
[URL]https://www.facebook.com/photo.php?v=164624740391963&set=vb.539110052800217&type=2&theater[/URL]

Need to convert these into facebook video.

Code:
[video=dailymotion;x14tmd0]http://www.dailymotion.com/video/x14tmd0_kaltak17sep2013_news#from=embediframe[/video]

Need this to convert in daily motion video.


Quick Find:
Code:
[url


Regular expression:
Code:
#\[url]https://www\.facebook\.com/photo\.php\?v=([0-9]+)(?:[^\[]+)?\[/url]#siu


Replacement String:
Code:
[media=facebook]\1[/media]



Quick Find:
Code:
[video


Regular expression:
Code:
#\[video=dailymotion;([^]]+)][^\[]+\[/video]#siu


Replacement String:
Code:
[media=dailymotion]\1[/media]
 
It looks like you uploaded the files to the wrong directory and written over a stock file needed by and included with xenforo.


Try this...

Find the .zip with your copy of xenforo.
-
extract it and go to the following directory...
-
/library/XenForo/Model ,then find Post.php
-
Copy that file and upload it to your server inside the following directory - /library/XenForo/Model/


After re-uploading that file and overwriting the existing one in that folder...check that page that threw you the error before.

If you don't have that error anymore you only need to upload the addon to the proper directory...

extract the zip containing the addon from this thread and upload the entire PostReplace folder to the library folder on your server.

Let me know if that solves the issue.








Quick Find:
Code:
[url


Regular expression:
Code:
#\[url]https://www\.facebook\.com/photo\.php\?v=([0-9]+)(?:[^\[]+)?\[/url]#siu


Replacement String:
Code:
[media=facebook]\1[/media]



Quick Find:
Code:
[video


Regular expression:
Code:
#\[video=dailymotion;([^]]+)][^\[]+\[/video]#siu


Replacement String:
Code:
[media=dailymotion]\1[/media]

You're correct. I had already fixed the error by replacing the stock files but because the directory structure isn't in this addon my rsync script didn't work to install it.
 
Quick Find:
Code:
[url


Regular expression: EDITED
Code:
#(\[url]http://)(forums)(\.DOMAIN\.com(?:[^\[]+)?)(\[/url])#siu


Replacement String:
Code:
\1www\3\4

Damn, finally got to run this and got out of memory errors. :) When I searched for how many instances I had in mysql directly, it had about 20k entries (spread over about 10 tables). I guess I can try to temporarily set the memory limit higher one night when I'm burning the midnight oil. ;)
 
Damn, finally got to run this and got out of memory errors. :) When I searched for how many instances I had in mysql directly, it had about 20k entries (spread over about 10 tables). I guess I can try to temporarily set the memory limit higher one night when I'm burning the midnight oil. ;)
nice...gotta love burning at midnight...might just swap out the oils though ;-)


have you tried this for the memory issues?
http://xenforo.com/community/threads/import-from-ipb-3-2-posts-not-parsed-at-all.39577/#post-435226
 
Hi! After crossing on to quote IPB not display correctly.
Can I convert quotes like this:

Code:
Quote(Kulikov @ 04 September 2013, 14:42)
Seregas1979, How are you ?

to quote this kind of ..

Code:
[QUOTE]
(Kulikov @ 04 September 2013, 14:42)
Seregas1979, How are you ?
[/QUOTE]
 
I have never been a member at a forum running IP board so I don't know the syntax for their various bbcodes.


Is this...
Code:
[QUOTE]
(Kulikov @ 04 September 2013, 14:42)
Seregas1979, How are you ?
[/QUOTE]
...what you see when you click edit on a post in xenforo?

That is what I need to see to write the regex.
 
Please forgive me for my bad English!
The first example of this is now,
The second example - the way I want to do!

By the way this addon works on 1.2.2?
 
Please forgive me for my bad English!
The first example of this is now,
The second example - the way I want to do!

By the way this addon works on 1.2.2?
Don't worry about it.

I need you to go to your forum, on one of the posts that has a quote, and while logged in as admin click 'edit' on that post and copy the quote in the editor. That is what I need you to paste in a code block here.
 
We kind of left mine in the middle, can you have a quick look ? :)

Yes but I be forced to expect you to take a quick look at this DocEvil.gif

Quick Find:
Code:
[url


Regular expression:
Code:
#\[url='http://www.travelstories.gr/glossary(?:.|/)[^]]+]([^]\[]+)(\[/url])#siu


Replacement String:
Code:
\1

Let me know how that works.
 
Alright well unless I have access to the post replacement tool on your board I could not tell you why that is...what I can show you is this...

URLs to catch
[URL='http://www.travelstories.gr/glossary/whateverhereagain']Barcelona[/URL]
[URL='http://www.travelstories.gr/glossary.php?do=item&id=42']Barcelona[/URL]


PHP:
preg_match_all #\[url='http://www.travelstories.gr/glossary(?:.|/)[^]]+]([^]\[]+)(\[/url])#siu

OUTPUT:

  [0]=> array
    [0]=>[URL='http://www.travelstories.gr/glossary/whateverhereagain']Barcelona[/URL]
    [1]=>[URL='http://www.travelstories.gr/glossary.php?do=item&id=42']Barcelona[/URL]
  [1]=> array
    [0]=>Barcelona
    [1]=>Barcelona
  [2]=> array
    [0]=>[/URL]
    [1]=>[/URL]

Which shows that at the very least that the two links you shared earlier would be caught, if they are not being caught it says they were either already replaced, or they don't exist anymore otherwise.
 
If you want to take a look I can give you access. If you don't have time no problem you already helped a lot :)
 
hi,

How to change this kind of bbcode to work with xenforo

[youtube]youtubeurl[/youtube]

And

[align=center]lot of text [/align]

Thank you
 
Hey mate.

Code:
[URL='http://www.youtube.com/watch?v=Fp5O4FuVdnI']Veena Malik's ISI tattooed picture controversy investigation completed ( EXCLUSIVE) - YouTube[/URL]

This URL is not getting picked up.
 
Back
Top Bottom