Giter VIP home page Giter VIP logo

q2a-network's Introduction

Question2Answer Network Sites

Description

This is a plugin for Question2Answer that provides site networking capabilities.

Features

  • adds individual active site icons and site points to user_meta
  • option to restrict "active" to minimum score per site
  • optionally shows network points instead of this site points in user_meta
  • widget lists all sites in network
  • ability to migrate questions, including entire set of children and grandchildren (see Migrating below)
  • show optional migrated notice below questions

Installation

  1. Install Question2Answer
  2. Get the source code for this plugin from github, either using git, or downloading directly:
    • To download using git, install git and then type git clone git://github.com/NoahY/q2a-network.git network at the command prompt (on Linux, Windows is a bit different)
    • To download directly, go to the project page and click Download
  3. Go to Admin -> Plugins on your q2a install, add a new site (see Sites below for notes on this), select the 'Activate Network Sites' option, then 'Save Changes'.

Sites

Networking sites is partially enabled in the core; there are various ways to accomplish this, depending on your site setup. If you are using single-sign-on or Wordpress integration, you are half-way there. If you are not, see the instructions in qa-config.php to set up your sites to user the same qa_users table. Either way, both sets of database tables must be in the same database for this plugin to work.

It is also possible to setup two sites to use the same set of php files, though it is not necessary. To accomplish this, here's what I do:

  1. Place your source Q2A files in a directory outside of your site root, e.g. /home/me/q2a/
  2. Make a new directory somewhere else on your server where your actual q2a site will reside, e.g. /var/www/q2a/

3. Make symbolic links from the source files (not the root directory) to the new directory:

ln -s /home/me/q2a/* /var/www/q2a/

Note: if you are going to use neat urls, copy or link to the original .htaccess as well:

ln -s /home/me/q2a/.htaccess /var/www/q2a/
  1. Copy the original qa-config-example.php to qa-config.php in the new directory
  2. Edit the new qa-config.php file as needed, using a unique table prefix.
  3. Repeat steps 2-5 for each site, making sure the table prefix of each site is unique.

This seems to work with Q2A 1.5 to allow multiple sites to use the same core code, plugins, and themes. If you want to use unique sets of plugins and themes for each site, just delete the symlink for the qa-theme and qa-plugin directories for that site, and replace them with actual directories with actual plugins and themes.

Migrating

Below the main admin form, there is another form to migrate posts. This is experimental, and may lead to data loss, hair loss, dead kittens, etc. This process also moves all children and grandchildren (i.e. answers and comments), votes, flags, and selected answers. It doesn't move related questions, it just unrelates them. It also allows you to set the post category. Once you have migrated a post, you may want to go to the site you migrated to and run all the updates at admin/stats, though the plugin attempts to perform this automatically.

Disclaimer

This is beta code. It is probably okay for production environments, but may not work exactly as expected. Refunds will not be given. If it breaks, you get to keep both parts.

Release

All code herein is Copylefted.

About q2A

Question2Answer is a free and open source platform for Q&A sites. For more information, visit:

http://www.question2answer.org/

q2a-network's People

Contributors

noahy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.