Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
996 views
in Q2A Core by
Hi,

Since Q2A does not allow any PHP coding in Q2A-Pages, I have made a PHP page separtely. But I want to show it as a part of  Main Q2A.
To give it a similar appearance, i think I will need to include, at least header (with ability to show login/register or points, depending on the case whether user is logged in or not), background and footer, in my PHP file.

But, I don't know how to achieve that? Also, what else will I have to include? A short code-demo would be helpful.

I have looked into similarly asked questions too, but couldn't find any satisfactory answer.

Also, if it has any relevance with theme used, then demo for Snow theme will be helpful.

Thanks. Regards,
Q2A version: 1.6.3

1 Answer

0 votes
by
To use custom PHP code in Q2A you should create a plugin. In your example it sounds like you'd want a page plugin - see http://www.question2answer.org/plugins.php

Alternatively, check the page for accessing Q2A from external PHP code - http://www.question2answer.org/external.php
by
Thanks for your reply. sorry to say i dont have programming background (infact i am medical doctor, which means completely opposite stream :P), so i failed to create a plugin for q2a. anyways i am able to understand the external php code. so i will look into it. It would be a great help, if you could guide me, what should i include in "require_once" for giving same theme appearance to my php page, which is of my q2a site. thanks again.
...