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

Simple & Helpful class to list questions with the answers from Q2A powered sites. The class should work with most of the Q2A sites that are not have big changes in the design with the 1.6 SNOW Theme it should working fine. Also by using foreach loop you can add the entries that were returned as an array to the database you'll find all about the usage of the class in Example.php

Github : https://github.com/kingofseo/Question2answer-Class

Follow me and you'll get more suprised.

+1 It is a good challenge. You extract the data with regular expression from HTML. However, there may be a method of converting from array to XML. These ideas will be a basis for external API of Q2A. But unfortunately, users who can understand this meaning may be a little...
i tested your class and it works fine. I was thinking about a possible scenario with your class but i got confused along the way. The scenario is this; Lets say you are launching a new q2a community for a particular niche. You have zero users and zero questions. You need about 500 - 1000 questions with their answers from a group of q2a websites in the same niche as yours to form the base of your community. How can you achieve that with your class? Before you can form a powerful q2a community, you might need a certain number of questions and answers and some number of fake users to mimic a community. This is what will attract your real users into registering and then staying. So in short, how can one  make a plugin that pulls a certain number of questions with their corresponding answers from one q2a instance to the another and more importantly, how can the question and their corresponding answers be dumped into the database of the plugin user using your class. This is more like a content grabber for q2a. Although such a plugin might raise a lot of copyright issues in relating to content ownership, i believe it will be necessary for anyone starting a community on q2a. The best way to build a community with limited resources is by faking a community. I am just an advance user and not a programmer but i just want to know if it can be done and if possible how. Thank you very much.
Thank you for your comment.Why XML ? When i'm inserting the questions into the database but i could setup and external server for receving the questions with their answers and you can simply adding the questions and in much less time.
@Clement Free The best method were to spin (change words) the questions with their answers and after add to database so you're not getting any copyright issues with site owners but i could also make an cli fast import for importing questions with their answers so you would win more time and insert all in less time.
@kingofseo, Thanks for your reply. I understand what you just said but i am really lost with the code. Can you help me with the coding of question and answer importer with your class with or without spinning the original content. I hope i am not asking too much since i do not really know how much trouble you might have to go through.....

1 Answer

0 votes
Any demo for this ?
Yes https://github.com/kingofseo/Question2answer-Class here you can look at the examples of the class usage you can check both 1x with form example and 1x with simple foreach loop.