PHP Xml::label Examples

Programming Language: PHP
Class/Type: Xml
Method/Function: label
Examples at hotexamples.com: 30
PHP has many built-in functions for working with XML, including simplexml and DOMDocument. These functions make it easy to create, manipulate, and parse XML data.

Here are some examples:

1. Creating an XML file using simplexml:

$xml = new SimpleXMLElement('');
$movie = $xml->addChild('movie');
$movie->addChild('title', 'The Shawshank Redemption');
$movie->addChild('year', '1994');
$movie->addChild('director', 'Frank Darabont');

This code creates an XML file with a root element of ``, and adds a child element `` with three child elements ``, `<year>`, and `<director>`.<br><br>2. Parsing an XML file using DOMDocument:<br><br>$xml = new DOMDocument();<br>$xml->load('movies.xml');<br>$movies = $xml->getElementsByTagName('movie');<br>foreach ($movies as $movie) {<br> $title = $movie->getElementsByTagName('title')->item(0)->nodeValue;<br> $year = $movie->getElementsByTagName('year')->item(0)->nodeValue;<br> $director = $movie->getElementsByTagName('director')->item(0)->nodeValue;<br> echo "$title ($year) - $director\n";<br>}<br><br>This code loads an XML file called `movies.xml` and gets all the child elements of `<movie>`. For each movie, it retrieves the values of the `<title>`, `<year>`, and `<director>` elements and prints them out.<br><br>The package library used in these examples is the default PHP extension for XML processing.</div> <strong>PHP Xml::label - 30 examples found</strong>. These are the top rated real world PHP examples of <strong>Xml::label</strong> extracted from open source projects. You can rate examples to help us improve the quality of examples. </div> <div class="hidden-xs"> <div id="ezoic-pub-ad-placeholder-130"> </div> </div> </div> <div id="ezoic-pub-ad-placeholder-105"> <div style="text-align: center; margin-top: 10px"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- after-description --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="5330879504" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="visible-xs visible-sm visible-md"> <div class="bs-example thin" style="margin-top: 15px"> <div class="bs-example-title">Frequently Used Methods</div> <div class="fields-controls visible-sm visible-xs visible-md"> <a class="btn btn-default fields-show-btn" data-toggle="collapse" href="#fields-panel-mobile" aria-expanded="false" aria-controls="fields-panel">Show</a> <a class="btn btn-default fields-hide-btn" data-toggle="collapse" href="#fields-panel-mobile" aria-expanded="false" aria-controls="fields-panel">Hide</a> </div> </div> <figure class="highlight panel fields-panel collapse" id="fields-panel-mobile"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/option/php-xml-option-method-examples.html">option(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/radioLabel/php-xml-radiolabel-method-examples.html">radioLabel(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/encodeJsCall/php-xml-encodejscall-method-examples.html">encodeJsCall(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/encodeJsVar/php-xml-encodejsvar-method-examples.html">encodeJsVar(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/escapeJsString/php-xml-escapejsstring-method-examples.html">escapeJsString(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/expandAttributes/php-xml-expandattributes-method-examples.html">expandAttributes(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/fieldset/php-xml-fieldset-method-examples.html">fieldset(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/closeElement/php-xml-closeelement-method-examples.html">closeElement(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/hidden/php-xml-hidden-method-examples.html">hidden(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/checkLabel/php-xml-checklabel-method-examples.html">checkLabel(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/check/php-xml-check-method-examples.html">check(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/submitButton/php-xml-submitbutton-method-examples.html">submitButton(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/input/php-xml-input-method-examples.html">input(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/inputLabel/php-xml-inputlabel-method-examples.html">inputLabel(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/build/php-xml-build-method-examples.html">build(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/tags/php-xml-tags-method-examples.html">tags(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/buildForm/php-xml-buildform-method-examples.html">buildForm(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/element/php-xml-element-method-examples.html">element(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/namespaceSelector/php-xml-namespaceselector-method-examples.html">namespaceSelector(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/openElement/php-xml-openelement-method-examples.html">openElement(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/textarea/php-xml-textarea-method-examples.html">textarea(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html">label(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toArray/php-xml-toarray-method-examples.html">toArray(30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/radio/php-xml-radio-method-examples.html">radio(29)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/listDropDown/php-xml-listdropdown-method-examples.html">listDropDown(24)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/fromArray/php-xml-fromarray-method-examples.html">fromArray(14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/parse/php-xml-parse-method-examples.html">parse(14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/dateMenu/php-xml-datemenu-method-examples.html">dateMenu(14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/buildTable/php-xml-buildtable-method-examples.html">buildTable(12)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/wrapClass/php-xml-wrapclass-method-examples.html">wrapClass(9)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/languageSelector/php-xml-languageselector-method-examples.html">languageSelector(9)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/elementClean/php-xml-elementclean-method-examples.html">elementClean(7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/inputLabelSep/php-xml-inputlabelsep-method-examples.html">inputLabelSep(7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/span/php-xml-span-method-examples.html">span(6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/create/php-xml-create-method-examples.html">create(6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toString/php-xml-tostring-method-examples.html">toString(6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createCData/php-xml-createcdata-method-examples.html">createCData(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/escapeTagsOnly/php-xml-escapetagsonly-method-examples.html">escapeTagsOnly(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createElement/php-xml-createelement-method-examples.html">createElement(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/__destruct/php-xml-__destruct-method-examples.html">__destruct(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/decode/php-xml-decode-method-examples.html">decode(5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toXml/php-xml-toxml-method-examples.html">toXml(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/submitbutton/php-xml-submitbutton-method-examples.html">submitbutton(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/monthSelector/php-xml-monthselector-method-examples.html">monthSelector(4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/isWellFormed/php-xml-iswellformed-method-examples.html">isWellFormed(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/escape/php-xml-escape-method-examples.html">escape(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/password/php-xml-password-method-examples.html">password(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/isWellFormedXmlFragment/php-xml-iswellformedxmlfragment-method-examples.html">isWellFormedXmlFragment(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/getTagContents/php-xml-gettagcontents-method-examples.html">getTagContents(3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/xstring/php-xml-xstring-method-examples.html">xstring(3)</a> </div> </figure> </div> </div> <div class="page-content-container"> <div class="sidebar hidden-xs hidden-sm hidden-md" style="width:300px"> <div id="ezoic-pub-ad-placeholder-101"> <div style="text-align: center; margin-top: 10px"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- left-sidebar-1 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="7161345231" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="bs-example thin"> <div class="bs-example-title"> Frequently Used Methods </div> </div> <figure class="highlight panel fields-panel " id="fields-panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/option/php-xml-option-method-examples.html">option (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/radioLabel/php-xml-radiolabel-method-examples.html">radioLabel (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/encodeJsCall/php-xml-encodejscall-method-examples.html">encodeJsCall (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/encodeJsVar/php-xml-encodejsvar-method-examples.html">encodeJsVar (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/escapeJsString/php-xml-escapejsstring-method-examples.html">escapeJsString (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/expandAttributes/php-xml-expandattributes-method-examples.html">expandAttributes (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/fieldset/php-xml-fieldset-method-examples.html">fieldset (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/closeElement/php-xml-closeelement-method-examples.html">closeElement (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/hidden/php-xml-hidden-method-examples.html">hidden (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/checkLabel/php-xml-checklabel-method-examples.html">checkLabel (30)</a> </div> </figure> <div id="ezoic-pub-ad-placeholder-102"> <div style="text-align: center; margin-bottom: 10px"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- left-sidebar-2 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="7075206013" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="bs-example thin"> <div class="bs-example-title"> Frequently Used Methods </div> </div> <figure class="highlight panel fields-panel " id="fields-panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/check/php-xml-check-method-examples.html">check (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/submitButton/php-xml-submitbutton-method-examples.html">submitButton (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/input/php-xml-input-method-examples.html">input (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/inputLabel/php-xml-inputlabel-method-examples.html">inputLabel (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/build/php-xml-build-method-examples.html">build (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/tags/php-xml-tags-method-examples.html">tags (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/buildForm/php-xml-buildform-method-examples.html">buildForm (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/element/php-xml-element-method-examples.html">element (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/namespaceSelector/php-xml-namespaceselector-method-examples.html">namespaceSelector (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/openElement/php-xml-openelement-method-examples.html">openElement (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/textarea/php-xml-textarea-method-examples.html">textarea (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html">label (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toArray/php-xml-toarray-method-examples.html">toArray (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/radio/php-xml-radio-method-examples.html">radio (29)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/listDropDown/php-xml-listdropdown-method-examples.html">listDropDown (24)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/fromArray/php-xml-fromarray-method-examples.html">fromArray (14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/parse/php-xml-parse-method-examples.html">parse (14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/dateMenu/php-xml-datemenu-method-examples.html">dateMenu (14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/buildTable/php-xml-buildtable-method-examples.html">buildTable (12)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/wrapClass/php-xml-wrapclass-method-examples.html">wrapClass (9)</a> </div> </figure> <div id="ezoic-pub-ad-placeholder-117"> </div> <div class="bs-example thin"> <div class="bs-example-title"> Frequently Used Methods </div> </div> <figure class="highlight panel fields-panel " id="fields-panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/textarea/php-xml-textarea-method-examples.html">textarea (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html">label (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toArray/php-xml-toarray-method-examples.html">toArray (30)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/radio/php-xml-radio-method-examples.html">radio (29)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/listDropDown/php-xml-listdropdown-method-examples.html">listDropDown (24)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/fromArray/php-xml-fromarray-method-examples.html">fromArray (14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/parse/php-xml-parse-method-examples.html">parse (14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/dateMenu/php-xml-datemenu-method-examples.html">dateMenu (14)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/buildTable/php-xml-buildtable-method-examples.html">buildTable (12)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/wrapClass/php-xml-wrapclass-method-examples.html">wrapClass (9)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/languageSelector/php-xml-languageselector-method-examples.html">languageSelector (9)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/elementClean/php-xml-elementclean-method-examples.html">elementClean (7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/inputLabelSep/php-xml-inputlabelsep-method-examples.html">inputLabelSep (7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/span/php-xml-span-method-examples.html">span (6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/create/php-xml-create-method-examples.html">create (6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toString/php-xml-tostring-method-examples.html">toString (6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createCData/php-xml-createcdata-method-examples.html">createCData (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/escapeTagsOnly/php-xml-escapetagsonly-method-examples.html">escapeTagsOnly (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createElement/php-xml-createelement-method-examples.html">createElement (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/__destruct/php-xml-__destruct-method-examples.html">__destruct (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/decode/php-xml-decode-method-examples.html">decode (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toXml/php-xml-toxml-method-examples.html">toXml (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/submitbutton/php-xml-submitbutton-method-examples.html">submitbutton (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/monthSelector/php-xml-monthselector-method-examples.html">monthSelector (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/isWellFormed/php-xml-iswellformed-method-examples.html">isWellFormed (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/escape/php-xml-escape-method-examples.html">escape (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/password/php-xml-password-method-examples.html">password (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/isWellFormedXmlFragment/php-xml-iswellformedxmlfragment-method-examples.html">isWellFormedXmlFragment (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/getTagContents/php-xml-gettagcontents-method-examples.html">getTagContents (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/xstring/php-xml-xstring-method-examples.html">xstring (3)</a> </div> </figure> <div id="ezoic-pub-ad-placeholder-116"> </div> <div class="hidden-xs hidden-sm"> <div class="bs-example thin"> <div class="bs-example-title">Related in langs</div> </div> <figure class="highlight panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://csharp.hotexamples.com/examples/Libraries_CWO_XMS_CIV/ContainerCustom/-/php-containercustom-class-examples.html">ContainerCustom (C#)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://csharp.hotexamples.com/examples/-/ControllerActionParts/-/php-controlleractionparts-class-examples.html">ControllerActionParts (C#)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://cpp.hotexamples.com/examples/-/-/GPIOSetDir/cpp-gpiosetdir-function-examples.html">GPIOSetDir (C++)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://cpp.hotexamples.com/examples/-/-/fmpq_poly_randtest/cpp-fmpq_poly_randtest-function-examples.html">fmpq_poly_randtest (C++)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://golang.hotexamples.com/examples/github.com.nbutton23.zxcvbn-go.godeps._workspace.src.github.com.stretchr.testify.assert/-/Equal/golang-equal-function-examples.html">Equal (Go)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://golang.hotexamples.com/examples/go.ast/Node/-/golang-node-class-examples.html">Node (Go)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://java.hotexamples.com/examples/-/PostoSaudeService/-/java-postosaudeservice-class-examples.html">PostoSaudeService (Java)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://java.hotexamples.com/examples/com.lxyg.app.business.utils/AppHttpClient/-/java-apphttpclient-class-examples.html">AppHttpClient (Java)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://python.hotexamples.com/examples/importManager.py_correlator/-/openHoleFile/python-openholefile-function-examples.html">openHoleFile (Python)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://python.hotexamples.com/examples/tests.operations/TestIMAPOperation/-/python-testimapoperation-class-examples.html">TestIMAPOperation (Python)</a> </div> </figure> </div> <div class="bs-example thin"> <div class="bs-example-title"> Frequently Used Methods </div> </div> <figure class="highlight panel fields-panel fields-panel-last" id="fields-panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/languageSelector/php-xml-languageselector-method-examples.html">languageSelector (9)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/elementClean/php-xml-elementclean-method-examples.html">elementClean (7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/inputLabelSep/php-xml-inputlabelsep-method-examples.html">inputLabelSep (7)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/span/php-xml-span-method-examples.html">span (6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/create/php-xml-create-method-examples.html">create (6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toString/php-xml-tostring-method-examples.html">toString (6)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createCData/php-xml-createcdata-method-examples.html">createCData (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/escapeTagsOnly/php-xml-escapetagsonly-method-examples.html">escapeTagsOnly (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createElement/php-xml-createelement-method-examples.html">createElement (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/__destruct/php-xml-__destruct-method-examples.html">__destruct (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/decode/php-xml-decode-method-examples.html">decode (5)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toXml/php-xml-toxml-method-examples.html">toXml (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/submitbutton/php-xml-submitbutton-method-examples.html">submitbutton (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/monthSelector/php-xml-monthselector-method-examples.html">monthSelector (4)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/isWellFormed/php-xml-iswellformed-method-examples.html">isWellFormed (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/escape/php-xml-escape-method-examples.html">escape (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/password/php-xml-password-method-examples.html">password (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/isWellFormedXmlFragment/php-xml-iswellformedxmlfragment-method-examples.html">isWellFormedXmlFragment (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/getTagContents/php-xml-gettagcontents-method-examples.html">getTagContents (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/xstring/php-xml-xstring-method-examples.html">xstring (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toSimpleArray/php-xml-tosimplearray-method-examples.html">toSimpleArray (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/Element/php-xml-element-method-examples.html">Element (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/setXml/php-xml-setxml-method-examples.html">setXml (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createPCData/php-xml-createpcdata-method-examples.html">createPCData (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/__construct/php-xml-__construct-method-examples.html">__construct (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/child/php-xml-child-method-examples.html">child (3)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/buildTableRow/php-xml-buildtablerow-method-examples.html">buildTableRow (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/removeGlobalNs/php-xml-removeglobalns-method-examples.html">removeGlobalNs (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/buildArrayFromXml/php-xml-buildarrayfromxml-method-examples.html">buildArrayFromXml (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/CloseElement/php-xml-closeelement-method-examples.html">CloseElement (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/attrib/php-xml-attrib-method-examples.html">attrib (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/inputlabel/php-xml-inputlabel-method-examples.html">inputlabel (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/addNamespace/php-xml-addnamespace-method-examples.html">addNamespace (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/__decodeent/php-xml-__decodeent-method-examples.html">__decodeent (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/__decodeattr/php-xml-__decodeattr-method-examples.html">__decodeattr (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createComment/php-xml-createcomment-method-examples.html">createComment (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/toSimpleXml/php-xml-tosimplexml-method-examples.html">toSimpleXml (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/fieldSet/php-xml-fieldset-method-examples.html">fieldSet (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/createDocument/php-xml-createdocument-method-examples.html">createDocument (2)</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/Xml/encodeJSVar/php-xml-encodejsvar-method-examples.html">encodeJSVar (2)</a> </div> </figure> <div class="hidden-xs hidden-sm"> <div class="bs-example thin"> <div class="bs-example-title">Related</div> </div> <figure class="highlight panel"> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/AbstractWriter/-/php-abstractwriter-class-examples.html">AbstractWriter</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/-/msa_get_conditions_from_category/php-msa_get_conditions_from_category-function-examples.html">msa_get_conditions_from_category</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/-/auteur_du_potin/php-auteur_du_potin-function-examples.html">auteur_du_potin</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/ride.web.mail.orm.entry/MailEntry/-/php-mailentry-class-examples.html">MailEntry</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/-/et_extra_show_home_layout/php-et_extra_show_home_layout-function-examples.html">et_extra_show_home_layout</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/-/setMySqlTimezone/php-setmysqltimezone-function-examples.html">setMySqlTimezone</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/app.enums/Reasons/-/php-reasons-class-examples.html">Reasons</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/app.helpers/ParserCFID/-/php-parsercfid-class-examples.html">ParserCFID</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/-/undoMagic/php-undomagic-function-examples.html">undoMagic</a> </div> <div style="overflow: hidden;text-overflow: ellipsis;"> <a href="https://hotexamples.com/examples/-/TDatabase/-/php-tdatabase-class-examples.html">TDatabase</a> </div> </figure> </div> </div> <div class="main-content"> <div class="addthis_inline_share_toolbox_o6yp"></div> <div id="ezoic-pub-ad-placeholder-106"> </div> <div class="example-item" id="0xb8418a308615e93fef2b5b39139924787c03859f52f48dc8aceb3db2bc633b2d-55,,66,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #1</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_1" data-hash="0xb8418a308615e93fef2b5b39139924787c03859f52f48dc8aceb3db2bc633b2d" data-area="55,,66,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '1')" class="rating-up btn btn-success" data-id="rating_1"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'1')" class="rating-down btn btn-danger" data-id="rating_1"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xb8418a308615e93fef2b5b39139924787c03859f52f48dc8aceb3db2bc633b2d-55,,66,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xb8418a308615e93fef2b5b39139924787c03859f52f48dc8aceb3db2bc633b2d&fullName=extensions%2FNuke_body.php&project=jpena88%2Fmediawiki-dokku-deploy')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fjpena88%2Fmediawiki-dokku-deploy%2Fblob%2Fmaster%2Fextensions%2FNuke_body.php">Nuke_body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fjpena88%2Fmediawiki-dokku-deploy">jpena88/mediawiki-dokku-deploy</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="1"> <pre class="line-numbers language-php" data-end="66" data-start="56" data-highlight="66"> /** * Prompt for a username or IP address. * * @param $userName string */ protected function promptForm($userName = '') { $out = $this->getOutput(); $out->addModules('mediawiki.userSuggest'); $out->addWikiMsg('nuke-tools'); $out->addHTML(Xml::openElement('form', array('action' => $this->getPageTitle()->getLocalURL('action=submit'), 'method' => 'post')) . '<table><tr>' . '<td>' . Xml::label($this->msg('nuke-userorip')->text(), 'nuke-target') . '</td>' . '<td>' . Xml::input('target', 40, $userName, array('id' => 'nuke-target', 'class' => 'mw-autocomplete-user', 'autofocus' => true)) . '</td>' . '</tr><tr>' . '<td>' . Xml::label($this->msg('nuke-pattern')->text(), 'nuke-pattern') . '</td>' . '<td>' . Xml::input('pattern', 40, '', array('id' => 'nuke-pattern')) . '</td>' . '</tr><tr>' . '<td>' . Xml::label($this->msg('nuke-namespace')->text(), 'nuke-namespace') . '</td>' . '<td>' . Html::namespaceSelector(array('all' => 'all'), array('name' => 'namespace')) . '</td>' . '</tr><tr>' . '<td>' . Xml::label($this->msg('nuke-maxpages')->text(), 'nuke-limit') . '</td>' . '<td>' . Xml::input('limit', 7, '500', array('id' => 'nuke-limit')) . '</td>' . '</tr><tr>' . '<td></td>' . '<td>' . Xml::submitButton($this->msg('nuke-submit-user')->text()) . '</td>' . '</tr></table>' . Html::hidden('wpEditToken', $this->getUser()->getEditToken()) . Xml::closeElement('form')); }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-107"> <div style="text-align: center;margin-bottom: 10px"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- after-example-1 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="4981531786" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="example-item" id="0x9cc642b8b1d2c2d535c06b1a0cd94f212f7983b9add57e20a4627880cce7da9e-55,,86,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #2</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_2" data-hash="0x9cc642b8b1d2c2d535c06b1a0cd94f212f7983b9add57e20a4627880cce7da9e" data-area="55,,86,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '2')" class="rating-up btn btn-success" data-id="rating_2"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'2')" class="rating-down btn btn-danger" data-id="rating_2"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x9cc642b8b1d2c2d535c06b1a0cd94f212f7983b9add57e20a4627880cce7da9e-55,,86,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x9cc642b8b1d2c2d535c06b1a0cd94f212f7983b9add57e20a4627880cce7da9e&fullName=FlaggedRevs%2Ffrontend%2Fspecialpages%2FPendingChanges_body.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FFlaggedRevs%2Ffrontend%2Fspecialpages%2FPendingChanges_body.php">PendingChanges_body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="2"> <pre class="line-numbers language-php" data-end="86" data-start="56" data-highlight="83"> public function showForm() { global $wgScript; # Explanatory text $this->getOutput()->addWikiMsg('pendingchanges-list', $this->getLang()->formatNum($this->pager->getNumRows())); $form = Html::openElement('form', array('name' => 'pendingchanges', 'action' => $wgScript, 'method' => 'get')) . "\n"; $form .= "<fieldset><legend>" . wfMsgHtml('pendingchanges-legend') . "</legend>\n"; $form .= Html::hidden('title', $this->getTitle()->getPrefixedDBKey()) . "\n"; $items = array(); if (count(FlaggedRevs::getReviewNamespaces()) > 1) { $items[] = "<span style='white-space: nowrap;'>" . FlaggedRevsXML::getNamespaceMenu($this->namespace, '') . '</span>'; } if (FlaggedRevs::qualityVersions()) { $items[] = "<span style='white-space: nowrap;'>" . FlaggedRevsXML::getLevelMenu($this->level, 'revreview-filter-stable') . '</span>'; } if (!FlaggedRevs::isStableShownByDefault() && !FlaggedRevs::useOnlyIfProtected()) { $items[] = "<span style='white-space: nowrap;'>" . Xml::check('stable', $this->stable, array('id' => 'wpStable')) . Xml::label(wfMsg('pendingchanges-stable'), 'wpStable') . '</span>'; } if ($items) { $form .= implode(' ', $items) . '<br />'; } $items = array(); $items[] = Xml::label(wfMsg("pendingchanges-category"), 'wpCategory') . '&#160;' . Xml::input('category', 30, $this->category, array('id' => 'wpCategory')); if ($this->getUser()->getId()) { $items[] = Xml::check('watched', $this->watched, array('id' => 'wpWatched')) . Xml::label(wfMsg('pendingchanges-onwatchlist'), 'wpWatched'); } $form .= implode(' ', $items) . '<br />'; $form .= Xml::label(wfMsg('pendingchanges-size'), 'wpSize') . Xml::input('size', 4, $this->size, array('id' => 'wpSize')) . ' ' . Xml::submitButton(wfMsg('allpagessubmit')) . "\n"; $form .= "</fieldset>"; $form .= Html::closeElement('form') . "\n"; $this->getOutput()->addHTML($form); }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-108"> <div style="text-align: center;"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- after-example-2 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="7155150962" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="example-item" id="0x24054c9537e0cd6334afb6e89dbc7e8a17fa3b19fdce2649bc52286a1204b3d7-19,,29,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #3</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_3" data-hash="0x24054c9537e0cd6334afb6e89dbc7e8a17fa3b19fdce2649bc52286a1204b3d7" data-area="19,,29,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '3')" class="rating-up btn btn-success" data-id="rating_3"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'3')" class="rating-down btn btn-danger" data-id="rating_3"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x24054c9537e0cd6334afb6e89dbc7e8a17fa3b19fdce2649bc52286a1204b3d7-19,,29,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x24054c9537e0cd6334afb6e89dbc7e8a17fa3b19fdce2649bc52286a1204b3d7&fullName=ListUsersTestWiki.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FListUsersTestWiki.php">ListUsersTestWiki.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="3"> <pre class="line-numbers language-php" data-end="29" data-start="20" data-highlight="27"> /** * Input form */ static function onSpecialListusersHeaderForm( $pager, &$out ) { $testwiki = IncubatorTest::getUrlParam(); $project = self::getProjectInput(); $input = $project ? $project['name'] : ( $testwiki ? $testwiki['prefix'] : null ); $out .= Xml::label( wfMsg( 'wminc-testwiki' ), 'testwiki' ) . ' ' . Xml::input( 'testwiki', 20, $input, array( 'id' => 'testwiki' ) ) . '<br />'; return true; }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-109"> <div style="text-align: center;"> <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- after-example-3 --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="8699811701" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> <div class="example-item" id="0x77e2b235011c25f551455121edfeff04c71f20abbff302e805cb790ea3142077-68,,77,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #4</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_4" data-hash="0x77e2b235011c25f551455121edfeff04c71f20abbff302e805cb790ea3142077" data-area="68,,77,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '4')" class="rating-up btn btn-success" data-id="rating_4"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'4')" class="rating-down btn btn-danger" data-id="rating_4"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x77e2b235011c25f551455121edfeff04c71f20abbff302e805cb790ea3142077-68,,77,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x77e2b235011c25f551455121edfeff04c71f20abbff302e805cb790ea3142077&fullName=extensions%2FRandomInCategory.body.php&project=Tjorriemorrie%2Fapp')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FTjorriemorrie%2Fapp%2Fblob%2Fmaster%2Fextensions%2FRandomInCategory.body.php">RandomInCategory.body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FTjorriemorrie%2Fapp">Tjorriemorrie/app</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="4"> <pre class="line-numbers language-php" data-end="77" data-start="69" data-highlight="76"> public function getForm($par = null) { global $wgScript, $wgRequest; $category = $par; if (!$category) { $category = $wgRequest->getVal('category'); } $f = Xml::openElement('form', array('method' => 'get', 'action' => $wgScript)) . Xml::openElement('fieldset') . Xml::element('legend', array(), wfMsg('randomincategory')) . Html::Hidden('title', $this->getTitle()->getPrefixedText()) . Xml::openElement('p') . Xml::label(wfMsg('randomincategory-label'), 'category') . ' ' . Xml::input('category', null, $category, array('id' => 'category')) . ' ' . Xml::submitButton(wfMsg('randomincategory-submit')) . Xml::closeElement('p') . Xml::closeElement('fieldset') . Xml::closeElement('form'); return $f; }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-110"> </div> <div class="example-item" id="0xe6a55f9c68c95e56f811fcd6244492a3380d779cae4cd864920b12216dfa91bf-38,,47,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #5</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_5" data-hash="0xe6a55f9c68c95e56f811fcd6244492a3380d779cae4cd864920b12216dfa91bf" data-area="38,,47,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '5')" class="rating-up btn btn-success" data-id="rating_5"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'5')" class="rating-down btn btn-danger" data-id="rating_5"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xe6a55f9c68c95e56f811fcd6244492a3380d779cae4cd864920b12216dfa91bf-38,,47,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xe6a55f9c68c95e56f811fcd6244492a3380d779cae4cd864920b12216dfa91bf&fullName=extensions%2Fwikia%2FWantedPagesPageWikia.class.php&project=schwarer2006%2Fwikia')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fschwarer2006%2Fwikia%2Fblob%2Fmaster%2Fextensions%2Fwikia%2FWantedPagesPageWikia.class.php">WantedPagesPageWikia.class.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fschwarer2006%2Fwikia">schwarer2006/wikia</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="5"> <pre class="line-numbers language-php" data-end="47" data-start="39" data-highlight="43"> public function getPageHeader() { $self = SpecialPage::getTitleFor($this->getName()); $form = Xml::openElement('form', array('method' => 'post', 'action' => $self->getLocalUrl())); $form .= '<table><tr><td align="right">' . Xml::label("Exclude titles", 'excludetitles') . '</td>'; $form .= '<td>' . Xml::input('excludetitles', 30, $this->excludeorig, array('id' => 'excludetitles')) . '</td></tr>'; $form .= '<tr><td></td><td>' . Xml::submitButton(wfMsg('allpagessubmit')) . '</td></tr></table>'; $form .= Html::hidden('offset', $this->offset) . Html::hidden('limit', $this->limit) . '</form>'; return $form; }</pre> </div> </figure> </div> <div id="ezoic-pub-ad-placeholder-111"> </div> <div class="example-item" id="0xae515dd0ba913b903c6646ab13d9d49ff02228ec55ee474516ff8093a6fa688a-44,,95,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #6</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_6" data-hash="0xae515dd0ba913b903c6646ab13d9d49ff02228ec55ee474516ff8093a6fa688a" data-area="44,,95,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '6')" class="rating-up btn btn-success" data-id="rating_6"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'6')" class="rating-down btn btn-danger" data-id="rating_6"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xae515dd0ba913b903c6646ab13d9d49ff02228ec55ee474516ff8093a6fa688a-44,,95,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xae515dd0ba913b903c6646ab13d9d49ff02228ec55ee474516ff8093a6fa688a&fullName=WikiZam%2Fincludes%2FSpecialLinkSearch.php&project=eFFemeer%2Fseizamcore')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FeFFemeer%2Fseizamcore%2Fblob%2Fmaster%2FWikiZam%2Fincludes%2FSpecialLinkSearch.php">SpecialLinkSearch.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FeFFemeer%2Fseizamcore">eFFemeer/seizamcore</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="6"> <pre class="line-numbers language-php" data-end="95" data-start="45" data-highlight="85"> function execute($par) { global $wgUrlProtocols, $wgMiserMode; $this->setHeaders(); $this->outputHeader(); $out = $this->getOutput(); $out->allowClickjacking(); $request = $this->getRequest(); $target = $request->getVal('target', $par); $namespace = $request->getIntorNull('namespace', null); $protocols_list = array(); foreach ($wgUrlProtocols as $prot) { if ($prot !== '//') { $protocols_list[] = $prot; } } $target2 = $target; $protocol = ''; $pr_sl = strpos($target2, '//'); $pr_cl = strpos($target2, ':'); if ($pr_sl) { // For protocols with '//' $protocol = substr($target2, 0, $pr_sl + 2); $target2 = substr($target2, $pr_sl + 2); } elseif (!$pr_sl && $pr_cl) { // For protocols without '//' like 'mailto:' $protocol = substr($target2, 0, $pr_cl + 1); $target2 = substr($target2, $pr_cl + 1); } elseif ($protocol == '' && $target2 != '') { // default $protocol = 'http://'; } if ($protocol != '' && !in_array($protocol, $protocols_list)) { // unsupported protocol, show original search request $target2 = $target; $protocol = ''; } $out->addWikiMsg('linksearch-text', '<nowiki>' . $this->getLang()->commaList($wgUrlProtocols) . '</nowiki>'); $s = Xml::openElement('form', array('id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'])) . Html::hidden('title', $this->getTitle()->getPrefixedDbKey()) . '<fieldset>' . Xml::element('legend', array(), wfMsg('linksearch')) . Xml::inputLabel(wfMsg('linksearch-pat'), 'target', 'target', 50, $target) . ' '; if (!$wgMiserMode) { $s .= Xml::label(wfMsg('linksearch-ns'), 'namespace') . ' ' . Xml::namespaceSelector($namespace, ''); } $s .= Xml::submitButton(wfMsg('linksearch-ok')) . '</fieldset>' . Xml::closeElement('form'); $out->addHTML($s); if ($target != '') { $this->setParams(array('query' => $target2, 'namespace' => $namespace, 'protocol' => $protocol)); parent::execute($par); if ($this->mMungedQuery === false) { $out->addWikiMsg('linksearch-error'); } } }</pre> </div> </figure> </div> <div class="example-item" id="0xefb6186460e054378c024cc0cda2d599ab9a55a3d6848587f99e949865a0dcef-24,,39,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #7</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_7" data-hash="0xefb6186460e054378c024cc0cda2d599ab9a55a3d6848587f99e949865a0dcef" data-area="24,,39,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '7')" class="rating-up btn btn-success" data-id="rating_7"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'7')" class="rating-down btn btn-danger" data-id="rating_7"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xefb6186460e054378c024cc0cda2d599ab9a55a3d6848587f99e949865a0dcef-24,,39,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xefb6186460e054378c024cc0cda2d599ab9a55a3d6848587f99e949865a0dcef&fullName=CentralAuth%2FSpecialGlobalGroupMembership.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FCentralAuth%2FSpecialGlobalGroupMembership.php">SpecialGlobalGroupMembership.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="7"> <pre class="line-numbers language-php" data-end="39" data-start="25" data-highlight="39"> /** * Output a form to allow searching for a user */ function switchForm() { global $wgScript; $knownwiki = $this->getRequest()->getVal('wpKnownWiki'); $knownwiki = $knownwiki ? $knownwiki : wfWikiId(); // Generate wiki selector $selector = new XmlSelect('wpKnownWiki', 'wpKnownWiki', $knownwiki); foreach (CentralAuthUser::getWikiList() as $wiki) { $selector->addOption($wiki); } $this->getOutput()->addModuleStyles('mediawiki.special'); $this->getOutput()->addHTML(Xml::openElement('form', array('method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1')) . Html::hidden('title', $this->getTitle()) . Xml::openElement('fieldset') . Xml::element('legend', array(), wfMsg('userrights-lookup-user')) . Xml::inputLabel(wfMsg('userrights-user-editname'), 'user', 'username', 30, $this->mTarget) . ' <br />' . Xml::label(wfMsg('centralauth-globalgrouppermissions-knownwiki'), 'wpKnownWiki') . ' ' . $selector->getHTML() . '<br />' . Xml::submitButton(wfMsg('editusergroup')) . Xml::closeElement('fieldset') . Xml::closeElement('form') . "\n"); }</pre> </div> </figure> </div> <div class="example-item" id="0xc9307a9507200d00f0e4c5db4cb13fcc6885bba40b1f0c5ce823d07b69601f43-38,,51,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #8</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_8" data-hash="0xc9307a9507200d00f0e4c5db4cb13fcc6885bba40b1f0c5ce823d07b69601f43" data-area="38,,51,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '8')" class="rating-up btn btn-success" data-id="rating_8"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'8')" class="rating-down btn btn-danger" data-id="rating_8"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xc9307a9507200d00f0e4c5db4cb13fcc6885bba40b1f0c5ce823d07b69601f43-38,,51,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xc9307a9507200d00f0e4c5db4cb13fcc6885bba40b1f0c5ce823d07b69601f43&fullName=wiki%2Fincludes%2FSpecialAllmessages.php&project=rocLv%2Fconference')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FrocLv%2Fconference%2Fblob%2Fmaster%2Fwiki%2Fincludes%2FSpecialAllmessages.php">SpecialAllmessages.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FrocLv%2Fconference">rocLv/conference</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="8"> <pre class="line-numbers language-php" data-end="51" data-start="39" data-highlight="45"> function buildForm() { global $wgScript; $languages = Language::getLanguageNames(false); ksort($languages); $out = Xml::openElement('form', array('method' => 'get', 'action' => $wgScript, 'id' => 'mw-allmessages-form')) . Xml::fieldset(wfMsg('allmessages-filter-legend')) . Xml::hidden('title', $this->getTitle()) . Xml::openElement('table', array('class' => 'mw-allmessages-table')) . "\n" . '<tr> <td class="mw-label">' . Xml::label(wfMsg('allmessages-prefix'), 'mw-allmessages-form-prefix') . "</td>\n\n\t\t\t\t<td class=\"mw-input\">" . Xml::input('prefix', 20, str_replace('_', ' ', $this->prefix), array('id' => 'mw-allmessages-form-prefix')) . "</td>\n\n\t\t\t</tr>\n\t\t\t<tr>\n\n\t\t\t\t<td class='mw-label'>" . wfMsg('allmessages-filter') . "</td>\n\n\t\t\t\t<td class='mw-input'>" . Xml::radioLabel(wfMsg('allmessages-filter-unmodified'), 'filter', 'unmodified', 'mw-allmessages-form-filter-unmodified', $this->filter == 'unmodified' ? true : false) . Xml::radioLabel(wfMsg('allmessages-filter-all'), 'filter', 'all', 'mw-allmessages-form-filter-all', $this->filter == 'all' ? true : false) . Xml::radioLabel(wfMsg('allmessages-filter-modified'), 'filter', 'modified', 'mw-allmessages-form-filter-modified', $this->filter == 'modified' ? true : false) . "</td>\n\n\t\t\t</tr>\n\t\t\t<tr>\n\n\t\t\t\t<td class=\"mw-label\">" . Xml::label(wfMsg('allmessages-language'), 'mw-allmessages-form-lang') . "</td>\n\n\t\t\t\t<td class=\"mw-input\">" . Xml::openElement('select', array('id' => 'mw-allmessages-form-lang', 'name' => 'lang')); foreach ($languages as $lang => $name) { $selected = $lang == $this->langCode ? true : false; $out .= Xml::option($lang . ' - ' . $name, $lang, $selected) . "\n"; } $out .= Xml::closeElement('select') . "</td>\n\n\t\t\t</tr>\n\t\t\t<tr>\n\n\t\t\t\t<td></td>\n\t\t\t\t<td>" . Xml::submitButton(wfMsg('allmessages-filter-submit')) . "</td>\n\n\t\t\t</tr>" . Xml::closeElement('table') . $this->table->getHiddenFields(array('title', 'prefix', 'filter', 'lang')) . Xml::closeElement('fieldset') . Xml::closeElement('form'); return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0xfee2f8e5fbc73fb3fe594d44befa74bcf8f0f6e7ee2b0c72f0963cb916242332-64,,113,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #9</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_9" data-hash="0xfee2f8e5fbc73fb3fe594d44befa74bcf8f0f6e7ee2b0c72f0963cb916242332" data-area="64,,113,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '9')" class="rating-up btn btn-success" data-id="rating_9"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'9')" class="rating-down btn btn-danger" data-id="rating_9"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xfee2f8e5fbc73fb3fe594d44befa74bcf8f0f6e7ee2b0c72f0963cb916242332-64,,113,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xfee2f8e5fbc73fb3fe594d44befa74bcf8f0f6e7ee2b0c72f0963cb916242332&fullName=DonationInterface%2FTwoStepTwoColumnLetter.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FDonationInterface%2FTwoStepTwoColumnLetter.php">TwoStepTwoColumnLetter.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="9"> <pre class="line-numbers language-php" data-end="113" data-start="65" data-highlight="78"> protected function generateBillingFields() { global $wgScriptPath; $form = ''; // name $form .= $this->getNameField(); // email $form .= $this->getEmailField(); // amount $form .= '<tr>'; $form .= '<td colspan="2"><span class="creditcard-error-msg">' . $this->form_errors['amount'] . '</span></td>'; $form .= '</tr>'; $form .= '<tr>'; $form .= '<td class="label">' . Xml::label(wfMsg('donate_interface-donor-amount'), 'amount') . '</td>'; $form .= '<td>' . Xml::input('amount', '7', $this->getEscapedValue('amount'), array('type' => 'text', 'maxlength' => '10', 'id' => 'amount')) . ' ' . $this->generateCurrencyDropdown() . '</td>'; $form .= '</tr>'; // card logos if ($this->getEscapedValue('currency_code') == 'USD') { $form .= '<tr id="four_cards" style="display:table-row;">'; $form .= '<td class="label"> </td><td>' . Xml::element('img', array('src' => $wgScriptPath . "/extensions/DonationInterface/gateway_forms/includes/credit_card_logos.gif")) . '</td>'; $form .= '</tr>'; $form .= '<tr id="two_cards" style="display:none;">'; $form .= '<td class="label"> </td><td>' . Xml::element('img', array('src' => $wgScriptPath . "/extensions/DonationInterface/gateway_forms/includes/credit_card_logos3.gif")) . '</td>'; $form .= '</tr>'; } else { $form .= '<tr id="four_cards" style="display:none;">'; $form .= '<td class="label"> </td><td>' . Xml::element('img', array('src' => $wgScriptPath . "/extensions/DonationInterface/gateway_forms/includes/credit_card_logos.gif")) . '</td>'; $form .= '</tr>'; $form .= '<tr id="two_cards" style="display:table-row;">'; $form .= '<td class="label"> </td><td>' . Xml::element('img', array('src' => $wgScriptPath . "/extensions/DonationInterface/gateway_forms/includes/credit_card_logos3.gif")) . '</td>'; $form .= '</tr>'; } // card number $form .= $this->getCardNumberField(); // cvv $form .= $this->getCvvField(); // expiry $form .= $this->getExpiryField(); // street $form .= $this->getStreetField(); // city $form .= $this->getCityField(); // state $form .= $this->getStateField(); // zip $form .= $this->getZipField(); // country $form .= $this->getCountryField(); return $form; }</pre> </div> </figure> </div> <div class="example-item" id="0xb7911f35baaf022d113f25ceda5534fa44102b98232b56c8234f59b2e3f9e1e2-78,,91,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #10</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_10" data-hash="0xb7911f35baaf022d113f25ceda5534fa44102b98232b56c8234f59b2e3f9e1e2" data-area="78,,91,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '10')" class="rating-up btn btn-success" data-id="rating_10"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'10')" class="rating-down btn btn-danger" data-id="rating_10"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xb7911f35baaf022d113f25ceda5534fa44102b98232b56c8234f59b2e3f9e1e2-78,,91,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xb7911f35baaf022d113f25ceda5534fa44102b98232b56c8234f59b2e3f9e1e2&fullName=includes%2Fspecials%2FAllMessagesTablePager.php&project=paladox%2Fmediawiki')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fpaladox%2Fmediawiki%2Fblob%2Fmaster%2Fincludes%2Fspecials%2FAllMessagesTablePager.php">AllMessagesTablePager.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fpaladox%2Fmediawiki">paladox/mediawiki</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="10"> <pre class="line-numbers language-php" data-end="91" data-start="79" data-highlight="86"> function buildForm() { $attrs = ['id' => 'mw-allmessages-form-lang', 'name' => 'lang']; $msg = wfMessage('allmessages-language'); $langSelect = Xml::languageSelector($this->langcode, false, null, $attrs, $msg); $out = Xml::openElement('form', ['method' => 'get', 'action' => $this->getConfig()->get('Script'), 'id' => 'mw-allmessages-form']) . Xml::fieldset($this->msg('allmessages-filter-legend')->text()) . Html::hidden('title', $this->getTitle()->getPrefixedText()) . Xml::openElement('table', ['class' => 'mw-allmessages-table']) . "\n" . '<tr> <td class="mw-label">' . Xml::label($this->msg('allmessages-prefix')->text(), 'mw-allmessages-form-prefix') . "</td>\n\n\t\t\t<td class=\"mw-input\">" . Xml::input('prefix', 20, str_replace('_', ' ', $this->displayPrefix), ['id' => 'mw-allmessages-form-prefix']) . "</td>\n\n\t\t\t</tr>\n\t\t\t<tr>\n\n\t\t\t<td class='mw-label'>" . $this->msg('allmessages-filter')->escaped() . "</td>\n\n\t\t\t\t<td class='mw-input'>" . Xml::radioLabel($this->msg('allmessages-filter-unmodified')->text(), 'filter', 'unmodified', 'mw-allmessages-form-filter-unmodified', $this->filter === 'unmodified') . Xml::radioLabel($this->msg('allmessages-filter-all')->text(), 'filter', 'all', 'mw-allmessages-form-filter-all', $this->filter === 'all') . Xml::radioLabel($this->msg('allmessages-filter-modified')->text(), 'filter', 'modified', 'mw-allmessages-form-filter-modified', $this->filter === 'modified') . "</td>\n\n\t\t\t</tr>\n\t\t\t<tr>\n\n\t\t\t\t<td class=\"mw-label\">" . $langSelect[0] . "</td>\n\n\t\t\t\t<td class=\"mw-input\">" . $langSelect[1] . "</td>\n\n\t\t\t</tr>" . '<tr> <td class="mw-label">' . Xml::label($this->msg('table_pager_limit_label')->text(), 'mw-table_pager_limit_label') . '</td> <td class="mw-input">' . $this->getLimitSelect(['id' => 'mw-table_pager_limit_label']) . '</td> <tr> <td></td> <td>' . Xml::submitButton($this->msg('allmessages-filter-submit')->text()) . "</td>\n\n\t\t\t</tr>" . Xml::closeElement('table') . $this->getHiddenFields(['title', 'prefix', 'filter', 'lang', 'limit']) . Xml::closeElement('fieldset') . Xml::closeElement('form'); return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0x1d72d2664ca2f169314a989298c392674c0ff125e1027d3800a51fa32bb9b0d2-13,,27,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #11</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_11" data-hash="0x1d72d2664ca2f169314a989298c392674c0ff125e1027d3800a51fa32bb9b0d2" data-area="13,,27,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '11')" class="rating-up btn btn-success" data-id="rating_11"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'11')" class="rating-down btn btn-danger" data-id="rating_11"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x1d72d2664ca2f169314a989298c392674c0ff125e1027d3800a51fa32bb9b0d2-13,,27,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x1d72d2664ca2f169314a989298c392674c0ff125e1027d3800a51fa32bb9b0d2&fullName=extensions%2Fwikia%2FStaffLog_body.php&project=Tjorriemorrie%2Fapp')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FTjorriemorrie%2Fapp%2Fblob%2Fmaster%2Fextensions%2Fwikia%2FStaffLog_body.php">StaffLog_body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FTjorriemorrie%2Fapp">Tjorriemorrie/app</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="11"> <pre class="line-numbers language-php" data-end="27" data-start="14" data-highlight="27"> function execute($par) { global $wgOut, $wgUser; $this->setHeaders(); if (!$wgUser->isAllowed('stafflog')) { throw new PermissionsError('stafflog'); } $pager = new StaffLoggerPager(""); $sTypesDropDown = Xml::openElement('select', array('name' => 'type', 'id' => 'StaffLogFilterType')); foreach ($this->aTypes as $k => $v) { $sTypesDropDown .= Xml::option($v, $k, $k == $this->request->getText('type', '')); } $sTypesDropDown .= Xml::closeElement('select'); $wgOut->addHTML(Xml::openElement('form', array('method' => 'get', 'action' => $this->getTitle()->getLocalURL())) . Xml::openElement('fieldset') . Xml::element('legend', null, wfMsg('stafflog-filter-label'), false) . Xml::inputLabel(wfMsg('stafflog-filter-user'), 'user', 'StaffLogFilterUser', false, htmlspecialchars($this->request->getText('user', ''), ENT_QUOTES, 'UTF-8')) . Xml::label(wfMsg('stafflog-filter-type'), 'StaffLogFilterType') . ' ' . $sTypesDropDown . ' ' . Xml::submitButton(wfMsg('stafflog-filter-apply')) . Xml::closeElement('fieldset') . Xml::closeElement('form') . Xml::openElement('div', array('class' => 'mw-spcontent')) . $pager->getNavigationBar() . '<ul>' . $pager->getBody() . '</ul>' . $pager->getNavigationBar() . Xml::closeElement('div')); }</pre> </div> </figure> </div> <div class="example-item" id="0x008c44b10b05d01aa903fa4e1a124368e5efa5337d4720d77d3b05e22c994137-61,,84,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #12</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_12" data-hash="0x008c44b10b05d01aa903fa4e1a124368e5efa5337d4720d77d3b05e22c994137" data-area="61,,84,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '12')" class="rating-up btn btn-success" data-id="rating_12"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'12')" class="rating-down btn btn-danger" data-id="rating_12"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x008c44b10b05d01aa903fa4e1a124368e5efa5337d4720d77d3b05e22c994137-61,,84,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x008c44b10b05d01aa903fa4e1a124368e5efa5337d4720d77d3b05e22c994137&fullName=RcFilter.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FRcFilter.php">RcFilter.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="12"> <pre class="line-numbers language-php" data-end="84" data-start="62" data-highlight="75"> /** * Hooks SpecialRecentChangesPanel. See the hook documentation for * documentation of the function parameters. * * Adds a HTMl selector into $items * @param $items * @param $opts * @return bool true */ public static function translationFilterForm( &$items, $opts ) { $opts->consumeValue( 'translations' ); $default = $opts->getValue( 'translations' ); $label = Xml::label( wfMsg( 'translate-rc-translation-filter' ), 'mw-translation-filter' ); $select = new XmlSelect( 'translations', 'mw-translation-filter', $default ); $select->addOption( wfMsg( 'translate-rc-translation-filter-no' ), 'noaction' ); $select->addOption( wfMsg( 'translate-rc-translation-filter-only' ), 'only' ); $select->addOption( wfMsg( 'translate-rc-translation-filter-filter' ), 'filter' ); $select->addOption( wfMsg( 'translate-rc-translation-filter-site' ), 'site' ); $items['translations'] = array( $label, $select->getHTML() ); return true; }</pre> </div> </figure> </div> <div class="example-item" id="0xf6fa58cd4243c316b2bf1d999c111434fd010f2b537368ca61dd7475f645c12a-46,,65,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #13</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_13" data-hash="0xf6fa58cd4243c316b2bf1d999c111434fd010f2b537368ca61dd7475f645c12a" data-area="46,,65,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '13')" class="rating-up btn btn-success" data-id="rating_13"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'13')" class="rating-down btn btn-danger" data-id="rating_13"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xf6fa58cd4243c316b2bf1d999c111434fd010f2b537368ca61dd7475f645c12a-46,,65,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xf6fa58cd4243c316b2bf1d999c111434fd010f2b537368ca61dd7475f645c12a&fullName=vendor%2Fmediawiki%2Ftags%2FREL1_12_0%2Fphase3%2FSpecialAllpages.php&project=BackupTheBerlios%2Fshoutwiki-svn')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FBackupTheBerlios%2Fshoutwiki-svn%2Fblob%2Fmaster%2Fvendor%2Fmediawiki%2Ftags%2FREL1_12_0%2Fphase3%2FSpecialAllpages.php">SpecialAllpages.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FBackupTheBerlios%2Fshoutwiki-svn">BackupTheBerlios/shoutwiki-svn</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="13"> <pre class="line-numbers language-php" data-end="65" data-start="47" data-highlight="61"> /** * HTML for the top form * @param integer $namespace A namespace constant (default NS_MAIN). * @param string $from Article name we are starting listing at. */ function namespaceForm($namespace = NS_MAIN, $from = '') { global $wgScript, $wgContLang; $t = SpecialPage::getTitleFor($this->name); $align = $wgContLang->isRtl() ? 'left' : 'right'; $out = Xml::openElement('div', array('class' => 'namespaceoptions')); $out .= Xml::openElement('form', array('method' => 'get', 'action' => $wgScript)); $out .= Xml::hidden('title', $t->getPrefixedText()); $out .= Xml::openElement('table', array('id' => 'nsselect', 'class' => 'allpages')); $out .= "<tr>\n\t\t\t<td align='{$align}'>" . Xml::label(wfMsg($this->nsfromMsg), 'nsfrom') . "</td>\n\t\t\t<td>" . Xml::input('from', 20, $from, array('id' => 'nsfrom')) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td align='{$align}'>" . Xml::label(wfMsg('namespace'), 'namespace') . "</td>\n\t\t\t<td>" . Xml::namespaceSelector($namespace, null) . Xml::submitButton(wfMsg('allpagessubmit')) . "</td>\n\t\t\t</tr>"; $out .= Xml::closeElement('table'); $out .= Xml::closeElement('form'); $out .= Xml::closeElement('div'); return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0xe2078445f9e5ea473f59df801547638a196a14ffabab99180d974d3095fd5a17-24,,72,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #14</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_14" data-hash="0xe2078445f9e5ea473f59df801547638a196a14ffabab99180d974d3095fd5a17" data-area="24,,72,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '14')" class="rating-up btn btn-success" data-id="rating_14"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'14')" class="rating-down btn btn-danger" data-id="rating_14"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xe2078445f9e5ea473f59df801547638a196a14ffabab99180d974d3095fd5a17-24,,72,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xe2078445f9e5ea473f59df801547638a196a14ffabab99180d974d3095fd5a17&fullName=docs%2Fincludes%2FSpecialLinkSearch.php&project=GodelDesign%2FGodel')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FGodelDesign%2FGodel%2Fblob%2Fmaster%2Fdocs%2Fincludes%2FSpecialLinkSearch.php">SpecialLinkSearch.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FGodelDesign%2FGodel">GodelDesign/Godel</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="14"> <pre class="line-numbers language-php" data-end="72" data-start="25" data-highlight="64">/** * Special:LinkSearch to search the external-links table. */ function wfSpecialLinkSearch($par) { list($limit, $offset) = wfCheckLimits(); global $wgOut, $wgUrlProtocols, $wgMiserMode, $wgLang; $target = $GLOBALS['wgRequest']->getVal('target', $par); $namespace = $GLOBALS['wgRequest']->getIntorNull('namespace', null); $protocols_list[] = ''; foreach ($wgUrlProtocols as $prot) { $protocols_list[] = $prot; } $target2 = $target; $protocol = ''; $pr_sl = strpos($target2, '//'); $pr_cl = strpos($target2, ':'); if ($pr_sl) { // For protocols with '//' $protocol = substr($target2, 0, $pr_sl + 2); $target2 = substr($target2, $pr_sl + 2); } elseif (!$pr_sl && $pr_cl) { // For protocols without '//' like 'mailto:' $protocol = substr($target2, 0, $pr_cl + 1); $target2 = substr($target2, $pr_cl + 1); } elseif ($protocol == '' && $target2 != '') { // default $protocol = 'http://'; } if (!in_array($protocol, $protocols_list)) { // unsupported protocol, show original search request $target2 = $target; $protocol = ''; } $self = Title::makeTitle(NS_SPECIAL, 'Linksearch'); $wgOut->allowClickjacking(); $wgOut->addWikiMsg('linksearch-text', '<nowiki>' . $wgLang->commaList($wgUrlProtocols) . '</nowiki>'); $s = Xml::openElement('form', array('id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'])) . Html::hidden('title', $self->getPrefixedDbKey()) . '<fieldset>' . Xml::element('legend', array(), wfMsg('linksearch')) . Xml::inputLabel(wfMsg('linksearch-pat'), 'target', 'target', 50, $target) . ' '; if (!$wgMiserMode) { $s .= Xml::label(wfMsg('linksearch-ns'), 'namespace') . ' ' . Xml::namespaceSelector($namespace, ''); } $s .= Xml::submitButton(wfMsg('linksearch-ok')) . '</fieldset>' . Xml::closeElement('form'); $wgOut->addHTML($s); if ($target != '') { $searcher = new LinkSearchPage(); $searcher->setParams(array('query' => $target2, 'namespace' => $namespace, 'protocol' => $protocol)); $searcher->doQuery($offset, $limit); } }</pre> </div> </figure> </div> <div class="example-item" id="0xba78ae768433c2ced8378c530b55e2a40a98a6389d71720995dc7e6dadc5b895-52,,74,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #15</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_15" data-hash="0xba78ae768433c2ced8378c530b55e2a40a98a6389d71720995dc7e6dadc5b895" data-area="52,,74,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '15')" class="rating-up btn btn-success" data-id="rating_15"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'15')" class="rating-down btn btn-danger" data-id="rating_15"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xba78ae768433c2ced8378c530b55e2a40a98a6389d71720995dc7e6dadc5b895-52,,74,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xba78ae768433c2ced8378c530b55e2a40a98a6389d71720995dc7e6dadc5b895&fullName=extensions%2Fwikia%2FSpecialLanguageStats.php&project=Tjorriemorrie%2Fapp')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FTjorriemorrie%2Fapp%2Fblob%2Fmaster%2Fextensions%2Fwikia%2FSpecialLanguageStats.php">SpecialLanguageStats.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FTjorriemorrie%2Fapp">Tjorriemorrie/app</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="15"> <pre class="line-numbers language-php" data-end="74" data-start="53" data-highlight="69"> /** * HTML for the top form * @param integer $code A language code (default empty, example: 'en'). * @param bool $suppressComplete If completely translated groups should be suppressed * @return string HTML */ function languageForm($code = '', $suppressComplete = false, $suppressEmpty = false) { global $wgScript; $t = $this->getTitle(); $out = Xml::openElement('div', array('class' => 'languagecode')); $out .= Xml::openElement('form', array('method' => 'get', 'action' => $wgScript)); $out .= Html::hidden('title', $t->getPrefixedText()); $out .= Xml::openElement('fieldset'); $out .= Xml::element('legend', null, wfMsg('translate-language-code')); $out .= Xml::openElement('table', array('id' => 'langcodeselect', 'class' => 'allpages')); $out .= "<tr>\n\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('translate-language-code-field-name'), 'code') . "</td>\n\t\t\t\t<td class='mw-input'>" . Xml::input('code', 30, str_replace('_', ' ', $code), array('id' => 'code')) . "</td></tr><tr><td colspan='2'>" . Xml::checkLabel(wfMsg('translate-suppress-complete'), 'suppresscomplete', 'suppresscomplete', $suppressComplete) . Xml::checkLabel(wfMsg('translate-suppress-empty'), 'suppressempty', 'suppressempty', $suppressEmpty) . "</td>" . "</tr>" . "<tr>" . "<td class='mw-input'>" . Xml::submitButton(wfMsg('allpagessubmit')) . "</td>\n\t\t\t</tr>"; $out .= Xml::closeElement('table'); $out .= Xml::closeElement('fieldset'); $out .= Xml::closeElement('form'); $out .= Xml::closeElement('div'); return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0x1556960c961c909772a38e6fde8c85aa2430cafc2d2542ab8eaa4389f860d9d5-16,,32,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #16</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_16" data-hash="0x1556960c961c909772a38e6fde8c85aa2430cafc2d2542ab8eaa4389f860d9d5" data-area="16,,32,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '16')" class="rating-up btn btn-success" data-id="rating_16"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'16')" class="rating-down btn btn-danger" data-id="rating_16"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x1556960c961c909772a38e6fde8c85aa2430cafc2d2542ab8eaa4389f860d9d5-16,,32,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x1556960c961c909772a38e6fde8c85aa2430cafc2d2542ab8eaa4389f860d9d5&fullName=vendor%2Fmediawiki%2Ftags%2FREL1_12_0%2Fphase3%2FSpecialWithoutinterwiki.php&project=BackupTheBerlios%2Fshoutwiki-svn')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FBackupTheBerlios%2Fshoutwiki-svn%2Fblob%2Fmaster%2Fvendor%2Fmediawiki%2Ftags%2FREL1_12_0%2Fphase3%2FSpecialWithoutinterwiki.php">SpecialWithoutinterwiki.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FBackupTheBerlios%2Fshoutwiki-svn">BackupTheBerlios/shoutwiki-svn</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="16"> <pre class="line-numbers language-php" data-end="32" data-start="17" data-highlight="28"> function getPageHeader() { global $wgScript, $wgContLang; $prefix = $this->prefix; $t = SpecialPage::getTitleFor($this->getName()); $align = $wgContLang->isRtl() ? 'left' : 'right'; $s = '<p>' . wfMsgExt('withoutinterwiki-header', array('parseinline')) . '</p>'; $s .= Xml::openElement('div', array('class' => 'namespaceoptions')); $s .= Xml::openElement('form', array('method' => 'get', 'action' => $wgScript)); $s .= Xml::hidden('title', $t->getPrefixedText()); $s .= Xml::openElement('table', array('id' => 'nsselect', 'class' => 'withoutinterwiki')); $s .= "<tr>\n\t\t\t\t<td align='{$align}'>" . Xml::label(wfMsg('allpagesprefix'), 'wiprefix') . "</td>\n\t\t\t\t<td>" . Xml::input('prefix', 20, htmlspecialchars($prefix), array('id' => 'wiprefix')) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td align='{$align}'></td>\n\t\t\t\t<td>" . Xml::submitButton(wfMsgHtml('withoutinterwiki-submit')) . "</td>\n\t\t\t</tr>"; $s .= Xml::closeElement('table'); $s .= Xml::closeElement('form'); $s .= Xml::closeElement('div'); return $s; }</pre> </div> </figure> </div> <div class="example-item" id="0xecd20a1c4a7953f16cf7126059fd1ca48881a32a0b19736d3dcbf4c3e189800c-52,,74,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #17</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_17" data-hash="0xecd20a1c4a7953f16cf7126059fd1ca48881a32a0b19736d3dcbf4c3e189800c" data-area="52,,74,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '17')" class="rating-up btn btn-success" data-id="rating_17"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'17')" class="rating-down btn btn-danger" data-id="rating_17"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xecd20a1c4a7953f16cf7126059fd1ca48881a32a0b19736d3dcbf4c3e189800c-52,,74,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xecd20a1c4a7953f16cf7126059fd1ca48881a32a0b19736d3dcbf4c3e189800c&fullName=wiki%2Fincludes%2FSpecialAllpages.php&project=BackupTheBerlios%2Fswahili-dict')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FBackupTheBerlios%2Fswahili-dict%2Fblob%2Fmaster%2Fwiki%2Fincludes%2FSpecialAllpages.php">SpecialAllpages.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FBackupTheBerlios%2Fswahili-dict">BackupTheBerlios/swahili-dict</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="17"> <pre class="line-numbers language-php" data-end="74" data-start="53" data-highlight="69"> /** * HTML for the top form * @param integer $namespace A namespace constant (default NS_MAIN). * @param string $from dbKey we are starting listing at. * @param string $to dbKey we are ending listing at. */ function namespaceForm($namespace = NS_MAIN, $from = '', $to = '') { global $wgScript; $t = $this->getTitle(); $out = Xml::openElement('div', array('class' => 'namespaceoptions')); $out .= Xml::openElement('form', array('method' => 'get', 'action' => $wgScript)); $out .= Xml::hidden('title', $t->getPrefixedText()); $out .= Xml::openElement('fieldset'); $out .= Xml::element('legend', null, wfMsg('allpages')); $out .= Xml::openElement('table', array('id' => 'nsselect', 'class' => 'allpages')); $out .= "<tr>\n\t<td class='mw-label'>" . Xml::label(wfMsg('allpagesfrom'), 'nsfrom') . "\t</td>\n\t<td class='mw-input'>" . Xml::input('from', 30, str_replace('_', ' ', $from), array('id' => 'nsfrom')) . "\t</td>\n</tr>\n<tr>\n\t<td class='mw-label'>" . Xml::label(wfMsg('allpagesto'), 'nsto') . "\t</td>\n\t\t\t<td class='mw-input'>" . Xml::input('to', 30, str_replace('_', ' ', $to), array('id' => 'nsto')) . "\t\t</td>\n</tr>\n<tr>\n\t<td class='mw-label'>" . Xml::label(wfMsg('namespace'), 'namespace') . "\t</td>\n\t\t\t<td class='mw-input'>" . Xml::namespaceSelector($namespace, null) . ' ' . Xml::submitButton(wfMsg('allpagessubmit')) . "\t</td>\n</tr>"; $out .= Xml::closeElement('table'); $out .= Xml::closeElement('fieldset'); $out .= Xml::closeElement('form'); $out .= Xml::closeElement('div'); return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0x0b5ba66a1fd2416873d5dca72a38e7bedd769a82c1b226bca5b083713a1ee99f-55,,99,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #18</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_18" data-hash="0x0b5ba66a1fd2416873d5dca72a38e7bedd769a82c1b226bca5b083713a1ee99f" data-area="55,,99,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '18')" class="rating-up btn btn-success" data-id="rating_18"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'18')" class="rating-down btn btn-danger" data-id="rating_18"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x0b5ba66a1fd2416873d5dca72a38e7bedd769a82c1b226bca5b083713a1ee99f-55,,99,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x0b5ba66a1fd2416873d5dca72a38e7bedd769a82c1b226bca5b083713a1ee99f&fullName=Translate%2FSpecialMessageGroupStats.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FTranslate%2FSpecialMessageGroupStats.php">SpecialMessageGroupStats.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="18"> <pre class="line-numbers language-php" data-end="99" data-start="56" data-highlight="69"> function getform() { global $wgScript; $out = Html::openElement( 'div' ); $out .= Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ); $out .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); $out .= Html::hidden( 'x', 'D' ); // To detect submission $out .= Html::openElement( 'fieldset' ); $out .= Html::element( 'legend', null, wfMsg( 'translate-mgs-fieldset' ) ); $out .= Html::openElement( 'table' ); $out .= Html::openElement( 'tr' ); $out .= Html::openElement( 'td', array( 'class' => 'mw-label' ) ); $out .= Xml::label( wfMsg( 'translate-mgs-group' ), 'group' ); $out .= Html::closeElement( 'td' ); $out .= Html::openElement( 'td', array( 'class' => 'mw-input' ) ); $out .= TranslateUtils::groupSelector( $this->target )->getHTML(); $out .= Html::closeElement( 'td' ); $out .= Html::closeElement( 'tr' ); $out .= Html::openElement( 'tr' ); $out .= Html::openElement( 'td', array( 'colspan' => 2 ) ); $out .= Xml::checkLabel( wfMsg( 'translate-mgs-nocomplete' ), 'suppresscomplete', 'suppresscomplete', $this->noComplete ); $out .= Html::closeElement( 'td' ); $out .= Html::closeElement( 'tr' ); $out .= Html::openElement( 'tr' ); $out .= Html::openElement( 'td', array( 'colspan' => 2 ) ); $out .= Xml::checkLabel( wfMsg( 'translate-mgs-noempty' ), 'suppressempty', 'suppressempty', $this->noEmpty ); $out .= Html::closeElement( 'td' ); $out .= Html::closeElement( 'tr' ); $out .= Html::openElement( 'tr' ); $out .= Html::openElement( 'td', array( 'class' => 'mw-input', 'colspan' => 2 ) ); $out .= Xml::submitButton( wfMsg( 'translate-mgs-submit' ) ); $out .= Html::closeElement( 'td' ); $out .= Html::closeElement( 'tr' ); $out .= Html::closeElement( 'table' ); $out .= Html::closeElement( 'fieldset' ); $out .= Html::closeElement( 'form' ); $out .= Html::closeElement( 'div' ); return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0x30b81dd62eb1f56d5f7a3f7faef5328d65acb790eb52913c492ad01c6140b3a3-47,,64,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #19</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_19" data-hash="0x30b81dd62eb1f56d5f7a3f7faef5328d65acb790eb52913c492ad01c6140b3a3" data-area="47,,64,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '19')" class="rating-up btn btn-success" data-id="rating_19"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'19')" class="rating-down btn btn-danger" data-id="rating_19"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x30b81dd62eb1f56d5f7a3f7faef5328d65acb790eb52913c492ad01c6140b3a3-47,,64,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x30b81dd62eb1f56d5f7a3f7faef5328d65acb790eb52913c492ad01c6140b3a3&fullName=TestWikiRC.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FTestWikiRC.php">TestWikiRC.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="19"> <pre class="line-numbers language-php" data-end="64" data-start="48" data-highlight="54"> static function onRcForm( &$items, $opts ) { global $wmincProjects, $wmincProjectSite, $wmincLangCodeLength; list( $projectvalue, $codevalue ) = self::getValues(); $opts->consumeValue( 'rc-testwiki-project' ); $opts->consumeValue( 'rc-testwiki-code' ); $label = Xml::label( wfMsg( 'wminc-testwiki' ), 'rc-testwiki' ); $select = new XmlSelect( 'rc-testwiki-project', 'rc-testwiki-project', $projectvalue ); $select->addOption( wfMsg( 'wminc-testwiki-none' ), 'none' ); foreach( $wmincProjects as $prefix => $name ) { $select->addOption( $name, $prefix ); } $select->addOption( $wmincProjectSite['name'], $wmincProjectSite['short'] ); $langcode = Xml::input( 'rc-testwiki-code', (int)$wmincLangCodeLength, $codevalue, array( 'id' => 'rc-testwiki-code', 'maxlength' => (int)$wmincLangCodeLength ) ); $items['testwiki'] = array( $label, $select->getHTML() . ' ' . $langcode ); return true; }</pre> </div> </figure> </div> <div class="example-item" id="0x725bfc60130b9e8687fb7ab426914f7f7eb960cbdc5a20f36e77c0c0569c0569-22,,39,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #20</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_20" data-hash="0x725bfc60130b9e8687fb7ab426914f7f7eb960cbdc5a20f36e77c0c0569c0569" data-area="22,,39,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '20')" class="rating-up btn btn-success" data-id="rating_20"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'20')" class="rating-down btn btn-danger" data-id="rating_20"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x725bfc60130b9e8687fb7ab426914f7f7eb960cbdc5a20f36e77c0c0569c0569-22,,39,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x725bfc60130b9e8687fb7ab426914f7f7eb960cbdc5a20f36e77c0c0569c0569&fullName=delphi-jedi.org%2Fwiki%2Fw%2Fincludes%2FSpecialListUserRestrictions.php&project=amjadtbssm%2Fwebsite')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Famjadtbssm%2Fwebsite%2Fblob%2Fmaster%2Fdelphi-jedi.org%2Fwiki%2Fw%2Fincludes%2FSpecialListUserRestrictions.php">SpecialListUserRestrictions.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Famjadtbssm%2Fwebsite">amjadtbssm/website</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="20"> <pre class="line-numbers language-php" data-end="39" data-start="23" data-highlight="34"> public function getHTML() { global $wgRequest, $wgScript, $wgTitle; $s = ''; $s .= Xml::fieldset(wfMsg('listuserrestrictions-legend')); $s .= "<form action=\"{$wgScript}\">"; $s .= Xml::hidden('title', $wgTitle->getPrefixedDbKey()); $s .= Xml::label(wfMsgHtml('listuserrestrictions-type'), 'type') . '&nbsp;' . self::typeSelector('type', $wgRequest->getVal('type'), 'type'); $s .= '&nbsp;'; $s .= Xml::inputLabel(wfMsgHtml('listuserrestrictions-user'), 'user', 'user', false, $wgRequest->getVal('user')); $s .= '<p>'; $s .= Xml::label(wfMsgHtml('listuserrestrictions-namespace'), 'namespace') . '&nbsp;' . Xml::namespaceSelector($wgRequest->getVal('namespace'), '', 'namespace'); $s .= '&nbsp;'; $s .= Xml::inputLabel(wfMsgHtml('listuserrestrictions-page'), 'page', 'page', false, $wgRequest->getVal('page')); $s .= Xml::submitButton(wfMsg('listuserrestrictions-submit')); $s .= "</p></form></fieldset>"; return $s; }</pre> </div> </figure> </div> <div class="example-item" id="0x9ace7d70ab4c3ca16f3c6ed73150c8152c1869990ec7a996e6b243f5ae14b740-32,,73,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #21</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_21" data-hash="0x9ace7d70ab4c3ca16f3c6ed73150c8152c1869990ec7a996e6b243f5ae14b740" data-area="32,,73,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '21')" class="rating-up btn btn-success" data-id="rating_21"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'21')" class="rating-down btn btn-danger" data-id="rating_21"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x9ace7d70ab4c3ca16f3c6ed73150c8152c1869990ec7a996e6b243f5ae14b740-32,,73,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x9ace7d70ab4c3ca16f3c6ed73150c8152c1869990ec7a996e6b243f5ae14b740&fullName=mediawiki-1.23.3%2Fextensions%2FFlaggedRevs%2Ffrontend%2Fspecialpages%2FUnreviewedPages_body.php&project=crippsy14%2Forange-smorange')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fcrippsy14%2Forange-smorange%2Fblob%2Fmaster%2Fmediawiki-1.23.3%2Fextensions%2FFlaggedRevs%2Ffrontend%2Fspecialpages%2FUnreviewedPages_body.php">UnreviewedPages_body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fcrippsy14%2Forange-smorange">crippsy14/orange-smorange</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="21"> <pre class="line-numbers language-php" data-end="73" data-start="33" data-highlight="54"> protected function showForm() { global $wgScript; # Add explanatory text $this->getOutput()->addWikiMsg('unreviewedpages-list', $this->getLanguage()->formatNum($this->pager->getNumRows())); # show/hide links $showhide = array($this->msg('show')->escaped(), $this->msg('hide')->escaped()); $onoff = 1 - $this->hideRedirs; $link = Linker::link($this->getPageTitle(), $showhide[$onoff], array(), array('hideredirs' => $onoff, 'category' => $this->category, 'namespace' => $this->namespace)); $showhideredirs = $this->msg('whatlinkshere-hideredirs')->rawParams($link)->escaped(); # Add form... $form = Html::openElement('form', array('name' => 'unreviewedpages', 'action' => $wgScript, 'method' => 'get')) . "\n"; $form .= "<fieldset><legend>" . $this->msg('unreviewedpages-legend')->escaped() . "</legend>\n"; $form .= Html::hidden('title', $this->getPageTitle()->getPrefixedDBKey()) . "\n"; # Add dropdowns as needed if (count(FlaggedRevs::getReviewNamespaces()) > 1) { $form .= FlaggedRevsXML::getNamespaceMenu($this->namespace) . '&#160;'; } if (FlaggedRevs::qualityVersions()) { $form .= FlaggedRevsXML::getLevelMenu($this->level, false, 1) . '&#160;'; } $form .= "<span style='white-space: nowrap;'>" . Xml::label($this->msg('unreviewedpages-category')->text(), 'category') . '&#160;' . Xml::input('category', 30, $this->category, array('id' => 'category')) . '</span><br />'; $form .= $showhideredirs . '&#160;&#160;'; $form .= Xml::submitButton($this->msg('allpagessubmit')->text()); $form .= '</fieldset>'; $form .= Html::closeElement('form') . "\n"; # Query may get too slow to be live... if (!$this->live) { $dbr = wfGetDB(DB_SLAVE); $ts = $dbr->selectField('querycache_info', 'qci_timestamp', array('qci_type' => 'fr_unreviewedpages'), __METHOD__); if ($ts) { $ts = wfTimestamp(TS_MW, $ts); $td = $this->getLanguage()->timeanddate($ts); $d = $this->getLanguage()->date($ts); $t = $this->getLanguage()->time($ts); $form .= $this->msg('perfcachedts', $td, $d, $t)->parseAsBlock(); } else { $form .= $this->msg('perfcached')->parseAsBlock(); } } $this->getOutput()->addHTML($form); }</pre> </div> </figure> </div> <div class="example-item" id="0xad0bf121099d3168e1502addb9d0eb0219788fc0ec918fd939afd5f922b76615-64,,90,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #22</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_22" data-hash="0xad0bf121099d3168e1502addb9d0eb0219788fc0ec918fd939afd5f922b76615" data-area="64,,90,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '22')" class="rating-up btn btn-success" data-id="rating_22"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'22')" class="rating-down btn btn-danger" data-id="rating_22"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xad0bf121099d3168e1502addb9d0eb0219788fc0ec918fd939afd5f922b76615-64,,90,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xad0bf121099d3168e1502addb9d0eb0219788fc0ec918fd939afd5f922b76615&fullName=ExpandTemplates_body.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FExpandTemplates_body.php">ExpandTemplates_body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="22"> <pre class="line-numbers language-php" data-end="90" data-start="65" data-highlight="78"> /** * Generate a form allowing users to enter information * * @param $title Value for context title field * @param $input Value for input textbox * @return string */ private function makeForm($title, $input) { $self = $this->getTitle(); $form = Xml::openElement('form', array('method' => 'post', 'action' => $self->getLocalUrl())); $form .= "<fieldset><legend>" . wfMsgHtml('expandtemplates') . "</legend>\n"; $form .= '<p>' . Xml::inputLabel(wfMsgNoTrans('expand_templates_title'), 'contexttitle', 'contexttitle', 60, $title) . '</p>'; $form .= '<p>' . Xml::label(wfMsg('expand_templates_input'), 'input') . '</p>'; $form .= Xml::openElement('textarea', array('name' => 'input', 'id' => 'input', 'rows' => 10, 'cols' => 10)); $form .= htmlspecialchars($input); $form .= Xml::closeElement('textarea'); $form .= '<p>' . Xml::checkLabel(wfMsg('expand_templates_remove_comments'), 'removecomments', 'removecomments', $this->removeComments) . '</p>'; $form .= '<p>' . Xml::checkLabel(wfMsg('expand_templates_remove_nowiki'), 'removenowiki', 'removenowiki', $this->removeNowiki) . '</p>'; if ($this->isNewParser) { $form .= '<p>' . Xml::checkLabel(wfMsg('expand_templates_generate_xml'), 'generate_xml', 'generate_xml', $this->generateXML) . '</p>'; } $form .= '<p>' . Xml::submitButton(wfMsg('expand_templates_ok'), array('accesskey' => 's')) . '</p>'; $form .= "</fieldset>\n"; $form .= Xml::closeElement('form'); return $form; }</pre> </div> </figure> </div> <div class="example-item" id="0x628c314cb0fba0f770c1bbe553d694a1849ba4f66177cff7337ccf0ffc799cab-42,,68,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #23</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_23" data-hash="0x628c314cb0fba0f770c1bbe553d694a1849ba4f66177cff7337ccf0ffc799cab" data-area="42,,68,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '23')" class="rating-up btn btn-success" data-id="rating_23"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'23')" class="rating-down btn btn-danger" data-id="rating_23"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x628c314cb0fba0f770c1bbe553d694a1849ba4f66177cff7337ccf0ffc799cab-42,,68,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x628c314cb0fba0f770c1bbe553d694a1849ba4f66177cff7337ccf0ffc799cab&fullName=EnhanceContactForm.php&project=realsoc%2Fmediawiki-extensions')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions%2Fblob%2Fmaster%2FEnhanceContactForm.php">EnhanceContactForm.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Frealsoc%2Fmediawiki-extensions">realsoc/mediawiki-extensions</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="23"> <pre class="line-numbers language-php" data-end="68" data-start="43" data-highlight="54">/** * Add new fields (1 shown + 1-5 hidden ones) to Special:Contact. * * @param $contactForm Object: instance of EmailContactForm class * @param $form Sringt: HTML * @return Boolean: true */ function addContactFormFields($contactForm, $form) { global $wgServer, $wgDBname; $form .= '<tr> <td class="mw-label">' . Xml::label(wfMsg('contactpage-wikiurl'), 'wpWikiURL') . '</td> <td class="mw-input" id="mw-contactpage-address">' . Xml::input('wpWikiURL', 60, $wgServer, array('type' => 'text', 'maxlength' => 200)) . '</td> </tr> <tr>' . Html::Hidden('wpDBname', $wgDBname, array('maxlength' => 100)) . "</tr>\n\t\t\t"; if (class_exists('MyInfo')) { $myinfo = new MyInfo(); $myinfo->browser = get_browser(null, true); $myinfo->info = browser_detection('full'); $myinfo->info[] = browser_detection('moz_version'); $form .= '<tr>' . Html::Hidden('wpBrowser', $myinfo->getBrowser(), array('maxlength' => 255)) . '</tr> <tr>' . Html::Hidden('wpOperatingSystem', $myinfo->getOs(), array('maxlength' => 255)) . '</tr> <tr>' . Html::Hidden('wpSkinName', $myinfo->getSkin(), array('maxlength' => 35)) . '</tr> <tr>' . Html::Hidden('wpUserAgent', $myinfo->getUAgent(), array('maxlength' => 500)) . '</tr>'; } return true; }</pre> </div> </figure> </div> <div class="example-item" id="0x927acdab7bab11f93e36074c122cfcafe35bbc44816de0b7c6d9f6b7de3e24ea-49,,68,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #24</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_24" data-hash="0x927acdab7bab11f93e36074c122cfcafe35bbc44816de0b7c6d9f6b7de3e24ea" data-area="49,,68,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '24')" class="rating-up btn btn-success" data-id="rating_24"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'24')" class="rating-down btn btn-danger" data-id="rating_24"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0x927acdab7bab11f93e36074c122cfcafe35bbc44816de0b7c6d9f6b7de3e24ea-49,,68,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0x927acdab7bab11f93e36074c122cfcafe35bbc44816de0b7c6d9f6b7de3e24ea&fullName=mediawiki-1.23.3%2Fextensions%2FFlaggedRevs%2Ffrontend%2Fspecialpages%2FProblemChanges_body.php&project=crippsy14%2Forange-smorange')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fcrippsy14%2Forange-smorange%2Fblob%2Fmaster%2Fmediawiki-1.23.3%2Fextensions%2FFlaggedRevs%2Ffrontend%2Fspecialpages%2FProblemChanges_body.php">ProblemChanges_body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fcrippsy14%2Forange-smorange">crippsy14/orange-smorange</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="24"> <pre class="line-numbers language-php" data-end="68" data-start="50" data-highlight="64"> public function showForm() { global $wgScript; // Add explanatory text $this->getOutput()->addWikiMsg('problemchanges-list', $this->getLanguage()->formatNum($this->pager->getNumRows())); $form = Html::openElement('form', array('name' => 'problemchanges', 'action' => $wgScript, 'method' => 'get')) . "\n"; $form .= "<fieldset><legend>" . $this->msg('problemchanges-legend')->escaped() . "</legend>\n"; $form .= Html::hidden('title', $this->getPageTitle()->getPrefixedDBKey()) . "\n"; $form .= FlaggedRevs::qualityVersions() ? "<span style='white-space: nowrap;'>" . FlaggedRevsXML::getLevelMenu($this->level, 'revreview-filter-stable') . '</span> ' : ""; $tagForm = ChangeTags::buildTagFilterSelector($this->tag); if (count($tagForm)) { $form .= Xml::tags('td', array('class' => 'mw-label'), $tagForm[0]); $form .= Xml::tags('td', array('class' => 'mw-input'), $tagForm[1]); } $form .= '<br />' . Xml::label($this->msg("problemchanges-category")->text(), 'wpCategory') . '&#160;' . Xml::input('category', 30, $this->category, array('id' => 'wpCategory')) . ' '; $form .= Xml::submitButton($this->msg('allpagessubmit')->text()) . "\n"; $form .= '</fieldset>'; $form .= Html::closeElement('form') . "\n"; $this->getOutput()->addHTML($form); }</pre> </div> </figure> </div> <div class="example-item" id="0xfcdda7870104cb37dd121867bfac29632aaa56de5c1d712e631568b77d4bf5c6-71,,91,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #25</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_25" data-hash="0xfcdda7870104cb37dd121867bfac29632aaa56de5c1d712e631568b77d4bf5c6" data-area="71,,91,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '25')" class="rating-up btn btn-success" data-id="rating_25"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'25')" class="rating-down btn btn-danger" data-id="rating_25"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xfcdda7870104cb37dd121867bfac29632aaa56de5c1d712e631568b77d4bf5c6-71,,91,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xfcdda7870104cb37dd121867bfac29632aaa56de5c1d712e631568b77d4bf5c6&fullName=i18n.ro%2FSpecialResetpass.php&project=Jobava%2Fdiacritice-meta-repo')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FJobava%2Fdiacritice-meta-repo%2Fblob%2Fmaster%2Fi18n.ro%2FSpecialResetpass.php">SpecialResetpass.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FJobava%2Fdiacritice-meta-repo">Jobava/diacritice-meta-repo</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="25"> <pre class="line-numbers language-php" data-end="91" data-start="72" data-highlight="84"> function pretty($fields) { $out = ''; foreach ($fields as $list) { list($name, $label, $type, $value) = $list; if ($type == 'text') { $field = '<tt>' . htmlspecialchars($value) . '</tt>'; } else { $field = Xml::input($name, 20, $value, array('id' => $name, 'type' => $type)); } $out .= '<tr>'; $out .= '<td align="right">'; $out .= Xml::label(wfMsg($label), $name); $out .= '</td>'; $out .= '<td>'; $out .= $field; $out .= '</td>'; $out .= '</tr>'; } return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0xa0d661a5b5ec3e8054293a8f8d2a8018d3230b507e3632d6011283b422f27896-62,,88,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #26</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_26" data-hash="0xa0d661a5b5ec3e8054293a8f8d2a8018d3230b507e3632d6011283b422f27896" data-area="62,,88,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '26')" class="rating-up btn btn-success" data-id="rating_26"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'26')" class="rating-down btn btn-danger" data-id="rating_26"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xa0d661a5b5ec3e8054293a8f8d2a8018d3230b507e3632d6011283b422f27896-62,,88,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xa0d661a5b5ec3e8054293a8f8d2a8018d3230b507e3632d6011283b422f27896&fullName=extensions%2FTranslate%2FSpecialTranslations.php&project=schwarer2006%2Fwikia')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fschwarer2006%2Fwikia%2Fblob%2Fmaster%2Fextensions%2FTranslate%2FSpecialTranslations.php">SpecialTranslations.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fschwarer2006%2Fwikia">schwarer2006/wikia</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="26"> <pre class="line-numbers language-php" data-end="88" data-start="63" data-highlight="83"> /** * Message input fieldset * * @param $title Title (default: null) * @return \string HTML for fieldset. */ function namespaceMessageForm(Title $title = null) { global $wgScript; $namespaces = new XmlSelect('namespace', 'namespace'); $namespaces->setDefault($title->getNamespace()); foreach ($this->getSortedNamespaces() as $text => $index) { $namespaces->addOption($text, $index); } $out = Xml::openElement('div', array('class' => 'namespaceoptions')); $out .= Xml::openElement('form', array('method' => 'get', 'action' => $wgScript)); $out .= Html::hidden('title', $this->getTitle()->getPrefixedText()); $out .= Xml::openElement('fieldset'); $out .= Xml::element('legend', null, wfMsg('translate-translations-fieldset-title')); $out .= Xml::openElement('table', array('id' => 'nsselect', 'class' => 'allpages')); $out .= "<tr>\n\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('translate-translations-messagename'), 'message') . "</td>\n\t\t\t\t<td class='mw-input'>" . Xml::input('message', 30, $title->getText(), array('id' => 'message')) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('translate-translations-project'), 'namespace') . "</td>\n\t\t\t\t<td class='mw-input'>" . $namespaces->getHTML() . ' ' . Xml::submitButton(wfMsg('allpagessubmit')) . "</td>\n\t\t\t\t</tr>"; $out .= Xml::closeElement('table'); $out .= Xml::closeElement('fieldset'); $out .= Xml::closeElement('form'); $out .= Xml::closeElement('div'); return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0xfff3a3fff32b74fc0d7f83b89105e577266666664f96b12b312377e78a92163c-21,,171,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #27</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_27" data-hash="0xfff3a3fff32b74fc0d7f83b89105e577266666664f96b12b312377e78a92163c" data-area="21,,171,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '27')" class="rating-up btn btn-success" data-id="rating_27"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'27')" class="rating-down btn btn-danger" data-id="rating_27"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xfff3a3fff32b74fc0d7f83b89105e577266666664f96b12b312377e78a92163c-21,,171,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xfff3a3fff32b74fc0d7f83b89105e577266666664f96b12b312377e78a92163c&fullName=extensions%2FSpecialRenameuser_body.php&project=ErdemA%2Fwikihow')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FErdemA%2Fwikihow%2Fblob%2Fmaster%2Fextensions%2FSpecialRenameuser_body.php">SpecialRenameuser_body.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2FErdemA%2Fwikihow">ErdemA/wikihow</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="27"> <pre class="line-numbers language-php" data-end="171" data-start="22" data-highlight="52"> /** * Show the special page * * @param mixed $par Parameter passed to the page */ public function execute($par) { global $wgOut, $wgUser, $wgTitle, $wgRequest, $wgContLang, $wgLang; global $wgVersion, $wgMaxNameChars, $wgCapitalLinks; $this->setHeaders(); if (!$wgUser->isAllowed('renameuser')) { $wgOut->permissionRequired('renameuser'); return; } if (wfReadOnly()) { $wgOut->readOnlyPage(); return; } $showBlockLog = $wgRequest->getBool('submit-showBlockLog'); $oldusername = Title::newFromText($wgRequest->getText('oldusername'), NS_USER); $newusername = Title::newFromText($wgContLang->ucfirst($wgRequest->getText('newusername')), NS_USER); // Force uppercase of newusername otherweise wikis with wgCapitalLinks=false can create lc usernames $oun = is_object($oldusername) ? $oldusername->getText() : ''; $nun = is_object($newusername) ? $newusername->getText() : ''; $token = $wgUser->editToken(); $reason = $wgRequest->getText('reason'); $is_checked = true; if ($wgRequest->wasPosted() && !$wgRequest->getCheck('movepages')) { $is_checked = false; } $wgOut->addHTML("\n\t\t\t<!-- Current contributions limit is " . RENAMEUSER_CONTRIBLIMIT . " -->" . Xml::openElement('form', array('method' => 'post', 'action' => $wgTitle->getLocalUrl(), 'id' => 'renameuser')) . Xml::openElement('fieldset') . Xml::element('legend', null, wfMsg('renameuser')) . Xml::openElement('table', array('id' => 'mw-renameuser-table')) . "<tr>\n\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('renameuserold'), 'oldusername') . "</td>\n\t\t\t\t<td class='mw-input'>" . Xml::input('oldusername', 20, $oun, array('type' => 'text', 'tabindex' => '1')) . ' ' . Xml::submitButton(wfMsg('blocklogpage'), array('name' => 'submit-showBlockLog', 'id' => 'submit-showBlockLog', 'tabindex' => '2')) . ' ' . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('renameusernew'), 'newusername') . "</td>\n\t\t\t\t<td class='mw-input'>" . Xml::input('newusername', 20, $nun, array('type' => 'text', 'tabindex' => '3')) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td class='mw-label'>" . Xml::label(wfMsg('renameuserreason'), 'reason') . "</td>\n\t\t\t\t<td class='mw-input'>" . Xml::input('reason', 40, $reason, array('type' => 'text', 'tabindex' => '4', 'maxlength' => 255)) . "</td>\n\t\t\t</tr>"); if ($wgUser->isAllowed('move') && version_compare($wgVersion, '1.9alpha', '>=')) { $wgOut->addHTML("\n\t\t\t\t<tr>\n\t\t\t\t\t<td>&nbsp;\n\t\t\t\t\t</td>\n\t\t\t\t\t<td class='mw-input'>" . Xml::checkLabel(wfMsg('renameusermove'), 'movepages', 'movepages', $is_checked, array('tabindex' => '5')) . "</td>\n\t\t\t\t</tr>"); } $wgOut->addHTML("\n\t\t\t<tr>\n\t\t\t\t<td>&nbsp;\n\t\t\t\t</td>\n\t\t\t\t<td class='mw-submit'>" . Xml::submitButton(wfMsg('renameusersubmit'), array('name' => 'submit', 'tabindex' => '6', 'id' => 'submit')) . "</td>\n\t\t\t</tr>" . Xml::closeElement('table') . Xml::closeElement('fieldset') . Xml::hidden('token', $token) . Xml::closeElement('form') . "\n"); // Show block log if requested if ($showBlockLog && is_object($oldusername)) { $this->showLogExtract($oldusername, 'block', $wgOut); return; } if ($wgRequest->getText('token') === '') { # They probably haven't even submitted the form, so don't go further. return; } elseif (!$wgRequest->wasPosted() || !$wgUser->matchEditToken($wgRequest->getVal('token'))) { $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameuser-error-request') . "</div>"); return; } elseif (!is_object($oldusername)) { // FIXME: This is bogus. Invalid titles need to be rename-able! (bug 12654) $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameusererrorinvalid', $wgRequest->getText('oldusername')) . "</div>"); return; } elseif (!is_object($newusername)) { $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameusererrorinvalid', $wgRequest->getText('newusername')) . "</div>"); return; } elseif ($oldusername->getText() == $newusername->getText()) { $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameuser-error-same-user') . "</div>"); return; } // Suppress username validation of old username $olduser = User::newFromName($oldusername->getText(), false); $newuser = User::newFromName($newusername->getText()); // It won't be an object if for instance "|" is supplied as a value if (!is_object($olduser)) { $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameusererrorinvalid', $oldusername->getText()) . "</div>"); return; } if (!is_object($newuser) || !User::isCreatableName($newuser->getName())) { $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameusererrorinvalid', $newusername->getText()) . "</div>"); return; } // Check for the existence of lowercase oldusername in database. // Until r19631 it was possible to rename a user to a name with first character as lowercase if ($wgRequest->getText('oldusername') !== $wgContLang->ucfirst($wgRequest->getText('oldusername'))) { // oldusername was entered as lowercase -> check for existence in table 'user' $dbr_lc = wfGetDB(DB_SLAVE); $s = trim($wgRequest->getText('oldusername')); $uid = $dbr_lc->selectField('user', 'user_id', array('BINARY user_name' => $s), __METHOD__); if ($uid === false) { $uid = 0; # if ( !$wgCapitalLinks ) { # $uid = 0; // We are on a lowercase wiki but lowercase username does not exists # } else { # $uid = $olduser->idForName(); // We are on a standard uppercase wiki, use normal # } } else { // username with lowercase exists // Title::newFromText was nice, but forces uppercase // for older rename accidents on lowercase wikis we need the lowercase username as entered in the form $oldusername->mTextform = $wgRequest->getText('oldusername'); $oldusername->mUrlform = $wgRequest->getText('oldusername'); $oldusername->mDbkeyform = $wgRequest->getText('oldusername'); } } else { // oldusername was entered as upperase -> standard procedure $uid = $olduser->idForName(); } if ($uid == 0) { $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameusererrordoesnotexist', $wgRequest->getText('oldusername')) . "</div>"); return; } if ($newuser->idForName() != 0) { $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameusererrorexists', $newusername->getText()) . "</div>"); return; } // Always get the edits count, it will be used for the log message $contribs = User::edits($uid); // Check edit count if (!$wgUser->isAllowed('siteadmin')) { if (RENAMEUSER_CONTRIBLIMIT != 0 && $contribs > RENAMEUSER_CONTRIBLIMIT) { $wgOut->addWikiText("<div class=\"errorbox\">" . wfMsg('renameusererrortoomany', $oldusername->getText(), $wgLang->formatNum($contribs), $wgLang->formatNum(RENAMEUSER_CONTRIBLIMIT)) . "</div>"); return; } } // Give other affected extensions a chance to validate or abort if (!wfRunHooks('RenameUserAbort', array($uid, $oldusername->getText(), $newusername->getText()))) { return; } $rename = new RenameuserSQL($oldusername->getText(), $newusername->getText(), $uid); $rename->rename(); $log = new LogPage('renameuser'); $log->addEntry('renameuser', $oldusername, wfMsgExt('renameuser-log', array('parsemag', 'content'), $wgContLang->formatNum($contribs), $reason), $newusername->getText()); $wgOut->addWikiText("<div class=\"successbox\">" . wfMsg('renameusersuccess', $oldusername->getText(), $newusername->getText()) . "</div><br style=\"clear:both\" />"); if ($wgRequest->getCheck('movepages') && $wgUser->isAllowed('move') && version_compare($wgVersion, '1.9alpha', '>=')) { $dbr =& wfGetDB(DB_SLAVE); $oldkey = $oldusername->getDBkey(); $pages = $dbr->select('page', array('page_namespace', 'page_title'), array('page_namespace IN (' . NS_USER . ',' . NS_USER_TALK . ')', '(page_title LIKE ' . $dbr->addQuotes($dbr->escapeLike($oldusername->getDBkey()) . '/%') . ' OR page_title = ' . $dbr->addQuotes($oldusername->getDBkey()) . ')'), __METHOD__); $output = ''; $skin =& $wgUser->getSkin(); while ($row = $dbr->fetchObject($pages)) { $oldPage = Title::makeTitleSafe($row->page_namespace, $row->page_title); $newPage = Title::makeTitleSafe($row->page_namespace, preg_replace('!^[^/]+!', $newusername->getDBkey(), $row->page_title)); if ($newPage->exists() && !$oldPage->isValidMoveTarget($newPage)) { $link = $skin->makeKnownLinkObj($newPage); $output .= '<li class="mw-renameuser-pe">' . wfMsgHtml('renameuser-page-exists', $link) . '</li>'; } else { $success = $oldPage->moveTo($newPage, false, wfMsgForContent('renameuser-move-log', $oldusername->getText(), $newusername->getText())); if ($success === true) { $oldLink = $skin->makeKnownLinkObj($oldPage, '', 'redirect=no'); $newLink = $skin->makeKnownLinkObj($newPage); $output .= '<li class="mw-renameuser-pm">' . wfMsgHtml('renameuser-page-moved', $oldLink, $newLink) . '</li>'; } else { $oldLink = $skin->makeKnownLinkObj($oldPage); $newLink = $skin->makeLinkObj($newPage); $output .= '<li class="mw-renameuser-pu">' . wfMsgHtml('renameuser-page-unmoved', $oldLink, $newLink) . '</li>'; } } } if ($output) { $wgOut->addHtml('<ul>' . $output . '</ul>'); } } }</pre> </div> </figure> </div> <div class="example-item" id="0xff61440b86735b7b5f52b68dd3959d999aa7cdfd2e072e7afe0d766b53d0170f-353,,368,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #28</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_28" data-hash="0xff61440b86735b7b5f52b68dd3959d999aa7cdfd2e072e7afe0d766b53d0170f" data-area="353,,368,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '28')" class="rating-up btn btn-success" data-id="rating_28"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'28')" class="rating-down btn btn-danger" data-id="rating_28"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xff61440b86735b7b5f52b68dd3959d999aa7cdfd2e072e7afe0d766b53d0170f-353,,368,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xff61440b86735b7b5f52b68dd3959d999aa7cdfd2e072e7afe0d766b53d0170f&fullName=Xml.php&project=whysasse%2Fkmwiki')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fwhysasse%2Fkmwiki%2Fblob%2Fmaster%2FXml.php">Xml.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fwhysasse%2Fkmwiki">whysasse/kmwiki</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="28"> <pre class="line-numbers language-php" data-end="368" data-start="354" data-highlight="368"> /** * Same as Xml::inputLabel() but return input and label in an array * * @param string $label * @param string $name * @param string $id * @param int|bool $size * @param string|bool $value * @param array $attribs * * @return array */ public static function inputLabelSep($label, $name, $id, $size = false, $value = false, $attribs = array()) { return array(Xml::label($label, $id, $attribs), self::input($name, $size, $value, array('id' => $id) + $attribs)); }</pre> </div> </figure> </div> <div class="example-item" id="0xffcf59e9b7a49bb65c7d79974d6c4a70855925fac67b868018ee5ae9b88b372e-129,,161,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #29</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_29" data-hash="0xffcf59e9b7a49bb65c7d79974d6c4a70855925fac67b868018ee5ae9b88b372e" data-area="129,,161,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '29')" class="rating-up btn btn-success" data-id="rating_29"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'29')" class="rating-down btn btn-danger" data-id="rating_29"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xffcf59e9b7a49bb65c7d79974d6c4a70855925fac67b868018ee5ae9b88b372e-129,,161,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xffcf59e9b7a49bb65c7d79974d6c4a70855925fac67b868018ee5ae9b88b372e&fullName=html%2Fw%2Fincludes%2FSpecialChangeEmail.php&project=seedbank%2Fold-repo')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fseedbank%2Fold-repo%2Fblob%2Fmaster%2Fhtml%2Fw%2Fincludes%2FSpecialChangeEmail.php">SpecialChangeEmail.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fseedbank%2Fold-repo">seedbank/old-repo</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="29"> <pre class="line-numbers language-php" data-end="161" data-start="130" data-highlight="151"> /** * @param $fields array * @return string */ protected function pretty($fields) { $out = ''; foreach ($fields as $list) { list($name, $label, $type, $value) = $list; if ($type == 'text') { $field = htmlspecialchars($value); } else { $attribs = array('id' => $name); if ($name == 'wpPassword') { $attribs[] = 'autofocus'; } $field = Html::input($name, $value, $type, $attribs); } $out .= "<tr>\n"; $out .= "\t<td class='mw-label'>"; if ($type != 'text') { $out .= Xml::label($this->msg($label)->text(), $name); } else { $out .= $this->msg($label)->escaped(); } $out .= "</td>\n"; $out .= "\t<td class='mw-input'>"; $out .= $field; $out .= "</td>\n"; $out .= "</tr>"; } return $out; }</pre> </div> </figure> </div> <div class="example-item" id="0xff1d4fc1c1b1f7dcffd04e68cffb19cab254f8f7bf4009f45343aef25f7848a1-142,,166,"> <div class="bs-example"> <div> <div class="bs-example-title">Example #30</div> <div style="position: absolute;right: 15px;top: 10px;" id="rating_30" data-hash="0xff1d4fc1c1b1f7dcffd04e68cffb19cab254f8f7bf4009f45343aef25f7848a1" data-area="142,,166,"> <div class="rating-amount">0</div> <a title="Mark this example as good" href="javascript:app.addRating(1, '30')" class="rating-up btn btn-success" data-id="rating_30"><i class="icon-button icon-thumbs-up"></i></a> <a title="Mark this example as bad" href="javascript:app.addRating(-1,'30')" class="rating-down btn btn-danger" data-id="rating_30"><i class="icon-button icon-thumbs-down"></i></a> </div> </div> <div style="display:flex;align-items: center;flex-wrap: wrap"> <div style="display: inline-block;margin-right: 10px"> <a class="btn btn-default" title="Direct link to this example" href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html#0xff1d4fc1c1b1f7dcffd04e68cffb19cab254f8f7bf4009f45343aef25f7848a1-142,,166,"><i class="icon-button icon-link"></i></a> <a rel="nofollow" class="btn btn-default" href="javascript:app.open('https://hotexamples.com/site/file?hash=0xff1d4fc1c1b1f7dcffd04e68cffb19cab254f8f7bf4009f45343aef25f7848a1&fullName=includes%2FSpecialProtectedpages.php&project=huatuoorg%2Fmediawiki')">Show file</a> </div> <div class="example-project-info"> <nobr> <span>File:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fhuatuoorg%2Fmediawiki%2Fblob%2Fmaster%2Fincludes%2FSpecialProtectedpages.php">SpecialProtectedpages.php</a> </nobr> <nobr> <span>Project:</span> <a target="_blank" rel="nofollow" href="https://hotexamples.com/site/redirect?url=https%3A%2F%2Fgithub.com%2Fhuatuoorg%2Fmediawiki">huatuoorg/mediawiki</a> </nobr> </div> </div> </div> <figure class="highlight"> <div class="example" data-id="30"> <pre class="line-numbers language-php" data-end="166" data-start="143" data-highlight="166"> /** * Creates the input label of the restriction level * @param string $pr_level Protection level * @return string Formatted HTML */ protected function getLevelMenu($pr_level) { // Temporary array $m = array($this->msg('restriction-level-all')->text() => 0); $options = array(); // First pass to load the log names foreach ($this->getConfig()->get('RestrictionLevels') as $type) { // Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed' if ($type != '' && $type != '*') { $text = $this->msg("restriction-level-{$type}")->text(); $m[$text] = $type; } } // Third pass generates sorted XHTML content foreach ($m as $text => $type) { $selected = $type == $pr_level; $options[] = Xml::option($text, $type, $selected); } return '<span class="mw-input-with-label">' . Xml::label($this->msg('restriction-level')->text(), $this->IdLevel) . ' ' . Xml::tags('select', array('id' => $this->IdLevel, 'name' => $this->IdLevel), implode("\n", $options)) . "</span>"; }</pre> </div> </figure> </div> <div id="all-examples"></div> </div> </div> </div> <div class="page-side-banner hidden-xs hidden-sm hidden-md" style="width:300px"> <div id="ezoic-pub-ad-placeholder-131"> <div class="fx" style="width:300px"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- right-sidebar-fx --> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3697522372581514" data-ad-slot="8968655429" data-ad-format="auto" data-full-width-responsive="true"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </div> </div> </div> </div> <footer class="footer"> <div class="container"> <div class="row"> <div class="col-md-12" style="text-align: center"> <a href="https://hotexamples.com/site/trends?type=php%7Cf">Top Functions</a> | <a href="https://hotexamples.com/site/trends?type=php%7Cc"> Top Classes </a> | <a href="https://doc.hotexamples.com/doc/map">Documentation</a> | <a href="/site/privacy">Privacy Policy</a> | <a href="https://cpp.hotexamples.com/direct-sales.html">Advertise with us</a> </div> </div> <div class="row"> <div class="col-md-12" style="text-align: center"> <a href="https://hotexamples.com/">PHP</a> | <a href="https://csharp.hotexamples.com/">C# (CSharp)</a> | <a href="https://java.hotexamples.com/">Java</a> | <a href="https://golang.hotexamples.com/">Golang</a> | <a href="https://cpp.hotexamples.com/">C++ (Cpp)</a> | <a href="https://python.hotexamples.com/">Python</a> | <a href="https://javascript.hotexamples.com/">JavaScript</a> | <a href="https://typescript.hotexamples.com/">TypeScript</a> </div> </div> <div class="row"> <div class="col-md-12" style="text-align: center"> <a href="https://hotexamples.com/examples/-/Xml/label/php-xml-label-method-examples.html">EN</a> | <a href="https://hotexamples.com/ru/examples/-/Xml/label/php-xml-label-method-examples.html">RU</a> | <a href="https://hotexamples.com/de/examples/-/Xml/label/php-xml-label-method-examples.html">DE</a> | <a href="https://hotexamples.com/fr/examples/-/Xml/label/php-xml-label-method-examples.html">FR</a> | <a href="https://hotexamples.com/es/examples/-/Xml/label/php-xml-label-method-examples.html">ES</a> | <a href="https://hotexamples.com/pt/examples/-/Xml/label/php-xml-label-method-examples.html">PT</a> | <a href="https://hotexamples.com/it/examples/-/Xml/label/php-xml-label-method-examples.html">IT</a> | <a href="https://hotexamples.com/jp/examples/-/Xml/label/php-xml-label-method-examples.html">JP</a> | <a href="https://hotexamples.com/zh/examples/-/Xml/label/php-xml-label-method-examples.html">ZH</a> | <a href="https://hotexamples.com/ko/examples/-/Xml/label/php-xml-label-method-examples.html">KO</a> </div> </div> <div class="row"> <div class="col-md-10 col-md-offset-1"> </div> <div class="col-md-1"> <!--LiveInternet counter--> <script type="text/javascript"><!-- document.write("<a href='//www.liveinternet.ru/click' " + "target=_blank><img src='//counter.yadro.ru/hit?t44.6;r" + escape(document.referrer) + ((typeof (screen) == "undefined") ? "" : ";s" + screen.width + "*" + screen.height + "*" + (screen.colorDepth ? screen.colorDepth : screen.pixelDepth)) + ";u" + escape(document.URL) + ";" + Math.random() + "' alt='' title='LiveInternet' " + "border='0' width='31' height='31'><\/a>"); //--></script><!--/LiveInternet--> </div> </div> </div> </footer> <script src="//ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script src="/assets/30dd86a6f06b64184847037c52c63e07aa3c9a26.js"></script> <script>jQuery(function ($) { jQuery('#search-form').yiiActiveForm([{"id":"searchform-lang","name":"lang","container":".field-searchform-lang","input":"#searchform-lang","enableAjaxValidation":true},{"id":"searchform-search","name":"search","container":".field-searchform-search","input":"#searchform-search","enableAjaxValidation":true,"validate":function (attribute, value, messages, deferred, $form) {yii.validation.required(value, messages, {"message":"Search cannot be blank."});}}], []); });</script></body> </html>