Exemple #1
0
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('Wikidata-Auszeichnungs-Abgleich');
// create new database object
$db = new Database();
// create new request validator
$rq = new RequestValidator();
// get parameters
$rq->addAllowed('GET', 'mode', '', '/^(lesenswert|exzellent|informativ|portal)$/', true);
$par = $rq->getParams();
$page->openBlock('div', 'iw-content');
$page->addInline('p', 'Mit diesem Werkzeug lassen sich Unterschiede zwischen den lokalen Auszeichnungsvorlagen und den Daten auf Wikidata feststellen.');
$page->addInline('h2', 'Optionen');
$optionForm = new HtmlForm('index.php', 'GET');
$optionForm->addHTML('<table class="iw-nostyle">');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('mode', 'Kategorie');
$optionForm->addHTML('</td><td>');
$optionForm->addHTML('<select id="mode" name="mode">');
$optionForm->addHTML('<option value="lesenswert">lesenswerte Artikel</option>');
$optionForm->addHTML('<option value="exzellent">exzellente Artikel</option>');
$optionForm->addHTML('<option value="informativ">informative Listen</option>');
$optionForm->addHTML('<option value="portal">informatives Portal</option>');
$optionForm->addHTML('</select>');
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td colspan="2">');
$optionForm->addButton('submit', 'Abgleichen');
Exemple #2
0
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('Category redirects');
// create new database object
$db = new Database();
// create new request validator
$rq = new RequestValidator();
// get parameters
$rq->addAllowed('GET', 'lang', '', '/^[a-z]{1,7}$/', true);
$rq->addAllowed('GET', 'project', '', '/^[a-z]{1,15}$/', true);
$rq->addAllowed('GET', 'sort', 'name', '/^(name|entries|length)$/');
$par = $rq->getParams();
$page->openBlock('div', 'iw-content');
$page->addInline('p', 'This tool shows a list of categories that redirect to another category in the given project and the number of entries in it.');
$page->addInline('h2', 'Options');
$optionForm = new HtmlForm('index.php', 'GET');
$optionForm->addHTML('<table class="iw-nostyle">');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('lang', 'Language');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('lang', $par['lang'], 'Language code of the project, e.g. de', 7, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('project', 'Project');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('project', $par['project'], 'Project code, e.g wikipedia', 20, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td colspan="2">');
$optionForm->addButton('submit', 'View categories');
Exemple #3
0
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('Useless defaultsorts');
// create new database object
$db = new Database();
// create new request validator
$rq = new RequestValidator();
// get parameters
$rq->addAllowed('GET', 'lang', '', '/^[a-z]{1,7}$/', true);
$rq->addAllowed('GET', 'project', '', '/^[a-z]{1,15}$/', true);
$par = $rq->getParams();
$page->openBlock('div', 'iw-content');
$page->addInline('p', 'This tool generates a list of DEFAULTSORT keys that match the page title exactly.');
$page->addInline('h2', 'Options');
$optionForm = new HtmlForm('index.php', 'GET');
$optionForm->addHTML('<table class="iw-nostyle">');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('lang', 'Language');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('lang', $par['lang'], 'Language code of the project, e.g. de', 7, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('project', 'Project');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('project', $par['project'], 'Project code, e.g wikipedia', 20, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td colspan="2">');
$optionForm->addButton('submit', 'View useless defaultsorts');
Exemple #4
0
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('Contributors');
// create new database object
$db = new Database();
// create new request validator
$rq = new RequestValidator();
// get parameters
$rq->addAllowed('GET', 'lang', '', '/^[a-z]{1,7}$/', true);
$rq->addAllowed('GET', 'project', '', '/^[a-z]{1,15}$/', true);
$rq->addAllowed('GET', 'page', '', '', true, false);
$rq->addAllowed('GET', 'since', '0000-00-00', '/^\\d{4}-\\d{2}-\\d{2}$/', false, false);
$rq->addAllowed('GET', 'until', '0000-00-00', '/^\\d{4}-\\d{2}-\\d{2}$/', false, false);
$par = $rq->getParams();
$page->openBlock('div', 'iw-content');
$page->addInline('p', 'This tool creates a list of contributors to a given article on a given project in wikitext.');
$page->addInline('h2', 'Options');
$optionForm = new HtmlForm('index.php', 'GET');
$optionForm->addHTML('<table class="iw-nostyle">');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('lang', 'Language');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('lang', $par['lang'], 'Language code of the project, e.g. de', 7, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('project', 'Project');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('project', $par['project'], 'Project code, e.g wikipedia', 20, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('page', 'Page title');
Exemple #5
0
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('hgztools');
$page->openBlock('div', 'iw-content');
$page->addInline('h2', 'Tools for all Wikimedia projects');
$page->openBlock('ul');
$page->addInline('li', '<a href="botstatistics/">Bot statistics</a>');
$page->addInline('li', '<a href="categoryredirects/">Category redirects</a>');
$page->addInline('li', '<a href="contributors/">Contributors tool</a>');
$page->addInline('li', '<a href="pagepropmaintenance/">Page prop maintenance</a>');
$page->addInline('li', '<a href="uselessdefaultsorts/">Useless defaultsorts</a>');
$page->addInline('li', '<a href="uselessprotections/">Useless protections</a>');
$page->closeBlock();
$page->addInline('h2', 'Tools for German Wikipedia');
$page->openBlock('ul');
$page->addInline('li', '<a href="wikidata-badges/">Wikidata-Auszeichnungs-Abgleich</a>');
$page->closeBlock();
$page->addInline('p', 'Contact: ' . Hgz::buildWikilink('de', 'wikipedia', 'User talk:Hgzh', 'hgzh @ de.wikipedia') . ', Source: <a href="https://github.com/hgzh">hgzh @ github.com</a>');
$page->closeBlock();
$page->openBlock('div', 'iw-content');
Exemple #6
0
 */
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('Bot statistics');
// create new database object
$db = new Database();
// create new request validator
$rq = new RequestValidator();
// get parameters
$rq->addAllowed('GET', 'lang', '', '/^[a-z]{1,7}$/', true);
$rq->addAllowed('GET', 'project', '', '/^[a-z]{1,15}$/', true);
$rq->addAllowed('GET', 'sort', 'ec', '/^(name|reg|ec)$/');
$rq->addAllowed('GET', 'dir', 'desc', '/^(asc|desc)$/');
$par = $rq->getParams();
$page->openBlock('div', 'iw-content');
$page->addInline('p', 'This tool generates a list of bots in a given project with their total editcount and registration date.');
$page->addInline('h2', 'Options');
$optionForm = new HtmlForm('index.php', 'GET');
$optionForm->addHTML('<table class="iw-nostyle">');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('lang', 'Language');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('lang', $par['lang'], 'Language code of the project, e.g. de', 7, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('project', 'Project');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('project', $par['project'], 'Project code, e.g wikipedia', 20, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td colspan="2">');
$optionForm->addButton('submit', 'View statistics');
Exemple #7
0
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('Page prop maintenance');
// create new database object
$db = new Database();
// create new request validator
$rq = new RequestValidator();
// get parameters
$rq->addAllowed('GET', 'lang', '', '/^[a-z]{1,7}$/', true);
$rq->addAllowed('GET', 'project', '', '/^[a-z]{1,15}$/', true);
$rq->addAllowed('GET', 'mode', '', '/^(ns0\\-noindex|ns0\\-index|ns0\\-noeditsection|ns0\\-newsectionlink|staticredirect)$/', true);
$par = $rq->getParams();
$page->openBlock('div', 'iw-content');
$page->addInline('p', 'This tool allows to get information about some probably misused magic words in a specific project.');
$page->addInline('h2', 'Options');
$optionForm = new HtmlForm('index.php', 'GET');
$optionForm->addHTML('<table class="iw-nostyle">');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('lang', 'Language');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('lang', $par['lang'], 'Language code of the project, e.g. de', 7, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('project', 'Project');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('project', $par['project'], 'Project code, e.g wikipedia', 20, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('mode', 'Mode');
Exemple #8
0
require_once '/data/project/hgztools/public_html/general.php';
// create new page object
$page = new HtmlPage('Useless protections');
// create new database object
$db = new Database();
// create new request validator
$rq = new RequestValidator();
// get parameters
$rq->addAllowed('GET', 'lang', '', '/^[a-z]{1,7}$/', true);
$rq->addAllowed('GET', 'project', '', '/^[a-z]{1,15}$/', true);
$par = $rq->getParams();
$page->openBlock('div', 'iw-content');
$page->openBlock('p');
$page->addHTML('This tool shows pages that meet the following criteria:');
$page->openBlock('ol');
$page->addInline('li', 'The page is protected from moves through non-autoconfirmed users');
$page->addInline('li', 'The page is not protected from editing through non-autoconfirmed users or sysops');
$page->closeBlock();
$page->addHTML('In most wikis, the autoconfirmed right is required for moving pages, so a single move protection for non-autoconfirmed users will never be effective.');
$page->closeBlock();
$page->addInline('h2', 'Options');
$optionForm = new HtmlForm('index.php', 'GET');
$optionForm->addHTML('<table class="iw-nostyle">');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('lang', 'Language');
$optionForm->addHTML('</td><td>');
$optionForm->addInput('lang', $par['lang'], 'Language code of the project, e.g. de', 7, true);
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('<tr><td>');
$optionForm->addLabel('project', 'Project');
$optionForm->addHTML('</td><td>');