Jump to content

دليل:$wgAutopromote

From mediawiki.org
This page is a translated version of the page Manual:$wgAutopromote and the translation is 72% complete.
الوصول: $wgAutopromote
شروط الترقية الآلية للمستخدم إلى مجموعات معينة
أضيف في الإصدار:1.12.0 (r28797)
حذف من الإصدار:ما زال مستخدمًا
القيم المسموح بها:(متوالية)
القيمة الافتراضية:(طالع ما يلي)

التفاصيل

تحتوي هذه الترتيبات على معايير الترقية الآلية. النصية هي:

$wgAutopromote = [
    'groupname' => cond,
    'group2' => cond,
];

قد يكون cond هنا:

الحلول الممكنة

شروط محتملة (محددة في Defines.php ؛ يمكن للاستكشافات إضافة المزيد من خلال الرمز UserRequirementsCondition ):

الشروط الوصف البراهين
APCOND_EDITCOUNT الحد الأدنى من التعديلات الضرورية.
إذا سيتم استخدام null أو $wgAutoConfirmCount المفقودة
عدد صحيح
APCOND_AGE الحد الأدنى من الثواني منذ التسجيل If null or missing $wgAutoConfirmAge will be used عدد صحيح
APCOND_EMAILCONFIRMED قد أُكد عنوان البريد الإلكتروني (لا ينطبق)
APCOND_INGROUPS قائمة المجموعات التي يجب أن يكون المستخدم فيها مثلاً, 'sysop', 'bureaucrat', 'bot'
APCOND_ISIP المستخدم لديه عنوان IP محدد مثلاً, '1.2.3.4' or '2001:0db8:85a3::7344'
APCOND_IPINRANGE المستخدم في نطاق IP محدد طالع Manual:IP ranges
APCOND_AGE_FROM_EDIT الحد الأدنى من الثواني منذ التعديل الأول عدد صحيح
APCOND_BLOCKED الحساب محظور (مضاف في v1.16: r52083) (لا ينطبق)
APCOND_ISBOT الحساب هو بوتًا (لا ينطبق)


Conditions with and without arguments

Each condition can be written in two forms:

APCOND_EMAILCONFIRMED   # condition with no arguments
array( APCOND_EDITCOUNT, 100 )   # condition with arguments

Set of conditions

Sets of conditions have the following syntax:

[ 'operand', cond1, cond2, ... ];

There are 4 operands available:

  • & (AND) — promote if user matches all conditions
  • | (OR) — promote if user matches any condition
  • ^ (XOR) — promote if user matches only one of two conditions
  • ! (NOT) — promote if user matches no conditions.

The sets of conditions are evaluated recursively, so you can use nested sets of conditions linked by operands.

المحاذير

لا يضيف الترويج الذاتي المستخدمين إلى مجموعة في الواقع. سوف تفتقد ميدياويكي ما إذا كان المستخدم يلبي شروط الترويج ذاتي في كل مرة يفتقد فيها حقوق المستخدم أو مجموعات فعالة. هذا يعني أن المستخدم لن يظهر في مجموعة على Special:ListUsers إلا إذا تم إضافةهم إليها من خلال Special:UserRights.

منذ MediaWiki 1.18 يمكنك استخدام AutopromoteOnce بدلاً من ذلك، والذي يضيف المستخدمين عادة إلى مجموعة، إذا كانت تتماشى مع المعايير المقدمة ولم يتم تخفيضها من قبل. Alternatively, $wgRevokePermissions (MW 1.16+) might be useful for you.

لا يمكن تعزيز المستخدمين المؤقتين بشكل ذاتي، لأنهم لا يمكن تعيينهم لمجموعات المستخدمين.


قيم افتراضية

إصدار ميدياويكي:
1.38
$wgAutopromote = [
	'autoconfirmed' => [ '&',
		[ APCOND_EDITCOUNT, null],
		[ APCOND_AGE, null ],
	],
];
إصدارات ميدياويكي:
1.13 – 1.37
$wgAutopromote = [
	'autoconfirmed' => [ '&',
		[ APCOND_EDITCOUNT, &$wgAutoConfirmCount ],
		[ APCOND_AGE, &$wgAutoConfirmAge ],
	],
];
إصدار ميدياويكي:
1.12
$wgAutopromote = array(
	'autoconfirmed' => array( '&',
		array( APCOND_EDITCOUNT, &$wgAutoConfirmCount ),
		array( APCOND_AGE, &$wgAutoConfirmAge ),
	),
	'emailconfirmed' => APCOND_EMAILCONFIRMED,
);

مثال

If you wanted to autopromote each user to captain upon their having both confirmed their email address and either made at least 100 edits or registered their account at least 60 days ago, you would use:

$wgAutopromote = [
	'captain' => [
		'&',
		APCOND_EMAILCONFIRMED,
		[
			'|',
			[ APCOND_EDITCOUNT, 100 ],
			[ APCOND_AGE, 60*86400 ],
		],
	],
];

Note that this would get rid of all other autopromote groups; to instead add the captain autopromote group while keeping those autopromote groups that already exist, one would use:

$wgAutopromote['captain'] = [
	'&',
	APCOND_EMAILCONFIRMED,
	[
		'|',
		[ APCOND_EDITCOUNT, 100 ],
		[ APCOND_AGE, 60*86400 ],
	],
];

انظر أيضا