EzDevInfo.com

question2answer

Question2Answer is a free and open source platform for Q&A sites, running on PHP/MySQL.

errors while building the android source code

I am trying to build the android source code in ubuntu 13.10, but I got so many errors I have solved some of them then I got stucked . Now I want your help to build the android source code,

before to that I will tell my system specification : I am using Pentium D machine with 4 GB RAM with 50 GB free space in hard drive using ubuntu 13.10 which is of 64 bit OS

And what are the packages I have installed

Python 2.7.5+, GNU Make 3.81, java version "1.6.0_45" 

And I have followed the procedure for build such as :

  1. G41M-Combo:~/bin/source $ : source build/envsetup.sh

  2. G41M-Combo:~/bin/source $ : lunch

  3. G41M-Combo:~/bin/source $ : 13

  4. G41M-Combo:~/bin/source $ : make -j3

in 4th step i am using pentium D machine it is of 2 core so i have tried make -j2 also but i did not got much difference i am attaching the errors which i got

No private recovery resources for TARGET_DEVICE manta
host C: acp <= build/tools/acp/acp.c
host C++: libhost <= build/libs/host/pseudolocalize.cpp
host C: libhost <= build/libs/host/CopyFil`enter code here`e.c
i686-linux-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
make: *** Waiting for unfinished jobs....
i686-linux-g++: error trying to exec 'cc1plus': execvp: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/pseudolocalize.o] Error 1
i686-linux-gcc: error trying to exec 'cc1': execvp: No such file or directory
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libhost_intermediates/CopyFile.o] Error 1

your help will be greatly appretiated to me

Thanks in advance


Source: (StackOverflow)

Post to Facebook Page using PHP SDK

I am working on an app where the admin wants every new "post" that's created to go straight to a facebook fanpage that that was created for the website. Such as posting on the wall " has posted a new thread on " and gives the link to visit the thread.

I know how to post to a user's wall, but I am completely unsure of how to post to a certain page, since not every logged in user (using facebook integration by the way) is an admin and capable of doing so.

Normally, I would start with something as follows

                $config = array();
                $config['appId'] = $appId;
                $config['secret'] = $appSecret;

                $facebook = new Facebook($config);

However, that just doesn't work for posting to a page since pages don't have app ids or secrets as far as I can tell. Since I am not even sure how else to instantiate the facebook class at this point, I don't know how to go forward from here.

I can't seem to find any current documentation on this. Even Facebook's API page neglects to show an example with PHP.


Source: (StackOverflow)

Advertisements

Authentication failed : Facebook, google plus login with hybridauth showing code 5 with redirect URL

Hai I am using Hybridauth plugin[q2a-open-login-master] for my question2answer platform site. It works on my previous host and I migrated the pack into new host. So I created new Facebook application and new Google project with that new redirect URL.

Both Facebook and Google-plus login never working now.

Facebook login almost working But in the redirection to my site, Suddenly showing code=5. And checked in error-log file. There showing

 Invalid IPv6 configuration on server, Please disable or get native IPv6 on your server.

And also Google-plus login asking the permission window as offline access. But before that no asking such offline access. And then showing an error

Notice: Undefined variable: adapter in /home/example/public_html/qa-plugin/q2a-open-login-master/qa-open-login.php on line 119

Fatal error: Call to a member function logout() on a non-object in /home/example/public_html/qa-plugin/q2a-open-login-master/qa-open-login.php on line 119

How can I fix this issues. Actually I did not get the exact reason for this issues.

Please help me asap

Thanks


Source: (StackOverflow)

Site crashing, Can't create/write to file '/tmp

I have a site that is using question2answer script and some custom made code. I recently have a problem with the site crashing. The error I get when I open the page is:

Database query error 1 Can't create/write to file '/tmp/#sql_819_0.MYI' (Errcode: 13)

(SELECT 'options' AS selectkey, title, content FROM qa_options) UNION ALL (SELECT 'time', 'db_time', UNIX_TIMESTAMP(NOW()))

All seems to be fine with the tmp permissions: drwxrwxrwt

I don't know when this is happening. If I restart the server everything is working fine and I get no errors. Then, after some time it is happening again. Site is down and all I get is that message.

Really need your help!


Source: (StackOverflow)

500 Error when trying to define path to parent directory

I am trying to integrate Wordpress with Question2Answer so that they both use the same database for users. The instructions for doing this are pretty straight-forward. All I need to do is define the directory for my Wordpress installation in the Question2Answer config file. Unfortunately, no matter how I define the path to the Wordpress directory, I get a 500 error.

The urls for the installations are:

Wordpress: http://stage.example.com

Question2Answer: http://stage.example.com/ask

