Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
720 views
in Q2A Core by
I have two websites. I want to use a single database. Only the qa_options database will be different. Where do I change from website files?

2 Answers

+4 votes
by
selected by
 
Best answer

I'm not entirely sure of the purpose of what you're trying to achieve.

If you mean having two separate Q2A websites with different questions, you will want to look at the QA_MYSQL_USERS_PREFIX option in qa-config.php. On your second site, set a different table prefix but set the users prefix to the same as the first site. Example here.

If you mean both sharing the same users, questions, everything besides some options it's a bit more difficult. But in theory it could be done with a function override plugin for qa_load_options_results. That function takes the options from the database and sets them into the $qa_options_cache global variable. So in your override you can change whatever options you wish for your second site.

by
Yes i mean both sharing the same users, questions, everything besides some options it's a bit more difficult.

Trying. Thank you
by
I want everything is the same just qa_options tables different. Example
1. site qa_options
2. site qa_options2 (like this.)
The second site will get options from different table.
by
i find variable ^options
Did I change all files that ^options2

:) is this good solution?
by
moved by
I did. It works fine. Only the options database is different.
by
thanks,
i also changed the ^options and made a copy of it in database
now i have 2 websites in different language with one database
+2 votes
by
by
Thank you for answering. but this solution just same users.
by
> Only the qa_options database will be different.
what is the purpose of this?
by
i have to two domains. My first domain bought 10 years ago. http://www.simgesel.com but i buying new domain http://www.ruyadaruya.com . Same user, same posts, same answers . But xml or any mail script or any extensions have some problems,

sorry for my bad english
...