MediaWiki: Perbedaan antara revisi

Dari Wiki SMP Negeri 3 Batam
←Membuat halaman berisi '== Pengaturan Penyuntingan oleh Pengguna == Skrip di bawah ini adalah untuk menonaktifkan penyuntingan oleh semua pengguna, kecuali pengguna dengan email yang telah dikonfirmasi. ''# Disable for everyone.'' $wgGroupPermissions['*']['edit'] = '''false'''; ''# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.'' $wgGroupPermissions['user']['edit'] = '''false'''; ''# Make it so users with confirmed email addresses are in the group...'
 
 
(2 revisi perantara oleh pengguna yang sama tidak ditampilkan)
Baris 1: Baris 1:
== Pengaturan Penyuntingan oleh Pengguna ==
== Pengaturan Penyuntingan oleh Pengguna ==
Skrip di bawah ini adalah untuk menonaktifkan penyuntingan oleh semua pengguna, kecuali pengguna dengan email yang telah dikonfirmasi.
Skrip di bawah ini adalah untuk menonaktifkan penyuntingan oleh semua pengguna, kecuali pengguna dengan email yang telah dikonfirmasi.
Silahkan salin skrip di bawah ini ke dalam file ''LocalSettings.php''.
  ''# Disable for everyone.''
  ''# Disable for everyone.''
  $wgGroupPermissions['*']['edit'] = '''false''';
  $wgGroupPermissions['*']['edit'] = '''false''';
Baris 11: Baris 14:
  ''# Finally, set it to true for the desired group.''
  ''# Finally, set it to true for the desired group.''
  $wgGroupPermissions['emailconfirmed']['edit'] = '''true''';
  $wgGroupPermissions['emailconfirmed']['edit'] = '''true''';
== Mengaktifkan VisualEditor ==
Aktifkan VisualEditor dengan menambahkan skrip di bawah ini pada file ''LocalSettings.php''.
wfLoadExtension('VisualEditor');
// Mengatur ResourceLoader
$wgResourceModules['ext.visualEditor']['scripts'] = [
    'modules/ve/lib/ve.js',
    'modules/ve/ui/ve.ui.js',
    'modules/ve/command/ve.command.js',
    // Tambahkan skrip lain yang diperlukan
];
$wgDefaultUserOptions['visualeditor-enable'] = 1; // Mengaktifkan untuk semua pengguna
== Mengaktifkan Unggah File Gambar dan Media ==
Berikut contoh kode dari ''includes/DefaultSettings.php'' untuk diletakkan pada <code>LocalSettings.php</code>:
$wgUploadPath      = "'''$wgScriptPath'''/uploads";      ''## Wiki 1.5 defaults to /images, but allows more than just images''
$wgUploadDirectory  = "'''$IP'''/uploads";                ''## Wiki 1.5 defaults to /images, but allows more than just images''
''## To enable image uploads, make sure the above '$wgUploadPath' directory is writable by Apache User or group.''
''## <nowiki>''</nowiki>(i.e.  chmod og+w uploads images)<nowiki>''</nowiki>  then the following should be true:''
$wgEnableUploads      = '''true''';
$wgUseImageMagick      = '''true''';
$wgImageMagickConvertCommand = "/usr/bin/convert";
''## If you want to use image uploads under safe mode, create the directories images/archive, images/thumb and''
''## images/temp, and make them all writable. Then uncomment this, if it's not already uncommented:''
$wgHashedUploadDirectory = '''false''';

Revisi terkini sejak 26 Oktober 2024 03.41

Pengaturan Penyuntingan oleh Pengguna

Skrip di bawah ini adalah untuk menonaktifkan penyuntingan oleh semua pengguna, kecuali pengguna dengan email yang telah dikonfirmasi.

Silahkan salin skrip di bawah ini ke dalam file LocalSettings.php.

# Disable for everyone.
$wgGroupPermissions['*']['edit'] = false;
# Disable for users, too: by default 'user' is allowed to edit, even if '*' is not.
$wgGroupPermissions['user']['edit'] = false;
# Make it so users with confirmed email addresses are in the group.
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
# Hide group from user list.
$wgImplicitGroups[] = 'emailconfirmed';
# Finally, set it to true for the desired group.
$wgGroupPermissions['emailconfirmed']['edit'] = true;

Mengaktifkan VisualEditor

Aktifkan VisualEditor dengan menambahkan skrip di bawah ini pada file LocalSettings.php.

wfLoadExtension('VisualEditor');

// Mengatur ResourceLoader
$wgResourceModules['ext.visualEditor']['scripts'] = [
    'modules/ve/lib/ve.js',
    'modules/ve/ui/ve.ui.js',
    'modules/ve/command/ve.command.js',
    // Tambahkan skrip lain yang diperlukan
];

$wgDefaultUserOptions['visualeditor-enable'] = 1; // Mengaktifkan untuk semua pengguna

Mengaktifkan Unggah File Gambar dan Media

Berikut contoh kode dari includes/DefaultSettings.php untuk diletakkan pada LocalSettings.php:

$wgUploadPath       = "$wgScriptPath/uploads";      ## Wiki 1.5 defaults to /images, but allows more than just images
$wgUploadDirectory  = "$IP/uploads";                ## Wiki 1.5 defaults to /images, but allows more than just images

## To enable image uploads, make sure the above '$wgUploadPath' directory is writable by Apache User or group.
## ''(i.e.  chmod og+w uploads images)''  then the following should be true:
$wgEnableUploads       = true;

$wgUseImageMagick      = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";

## If you want to use image uploads under safe mode, create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment this, if it's not already uncommented:
$wgHashedUploadDirectory = false;