XF 2.0 Preserve links in bbCode using Thread\Creator?

jjff

Member
Hi guys, sorry for yet another question.

I've followed @Chris D 's instructions from here: https://xenforo.com/community/threads/how-to-create-thread-from-php.158924/

And got this working now, threads are created perfectly using the XF:Thread\Creator service.

I just have one problem.

I'm setting the content on the Tread Creator as such : $creator->setContent($title, $bbcode, true);

But when the thread is posted, all the link text are gone!

What's going on, does anyone know? I've tested the user posting a thread manually and their links remain, so the user does have permission to post links. But when the user is used automatically to post a thread via PHP, links disappear.

Any pointers greatly appreciated. Thanks once more for all the help.
 
LOL once again just after posting here I got the solution myself.

My links were relative [ url = /relative ] and XF removed the invalid links. I made them into full https : / / hostincluded /relative link and it works now.

Leaving this here in case others have the same issue. Thanks again.
 
Back
Top Bottom