From version 1.4, Question2Answer offers out-of-the-box integration with your WordPress 3.x site and user database. To install Question2Answer as part of your WordPress site, please follow the instructions below:
unzip in the Unix shell).qa-config-example.php in the unzipped question2answer folder, and rename it to qa-config.php.qa-config.php in a text editor and insert the following line next to another define(...) in the file:
define('QA_WORDPRESS_INTEGRATE_PATH', '/PATH/TO/WORDPRESS');
Replace /PATH/TO/WORDPRESS in the example with the full path to the WordPress 3.x directory on your server, i.e. the directory which contains wp-load.php. You do not need to set your MySQL database details in qa-config.php since these are imported from WordPress automatically. Q2A and WordPress will use separate tables within the same MySQL database.
http://www.mysite.com/qa/), create the subdirectory inside the root directory for the site, then move or upload all the contents of the unzipped question2answer folder into this subdirectory.http://qa.mysite.com/), move or upload all the contents of the unzipped question2answer folder into the root directory for that domain on your web server.http://www.mysite.com/qa/ under http://www.mysite.com/) then nothing needs to be done.http://www.mysite.com/qa/ and http://www.mysite.com/blog/), then add the following line at the start of the WordPress wp-config.php file:
define('COOKIEPATH', '/');
http://qa.mysite.com/ and http://blog.mysite.com/) then it's a little more complicated:
wp-config.php file, replacing .mysite.com with a period (.) followed by the partial domain name which is shared by both sites:
define('COOKIEPATH', '/');
define('COOKIE_DOMAIN', '.mysite.com');
wp-config.php file, replacing qa.mysite.com with the full domain name for your Q2A site:
/** To allow redirection from WordPress login to Question2Answer **/
add_filter('allowed_redirect_hosts', 'qa_wordpress_redirect_hosts');
function qa_wordpress_redirect_hosts($content) {
$content[] = 'qa.mysite.com';
return $content;
}
http://www.mysite.com/qa/http://qa.mysite.com/