The directory structure is

Wordpress: public_html/stage

Question2Answer: public_html/stage/ask

Definition:

define('QA_WORDPRESS_INTEGRATE_PATH', '../');

I've tried 100 different ways to define the path to the Wordpress directory in my Question2Answer config file and I keep getting a 500 error. I'm fairly certain that I am defining the path to the directory correctly so I think it must be some sort of permissions or .htaccess problem but I'm not sure what it could be. Any ideas?

Here is the error:

PHP Question2Answer fatal error: Could not find wp-load.php file for WordPress integration - please check QA_WORDPRESS_INTEGRATE_PATH in qa-config.php


Source: (StackOverflow)

How to deploy Question2Answer to the cloud via a Google App Engine instance?

I'm trying to deploy Question2Answer (Q2A) by following this official install guide - where we need to set up

  1. A web server to push Q2A source code to - uploading application folder to App Engine instance matched with this.
  2. A MySQL database and the according log-in account - this is matched by creating and configuring a Cloud SQL instance to work with our app engine instance.

Though I failed to get Q2A run on Google's cloud - as browing the deployed web I get the error as below snapshot.

How would you guys get it deployed successfully?

enter image description here

p.s.

Steps I have made to Q2A's PHP source code

  1. Entering MySQL database access credentials (by following this guide)

enter image description here

  1. Adding app.yaml file so as Google App Engine SDK would deploy Q2A application

enter image description here

The Q2A source code folder I'm working with is as below.

enter image description here


Source: (StackOverflow)

How to integrate search engine of a wiki with a search engine of a QA system?

In a knowledge management project I need to use a wiki engine ( I'm thinking about DokuWiki ) and a Question and Answer system ( I'm thinking about Question2Answer), and I need to create a Search Funcionality that search in both systems (Wiki and QA) and return what has been found. ( Like a Google of the two systems in same time)

Anyone knows a direction to help me how to do it properly?


Source: (StackOverflow)

Adding Font Awesome to Q2A Page Form Buttons

These are not just any buttons I'm talking about.. but the buttons under each question or answer that say "edit", "flag", "ask related question", "answer", etc.

Each of these buttons are under the parent div "qa-q-view-buttons"..

Take this section for example...

Here's what it looks like now:

Current

as well as the HTML of what it looks like now...

<div class="qa-q-view-buttons">
<input name="q_doedit" value="edit" title="Edit this question" type="submit" class="qa-form-light-button qa-form-light-button-edit">
<input name="q_doclose" value="close" title="Close this question to any new answers" type="submit" class="qa-form-light-button qa-form-light-button-close">
<input name="q_dohide" onclick="qa_show_waiting_after(this, false);" value="hide" title="Hide this question" type="submit" class="qa-form-light-button qa-form-light-button-hide">
<input name="q_doanswer" id="q_doanswer" onclick="return qa_toggle_element('anew')" value="answer" title="Answer this question" type="submit" class="qa-form-light-button qa-form-light-button-answer">
</div>

by doing some simple HTML editing.. I'm able to add Font Awesome to these buttons very easily.

Here's some modifications I can make to do EXACTLY what I desire.

<div class="qa-q-view-buttons">
<button name="q_doedit" value="edit" title="Edit this question" type="submit" class="qa-form-light-button qa-form-light-button-edit">
<i class="fa fa-edit"></i> Edit</button>
<button name="q_doclose" value="close" title="Close this question to any new answers" type="submit" class="qa-form-light-button qa-form-light-button-close">
<i class="fa fa-close"></i> Close </button>
<button name="q_dohide" onclick="qa_show_waiting_after(this, false);" value="hide" title="Hide this question" type="submit" class="qa-form-light-button qa-form-light-button-hide">
<i class="fa fa-eye-slash"></i> Hide</button>
<button name="q_doanswer" id="q_doanswer" onclick="return qa_toggle_element('anew')" value="answer" title="Answer this question" type="submit" class="qa-form-light-button qa-form-light-button-answer">
<i class="fa fa-comment"></i> Comment</button>
</div>

Which ends up looking like this..

New

The only issue? Q2A isn't directly HTML-editable.. I made these changes in the "Inspect Element" --> "Edit as HTML" section of the Source Editor on Google Chrome. That means I am going to need to sort through Q2A's qa-theme-base.php file and edit it directly with PHP code, right?

Can anyone point me in the right direction? I have no idea where to start.


Source: (StackOverflow)

why display css code in the content in Safari of quesiton2answer system?

I installed questio2answer on my mac and i login by Safari and ask a question, after posted the question, i view the question, there is a strange line in the content:

