Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
AbahDoku Custom
Serba-serbi Windows
AbahDoku Wiki
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
AbahDoku Custom
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Menu Footer == Secara default menu footer pada Mediawiki ada 3 yaitu "Privacy policy", "About AbahDoku" dan "WikiDisclaimers". Namun pada barisan menu footer penulis ingin menambahkan satu menu untuk aplikasi seperti pada menu Sidebar atau menu yang lain yang ingin ditambahkan. Caranya hanya dengan menambahkan kode berikut di akhir file LocalSettings.php adalah : $wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) { // Memeriksa apakah pengguna sudah login $user = $skin->getUser(); if ( $user->isRegistered() && $key === 'places' ) { // Menambahkan menu Aplikasi $footerlinks['mikhmon'] = Html::rawElement( 'a', [ 'href' => 'http://abahdoku.wiki.gd:9080/aplikasi', 'target' => '_blank', // Opens in a new tab 'rel' => 'noreferrer noopener' // not required, but recommended for security reasons ], 'Aplikasi' ); // Teks link yang ditampilkan } }; === Menambah icon di samping menu === Sebelumnya perlu di siapkan file gambar (icon) dengan ukuran yang kecil kecil sekitar 16 x 16px. Hanya dengan menambah sedikit dari code di atas. $wgHooks['SkinAddFooterLinks'][] = function ( Skin $skin, string $key, array &$footerlinks ) { // Memeriksa apakah pengguna sudah login $user = $skin->getUser(); if ( $user->isRegistered() && $key === 'places' ) { // Menambahkan menu Aplikasi dengan icon $iconUrl = 'http://abahdoku.wiki.gd/images/c/c3/Aplikasi.png'; // Ganti dengan URL ikon/logo Anda $footerlinks['mikhmon'] = Html::rawElement( 'a', [ 'href' => 'http://abahdoku.wiki.gd:9080/aplikasi', 'target' => '_blank', // Opens in a new tab 'rel' => 'noreferrer noopener' // not required, but recommended for security reasons ], Html::element('img', [ 'src' => $iconUrl, 'alt' => 'Aplikasi Icon', // Teks alternatif untuk gambar 'style' => 'width:16px; height:16px; vertical-align:middle; margin-right:4px;' // Sesuaikan ukuran dan posisi ]) . 'Aplikasi'); // Teks link yang ditampilkan } };
Summary:
Please note that all contributions to AbahDoku Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
AbahDoku Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width