XF 2.3 Content unfurl'ing

Taylor J

Well-known member
Where would be the best place to look to see how I would make it so blogs/blogPosts links are unfurl'ed in a thread post? I thought it had something to do with embed_resolvers but after attempting that I'm not so sure of that anymore.

Also vice versa, where should I look for examples on how to get unfurling/urls to work in blogPosts? Along with the above I am also stumped on getting urls to automatically be replaced with a url bb code.
 
Where would be the best place to look to see how I would make it so blogs/blogPosts links are unfurl'ed in a thread post? I thought it had something to do with embed_resolvers but after attempting that I'm not so sure of that anymore.
I might be wrong, but I think you don't need to do anything for urls in a post to unfurl, except to set an option in acp to unfurls urls.
 
Also vice versa, where should I look for examples on how to get unfurling/urls to work in blogPosts? Along with the above I am also stumped on getting urls to automatically be replaced with a url bb code.
do you use the message preparer service when saving BBCode?

PHP:
$preparer = \XF::service(
    \XF\Service\Message\PreparerService::class,
    'note',
    $note
);
$note->content = $preparer->prepare($input);
$preparer->pushEntityErrorIfInvalid($note, 'content');
 
I might be wrong, but I think you don't need to do anything for urls in a post to unfurl, except to set an option in acp to unfurls urls.
1724965224148.webp

My blogPosts have metadata included, I think, so I'm not sure why they aren't unfurling...

do you use the message preparer service when saving BBCode?

PHP:
$preparer = \XF::service(
    \XF\Service\Message\PreparerService::class,
    'note',
    $note
);
$note->content = $preparer->prepare($input);
$preparer->pushEntityErrorIfInvalid($note, 'content');
I had a typo in my prepare method call, pointing this out made me go back to look and I noticed the typo right away so now at least they are working in blog posts.
 
I hardly can see anything on a picture you posted )

Did you check metadata with some tool? Maybe a typo, too?
 
Pretty sure metadata is setup properly on my blogs/blog posts but also not sure that has anything to do with a url getting unfurled properly.
 
just a fyi. some domains just do not unfurl properly on xenforo. some big sites like reuters, cnn or washington post. some sites have issues coz the title tag is not in top area of the html code. other sites block requests based on different parameters. but generally speaking. most sites do unfurl properly.
 
Content unfurling was actually working the entire time just not on my local install...

But I do have to somehow get it styled and used in the same way if it's local content being unfurled.

1725041381467.webp
 
Back
Top Bottom