next_pages_container { width: 5px; hight: 5px; position: absolute; top: -100px; left: -100px; z-index: 2147483647 !important; } test question

but it's works fine if i use Chrome.

I think this code line is a css code, i don't know why it's display in the content.

Anybody can help me? thanks.


Source: (StackOverflow)

How can integrate tinypic with ckeditor (wysiwyg)?

I am having website that uses Question2answer Script,now what i want is to integrate tinypic to upload images ? How is it possible in my site is using wysiwyg editor.

Thanks alot in advance for helping


Source: (StackOverflow)

QA Algorithm for Q Processing

What Algorithm/method do I use for a Question Answering System's Question Processing?

I have been searching possible algorithms for my Question Answering System, the only thing that I think that would be possible to use is Parsing but I have asked about parsing in my last question and with the answers there i think its not possible to be used?(I'm not sure).

My idea of using Parsing is by Cutting the question into pieces word per word and then it will go through a Storage of Words that would determine what Kind of Word(noun,adjective,verb,etc) is being said. My purpose of using Parsing is to remove or rather to determine the Topic of the question.

The other idea of mine is the ChatterBot. A Chatterbot uses a query of words? Correct me if I'm not mistaken and those words are assigned to another Word. It would randomly choose a word from its Query.

Example: User's Statement: Hello > ChatterBot's Possible Replies: Hi,Hello,Hey

I'm not quite sure what is the possible method/algorithm to use in a Question Answering, I have read the Wikipedia post : http://en.wikipedia.org/wiki/Question_answering but I do not quite understand what algorithm to use in Question Processing.

Thank you.

PS: I'm developing in Javascript. Q = Question


Source: (StackOverflow)

Rewrite URL on Glassfish with Quercus' PHP

I have Glassfish 3 server and have added Quercus 4.0.7 to to be able to run PHP applications on it. Everything works perfectly with it. Now I'm trying to run Question2Answer application on my server. I was able to open application but it's not allowing me to navigate from page to page because they are using .htaccess file to rewrite the URL. I was wondering how do we rewrite the URL in this case?

Here is what Question2Answer's .htaccess has inside:

DirectoryIndex index.php
RewriteEngine On
#RewriteBase /your-sub-directory
RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
RewriteRule . %1/%2 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L]

Do you have any solutions for that?


Source: (StackOverflow)

Use Drupal search to search Q2A and PHPBB content

Q2A and PHPBB are 2 branches of my main website.

In other words..

website.com/q2a

and

website.com/phpbb

...

When I use the login box on any of the 3 branches, I want the SSO to log me in to all 3 branches.

When I use the search box on any of the 3 branches, I want it to search content from all branches.

When I click on a user profile on any of the 3 branches, I want it to always go to the same user profile page.

Is this possible? How?

Will I need to make a custom CMS and a custom Q&A PHP Script and a Custom Forums?


Source: (StackOverflow)

How to setup multiple Q/A sites and load questions from one or several sites at a time

I'm making Q/A for high school students using question2answer CMS by setting up a copy of CMS for every subject. Most of the students know well and can contribute more than in one topic, so I want to make them able to select topics in which they want to participate. This would be done in ajax, when subject name is clicked, All activity, Questions, Hot, Unanswered, Tags would be updated to include all selected sites.

Example of what I'm talking about looks like that.

enter image description here

I want to know how to achieve this, any ideas ?

P.S. I can see I may be able to easier achieve this by tweaking built-in categories, but I plan expanding to even more diverse Q&A sites later and want to be able to have stand-alone site with one topic, as well as one page to filter from which site's databases to load questions, tags, users and other info.

Despite how to do it, I'm no less interested how hard would it be to do updating data from customly selected set of databases, or should I work on same db with different prefixes, or what is the best way to implement this ?


Source: (StackOverflow)

Allowed memory size exhausted but memory_get_peak_usage says otherwise

On my server I have the following error:

Allowed memory size of 268435456 bytes exhausted

This happens in a loop (a foreach one) and when I'm checking the memory usage in the loop with

memory_get_peak_usage();

I obtain 7254128 which is far from the 268435456 exhausted!

I checked at multiple places and the memory usage is not increasing wildly so I really don't know where the problem is!

The same script is working just fine on my local computer where I setted the memory limit to only 16M in my php.ini file

Here is the code causing the problem, but i think it won't be really usefull, it's from a plugin of question2answer open source plateform:

foreach ($badges as $slug => $info) {
    $badge_name=qa_badge_name($slug);
    if(!qa_opt('badge_'.$slug.'_name')) 
            qa_opt('badge_'.$slug.'_name',$badge_name);
    $name = qa_opt('badge_'.$slug.'_name');
}

Source: (StackOverflow)