XF 1.2 IPB Emoticons

Kravitz

Member
Howdy all!

I just converted an IPB forum to Xenforo, and I'm wondering if there is a way to fix broken emoticons.

ipb-emoticon.webp

I get this as a path when I right-click to view: /public/style_emoticons/<#EMO_DIR#>/biggrin.png

Can this be fixed?

Thanks!
 
The path actually contains <#EMO_DIR#>?

That could be a bug in the importer but I'm not familiar enough with IPB to say for sure.

However, you should be able to alter the path in the Admin CP > Smilies.

Each smiley has an "Image replacement URL". I imagine you will just need to update that to reflect the correct path to the smilies.
 
They're likely actual img tags rather than smilies (since we don't import smiley definitions).

I think the only option might be to do post content replaces to change them -- I'd say preferably into their actual smiley text.
 
They're likely actual img tags rather than smilies (since we don't import smiley definitions).

I think the only option might be to do post content replaces to change them -- I'd say preferably into their actual smiley text.
You're right, Mike, they're showing up as img tags.

I downloaded and installed Kier's 'Post Content Find / Replace' add-on, but I'm not sure what I need to input.

What exactly would I enter into the boxes if I wanted to change every instance of
Code:
[IMG]http://www.myurl.com/public/style_emoticons/<#EMO_DIR#>/xxx.png[/IMG]
to
Code:
[IMG]http://www.myurl.com/images/emoticons/xxx.png[/IMG]

Thanks!
 
What Mike is saying is, he suggests that you replace the IMG tags with the text that would automatically parse the smiley in the post.

So if the IMG is currently:

[IMG]http://www.myurl.com/public/style_emoticons/<#EMO_DIR#>/biggrin.png[/IMG]

Presumably you would want to replace that with:

:D

So the regex is something like this (please test thoroughly):

upload_2014-2-26_15-25-12.webp

The above presumes that every problem URL contains <#EMO_DIR#> and you would just need to run it for each smiley image.

So the above example is...

Regular expression:
Code:
/\[IMG\](.*?)<\#EMO_DIR\#>\/biggrin.png\[\/IMG\]/is
Replacement:
Code:
:D

Again, presumably the next one would be...

Regular expression:
Code:
/\[IMG\](.*?)<\#EMO_DIR\#>\/smile.png\[\/IMG\]/is
Replacement:
Code:
:)

I have two posts containing the biggrin example:

upload_2014-2-26_15-27-54.webp

After the replacement it looks like:

upload_2014-2-26_15-28-32.webp
 
Thanks, Chris! Appreciate your help.

Unfortunately, we kinda' went a bit crazy with the emoticons on our IPB board and we let them get out of control...This might be the perfect opportunity to scale back.

I'd like to keep it simple this time around, but I'd also like to retain the ones in our older posts so they're not broken.

Would it be possible to move the old smilies to another directory (like /images/emoticons/) and replace the /public/style_emoticons/<#EMO_DIR#>/ path so it points to the correct folder?

Again, thank you for the help.
 
Sorry, I missed this one.

Yes move the old smilies to another directory. The find replace should look something like:
Find:
Code:
/\/public\/style_emoticons\/<\#EMO_DIR\#>\//is

Replace:
Code:
/images/emoticons/

I haven't tested that, but of course there is a built in test function in that add-on so you can visually see the changes that will be made before you commit to them.

If you get any timeouts while you're saving the changes (possible if there's a lot of posts or stringent memory/run limits) just keep repeating over and over. Between each timeout it will be doing stuff.
 
Back
Top Bottom