Giter Club home page Giter Club logo

q2a-prefill-fields's Introduction

Pre-fill form fields for Question2Answer

A Question2Answer plugin to pre-fill form fields on the Ask a question page using GET parameters.

Features

Supported fields are:

  • title
  • content (only when not using a rich/WYSIWYG editor)
  • tags

Since the user can input arbitrary values as GET parameters, the values are escaped using PHP's htmlspecialchars() function. You can use multiple tags by separating each tag with a + or %20 in the URL.

Example

The following URL, when entered in the browser address bar:

http://localhost:8000/index.php?qa=ask&title=Hello+world&content=something&tags=one%20two%20three

Will result in:

  • Title: Hello world
  • Content: something
  • Tags: one two three (as 3 separate tags, since Q2A separates tags with spaces)

Installation

  • Clone this repository or download a ZIP archive.
  • Move the extracted folder to the qa-plugin/ folder of your Question2Answer installation.
  • Log in as administrator on your Question2Answer instance, navigate to Admin > Plugins and make sure the Prefill Fields plugin is visible and enabled.

License

Copyright © 2020 Hugo Locurcio and contributors

Unless otherwise specified, files in this repository are licensed under the MIT license. See LICENSE.md for more information.

q2a-prefill-fields's People

Contributors

calinou avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

greatdesign

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.