Abracadaniel
Member
Hi there,
Having *.php file in the same dir as Xenforo Installation.
It's getting last posts from mySQL, and rendering their BBcode. Code is below.
Everything works smoothly, except for image attachments.
They`re appearing as:
Guests have permission to view attachments.
I tried to play with "$this->_view", but didn't understand what can be done here to make render show picture.
Would be glad for any advice. Thanks!
Have a good day.
Having *.php file in the same dir as Xenforo Installation.
It's getting last posts from mySQL, and rendering their BBcode. Code is below.
Everything works smoothly, except for image attachments.
They`re appearing as:
View attachment 13210
View attachment 13211
View attachment 13212
View attachment 13211
View attachment 13212
Guests have permission to view attachments.
I tried to play with "$this->_view", but didn't understand what can be done here to make render show picture.
Would be glad for any advice. Thanks!
Have a good day.
PHP:
require '/var/www/domain.com/web/library/XenForo/Autoloader.php';
XenForo_Autoloader::getInstance()->setupAutoloader('/var/www/domain.com/web/library');
XenForo_Application::initialize('/var/www/domain.com/web/library', '/var/www/externaldomain.com/cron');
XenForo_Application::set('page_start_time', $startTime);
$formatter = XenForo_BbCode_Formatter_Base::create();
$parser = new XenForo_BbCode_Parser($formatter);
$parsed_message = $parser->render($message);
echo $parsed_message;