Ejemplo n.º 1
0
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');
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('</table>');
$optionForm->output();
Ejemplo n.º 2
0
 */
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');
$optionForm->addHTML('</td></tr>');
$optionForm->addHTML('</table>');
$optionForm->output();
Ejemplo n.º 3
0
// 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');
$optionForm->addHTML('</td><td>');
$optionForm->addHTML('<select id="mode" name="mode">');
$optionForm->addHTML('<option value="ns0-noindex">NOINDEX in main namespace</option>');