VoiceHub is a very simple web widget to permit your users to submit requests and feedback to your GitHub's repository issues tracker directly from an arbitrary web page.
It is self-contained in a single PHP script handling both generation of the widget and publishing of the contents, so you can host wherever you need.
vh.js.php
file where you needconf.sample.php
to conf.php
and edit it accordingly your needs. You can even put the $copy
array on top of vh.js.php
<body>
tag (and after inclusion of jQuery, from which VoiceHub depends), include the file as a Javascript file, for example
<script type="application/javascript" src="http://yourhost.com/folder/vh.js.php"></script>
Remember: if the web domain under which you host your copy of vh.js.php
is not the same of the desidered web page, you need to add CORS support on your server. Here you find useful informations for every kind of web server.
username
Username to be used to publish contents on GitHub.
password
GitHub account's password for the above mentioned username.
default_project
The default GitHub project against which publish incoming issues, if no project parameter is used while including the Javascript widget.
fixed_project
If set, it overrides all other internal and external configurations about the GitHub project for which publish incoming issues.
project
The GitHub project you want to publish an issue against, in the form 'username/projectname'. If the fixed_project parameter is set in the configuration file, this is ignored.
lang
Preferred language for the user widget. Actually are supported the values 'en' (default) and 'it'.
You can eventually use the provided public instance, configuring it inline with your target GitHub repository location. It will post new issues with the dummy VoiceHub account.
<script type="application/javascript" src="http://vh.madbob.org/vh.js.php?project=username/repository"></script>
Also, if you don't like the default widget, you can provide your own form to serialize and send asynchronously on POST.
<form method="POST" action="http://vh.madbob.org/vh.js.php"> <input name="project" value="username/repository" type="hidden"> <input name="title" value="" required="" autocomplete="off" type="text"> <textarea name="contents" autocomplete="off"></textarea> <button type="submit" class="btn btn-success">Send</button> </form>
VoiceHub is distributed by Roberto Guido under the terms of GPLv3.