Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
835 views
in Q2A Core by

I followed the external access example and it got it to work in a smarty template:

 

{php}
	require_once '/PATH/TO/qa-include/qa-base.php';

	require_once QA_INCLUDE_DIR.'qa-app-users.php';
	require_once QA_INCLUDE_DIR.'qa-app-cookies.php';
	require_once QA_INCLUDE_DIR.'qa-app-post-create.php';
	
	$title='Why do birds sing?';
	$content='And why do they fall in love?';
	$tagstring='birds,sing,love';
	
	qa_question_create(null, qa_get_logged_in_userid(), qa_get_logged_in_handle(), qa_cookie_get_create(),
		$title, $content, '', $content, $tagstring, false, null, null);

{/php}

But know I want to output parts of q2a on that website. Lets say the QUESTION BOX or a QUESTION LIST.

I included 

require_once QA_INCLUDE_DIR.'qa-theme-base.php';

and tried to load functions like

body()

But it does not work.

I would be happy if someone could give me an example how this call should look.

I basically want the main area of my questions site showing up on my normal site.

No footer, no header, no sidebar.

Any idea  how is the syntax for that ?

The original example works execellent and fills with each reload a new question on my qna site.

Q2A version: 1.5
by
I'm actually working on something that may help you with this. I will post here when it's in a usable state :)
by
Meanwhile I understood better how to use this external integration, but if I am right it would be like rewriting the script using all or many of the functions. I thought it would be like simply adding the parts of the theme one needs and done... as it is now, it is far beyond my knowledge...

So, if You get closer to a working solution I am interested.
The possibility to use extrenal integration is an excellent feature. Hope that there is a lot of interest in developing in this direction.

Thank You for the moment !

Please log in or register to answer this question.

...