Website Integration Class?

3dfx

New member
I'm deciding between vB and xF right now. vB is a damn legacy at this point, which means it has tons of addon and modification support, however xF comes with many of these addons out of the box, and seems to be going in a better direction.

However before I purchase I must know if there is a class or proper documentation on complete website integration. Searching has yielded some random user submitted code and while that may work it's not officially supported.

~ I'm not interested in downloaded 34,000 different scripts / frameworks to get this running. If it doesn't play well with others out of the box, it's not for me.

~ A little effort from my part is completely acceptable. Though if ALL effort is on my part then there's absolutely no reason to pay.

~ How is skinning with xF?

~ Not interested in a fanboy debate over vB and xF, I'll buy whichever one suits my needs best. Screw IPB.

Thanks guys, hopefully we can make a transaction soon.
 
PHP:
XenForo_Application::disablePhpErrorHandler();

Damn, didn't realise this existed! I currently do pretty much what you've outlined above to import the autoloader into WordPress for my bridge, but I hacked up a
PHP:
$cur_error_rep = error_reporting();
// import XenForo, do session things...
error_reporting($cur_error_rep);
- otherwise the "strict standards" makes all WP pages explode.

I should probably read through the XF stuff more. Is there a public PHPdoc somewhere, or do I have to generate one myself? I think everything in XF is well commented enough.
 
Damn, didn't realise this existed! I currently do pretty much what you've outlined above to import the autoloader into WordPress for my bridge, but I hacked up a
PHP:
$cur_error_rep = error_reporting();
// import XenForo, do session things...
error_reporting($cur_error_rep);
- otherwise the "strict standards" makes all WP pages explode.

I should probably read through the XF stuff more. Is there a public PHPdoc somewhere, or do I have to generate one myself? I think everything in XF is well commented enough.
I think someone did generate a PHPDoc, but it could be outdated. It's probably best to generate your own!
 
I have XenForo installed in a subdirectory such as domain.com/community
I am attempting to display custom pages in a different directory such as domain.com/help

So far I have managed to display these custom pages, however, the information is missing all templates and images (ie. no style).

The code I am using is as follows:
PHP:
$startTime = microtime(true);
$fileDir = '../community';
require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');

XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);

XenForo_Application::$externalDataPath = $fileDir . '/data';
XenForo_Application::$externalDataUrl = $fileDir . '/data';
XenForo_Application::$javaScriptUrl = $fileDir . '/js';

//XenForo_Session::startPublicSession();
//$visitor = XenForo_Visitor::getInstance();

$fc = new XenForo_FrontController(new XenForo_Dependencies_Public());
$fc->run();

Any help in pointing me in the right direction would be much appreciated.
 
A quick update of the previously posted code, I had to add these lines after loading XF, or else I'd get some strange 500/PHP fatal errors with XF 1.1.0 ("Exception thrown without a stack frame in Unknown on line 0" to be exact).
PHP:
restore_error_handler();
restore_exception_handler();
 
If you really need XenForo integrated in your website, you could build an entire product like xfSite does, or just add these lines (which I use on a production website) "globally":

A quick update of the previously posted code, I had to add these lines after loading XF, or else I'd get some strange 500/PHP fatal errors with XF 1.1.0 ("Exception thrown without a stack frame in Unknown on line 0" to be exact).
PHP:
restore_error_handler();
restore_exception_handler();

Seems like this code should have a more important location than just buried in this thread.
Is this code in the developer's section as well ?
 
Is there a tutorial somewhere that describes the process for doing something like what Kier depicts with xfsite?
That is done the same as any other mod pretty much. New routes, controllers, views/templates. They use a sperate XenForo install for the main site so it isn't how you might think.

I already do what Kier does but with the same XenForo install for another website. savagerebirth.com. I want to write tutorials and polish everything I have done so other developers can make good websites 'around' their forums however I can't find the time (and my writing skills are a bit meh).
 
I have XenForo installed in a subdirectory such as domain.com/community
I am attempting to display custom pages in a different directory such as domain.com/help

So far I have managed to display these custom pages, however, the information is missing all templates and images (ie. no style).

The code I am using is as follows:
PHP:
$startTime = microtime(true);
$fileDir = '../community';
require($fileDir . '/library/XenForo/Autoloader.php');
XenForo_Autoloader::getInstance()->setupAutoloader($fileDir . '/library');
 
XenForo_Application::initialize($fileDir . '/library', $fileDir);
XenForo_Application::set('page_start_time', $startTime);
 
XenForo_Application::$externalDataPath = $fileDir . '/data';
XenForo_Application::$externalDataUrl = $fileDir . '/data';
XenForo_Application::$javaScriptUrl = $fileDir . '/js';
 
//XenForo_Session::startPublicSession();
//$visitor = XenForo_Visitor::getInstance();
 
$fc = new XenForo_FrontController(new XenForo_Dependencies_Public());
$fc->run();

Any help in pointing me in the right direction would be much appreciated.

Did you ever get this working? Screengrab of a Xenforo login on an external page would be awesome. I'd like to have a Xenforo login on my wordpress site as a widget.
 
I have been doing things a different way to what I linked above that does it in a different directory too. I have planned to write about it for a while but it seems like a waste of time to.
 
Where would I put this code in Wordpress? I've tried adding to my functions.php but that results in an error about not being able to re-declare a class.

I'm trying to just display some simple stuff like the user avatar, username, post count etc. Nothing to fancy or great.
 
Digital Doctor, while I think you weren't trying to offend anyone, I'd be offended too if you used that dogfood analogy to describe ,my work, especially on my own website :P. That said, it is very interesting to know this, as I too thought they used something else.
 
Hi, it's possible to add documentation for Xenforo integration in Symfony2 please ?

I seek to do this:
~ Login / Logout
~ Topic Pulling
~ User Information Pulling (Name, Avatar, Status, etc...)

1 xenforo board & 1 website symfony2 => 1 account/login.
 
Hello, thank you very much :)

The first code is to be included on all pages?
Have you any idea how to include this code for all pages in Symfony2 please?
 
Top Bottom