Resource icon

Post Content Find / Replace 1.0.0

No permission to download
Code:
Undefined index: node_id

    XenForo_Application::handlePhpError() in XenForo/DataWriter/Discussion/Thread.php at line 402
    XenForo_DataWriter_Discussion_Thread::setForumCacheItem() in XenForo/DataWriter/DiscussionMessage/Post.php at line 212
    XenForo_DataWriter_DiscussionMessage_Post->setExtraData() in XenForo/DataWriter/DiscussionMessage/Post.php at line 245
    XenForo_DataWriter_DiscussionMessage_Post->_getForumInfo() in XenForo/DataWriter/DiscussionMessage/Post.php at line 226
    XenForo_DataWriter_DiscussionMessage_Post->_forumCountsMessages() in XenForo/DataWriter/DiscussionMessage/Post.php at line 198
    XenForo_DataWriter_DiscussionMessage_Post->_updateUserMessageCount() in XenForo/DataWriter/DiscussionMessage.php at line 560
    XenForo_DataWriter_DiscussionMessage->_postSave() in XenForo/DataWriter.php at line 1409
    XenForo_DataWriter->save() in PostReplace/ControllerAdmin/PostReplace.php at line 42
    PostReplace_ControllerAdmin_PostReplace->actionReplace() in XenForo/FrontController.php at line 347
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /home/fdsafdsaasfd/public_html/xenforo/admin.php at line 13
XenForo 1.4.0 RC2
 
Can someone please help.

I am trying to change this

Code:
<script type="text/javascript" charset="utf-8" src="//cdn.playwire.com/bolt/js/embed.min.js" data-width="600" data-height="480" data-publisher-id="XXXX" data-video-id="XXXX></script>

to this

Code:
[parsehtml]<script type="text/javascript" charset="utf-8" src="//cdn.playwire.com/bolt/js/embed.min.js" data-width="600" data-height="480" data-publisher-id="XXXX" data-video-id="XXXX></script>[/parsehtml]
 
Can someone please help.

I am trying to change this

Code:
<script type="text/javascript" charset="utf-8" src="//cdn.playwire.com/bolt/js/embed.min.js" data-width="600" data-height="480" data-publisher-id="XXXX" data-video-id="XXXX></script>

to this

Code:
[parsehtml]<script type="text/javascript" charset="utf-8" src="//cdn.playwire.com/bolt/js/embed.min.js" data-width="600" data-height="480" data-publisher-id="XXXX" data-video-id="XXXX></script>[/parsehtml]

Quick Find: <script

Regular expression: #(<script type="text/javascript" charset="utf-8" src="//cdn\.playwire\.com/bolt/js/embed\.min\.js" data-width="600" data-height="480" data-publisher-id="[^">]+" data-video-id="[^">]+"></script>)#siU

Replacement String: [parsehtml]\1[/parsehtml]
 
I'm getting this error when running this...
Undefined index: node_id
  1. XenForo_Application::handlePhpError() in XenForo/DataWriter/Discussion/Thread.php at line 402
  2. XenForo_DataWriter_Discussion_Thread::setForumCacheItem() in XenForo/DataWriter/DiscussionMessage/Post.php at line 212
  3. XenForo_DataWriter_DiscussionMessage_Post->setExtraData() in XenForo/DataWriter/DiscussionMessage/Post.php at line 245
  4. XenForo_DataWriter_DiscussionMessage_Post->_getForumInfo() in Tinhte/XenTag/XenForo/DataWriter/DiscussionMessage/Post.php at line 62
  5. Tinhte_XenTag_XenForo_DataWriter_DiscussionMessage_Post->_Tinhte_XenTag_getForumInfo() in Tinhte/XenTag/XenForo/DataWriter/DiscussionMessage/Post.php at line 142
  6. Tinhte_XenTag_XenForo_DataWriter_DiscussionMessage_Post->_setInternal() in XenForo/DataWriter.php at line 645
  7. XenForo_DataWriter->set() in PostReplace/ControllerAdmin/PostReplace.php at line 40
  8. PostReplace_ControllerAdmin_PostReplace->actionReplace() in XenForo/FrontController.php at line 347
  9. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  10. XenForo_FrontController->run() in /var/www/vhosts/xxxxxxxxxxx/httpdocs/admin.php at line 1
Will it work on 1.4?
 
Dear friens, I have a problem, I import Mybb to Xenforo and I need to change the attachment code to xenforo code:
In Mybb I have:

Code:
[attachment=xxxxx]

I need to change to xenforo code:

Code:
[ATTACH=full]xxxxx[/ATTACH]

How I can made this with Post Content Find & Replace?
Thanks.
 
It works with
Code:
#album\.php\?albumid\=([0-9]+)\&attachmentid\=([0-9]+)#siu
and replacement string
Code:
index.php?media/albums/\1
:)
 
I was wondering if anyone would be able to help me with the following.

After an import, I have two cases where the quote tags have become malformed, but I don't know if they can be treated as one when I come to do the find and replace.

1.) For the following, the link and date attributes can be ignored (removed), and the author can be retained (ideally, but not absolutely necessary).

Code:
[quote author=glasshouse link=1150111054/0#7 date=1150151926]

How it should appear (if the username is not easily recoverable from the above, then just an open and close quote would suffice):

Code:
[QUOTE=glasshouse]


2.) In the second case, the quote tag closes before the author name, and then closes again.

In the example below there are three (nested) open quote tags, with three close quote tags. Again, the link and date parts can be removed, to be left with just the author (the author appears after the quote tag and before the link attribute).

Code:
[quote] glasshouse link=1142890417/0#43 date=1156429613][quote] spatular link=1142890417/0#42 date=1156426776][quote] Gilead link=1142890417/0#38 date=1156394138]
[/quote][/quote][/quote]

Thank you for any help.
 
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.
 
Back
Top Bottom