امتداد:ContactPage
![]() حالة الإصدار مستقر |
|
---|---|
![]() |
|
تنفيذ | صفحة خاصة , وصلة |
بيان | يقدم نموذج اتصال للزوار |
المؤلف/المؤلفون | Daniel Kinzler, Sam Reed |
آخر إصدار | Continuous updates |
سياسة التوافق | تصدر اللقطات البرمجية مع ميدياويكي. الإصدار الرئيسي لا يتوافق مع الإصدارات السابقة. |
MediaWiki | >= 1.35.0 |
PHP | 5.4+ |
تغييرات قاعدة البيانات | لا |
ترخيص | رخصة جنو العمومية 2.0 أو ما بعدها |
التنزيل | README |
مثال | nl.wikipedia.org |
|
|
ترجم الامتداد ContactPage لو كان متوفرا على translatewiki.net | |
دور فاغرانت | contactpage |
المسائل | المهام المفتوحة · الإبلاغ عن عطل تقني |
ينفّذ امتداد ContactPage نموذج اتصال مخصص للزوار. يستحدث الامتداد صفحة خاصة تحمل اسم «Special:Contact»، وهي مشابهة للصفحة «Special:EmailUser»، إلا أنها تحتوي على متلقي واحد محدد، ويمكن استخدامها دون تسجيل.
التنصيب والإعداد
- نزّل الملف/الملفات وضعها في دليل يحمل اسم
ContactPage
داخل مجلد extensions/
لديك. - أضف الكود التالي في الجزء الأسفل من
LocalSettings.php
:wfLoadExtension( 'ContactPage' ); $wgContactConfig['default'] = [ 'RecipientUser' => 'WikiUser', // Must be the name of a valid account which also has a verified e-mail-address added to it. 'SenderName' => 'Contact Form on ' . $wgSitename, // "Contact Form on" needs to be translated 'SenderEmail' => null, // Defaults to $wgPasswordSender, may be changed as required 'RequireDetails' => true, // Either "true" or "false" as required 'IncludeIP' => true, // Either "true" or "false" as required 'MustBeLoggedIn' => true, // Check if the user is logged in before rendering the form. Either "true" or "false" as required 'AdditionalFields' => [ 'Text' => [ 'label-message' => 'emailmessage', 'type' => 'textarea', 'rows' => 20, 'required' => true, // Either "true" or "false" as required ], ], // Added in MW 1.26 'DisplayFormat' => 'table', // See HTMLForm documentation for available values. 'RLModules' => [], // Resource loader modules to add to the form display page. 'RLStyleModules' => [] // Resource loader CSS modules to add to the form display page. ];
- See the README file for further options to customize and adapt as it convenes. Note, however, that since March 2014, it is no longer possible to prefill text from
MediaWiki:Contactpage-text-[form-name]
. - تم التنفيذ – اذهب إلى Special:Version على موقع الويكي لديك كي تتحقق من أن الامتداد قد ثبت بنجاح.
للمستخدمين الذي يستخدمون إصدار ميدياويكي 1.27 أو ما قبله:
تبين التعليمات السالفة سبيل جديد لتثبيت الامتداد مستخدما wfLoadExtension()
.
لو كنت تحتاج لتثبيت الامتداد على هذه الإصدارات السابقة (ميدياويكي 1.27 أو ما قبله)، استخدم ما يلي بدلا من wfLoadExtension( 'ContactPage' );
:
require_once "$IP/extensions/ContactPage/ContactPage.php";
$wgCaptchaTriggers['contactpage'] = true;
تخصيص إضافي
- Adding a link to special page "Contact" to the footer of your wiki (< 1.37.0)
To do this add ...
- ... the following code without changing it to your "LocalSettings.php" file:
$wgHooks['SkinTemplateOutputPageBeforeExec'][] = function( $skin, &$template ) {
$contactLink = Html::element( 'a', [ 'href' => $skin->msg( 'contactpage-url' )->escaped() ],
$skin->msg( 'contactpage-label' )->text() );
$template->set( 'contact', $contactLink );
$template->data['footerlinks']['places'][] = 'contact';
return true;
};
- ... the URL of "Special:Contact" to system message MediaWiki:Contactpage-url and
- ... the label for "Special:Contact" to system message MediaWiki:Contactpage-label.
- Creating more complex forms
See HTMLForm and related pages for more information on the possibilities available to create more complex forms.
Issues
Users of some hosting providers such as SiteGround and Amazon SES may get a PHP mail error or one that says that the FROM email address is not configured in the server, despite $wgPasswordSender
being configured correctly and other email functionality working as expected. A fix for this issue is described here.
See also
- Extension:EmailPage - Allows sending fully rendered articles with embedded CSS to users, groups, or contact lists
- Extension:CIForms - Forms with auto-validation, multiple choice questions and cloze tests
هذا الامتداد يستخدم على واحد من مشاريع ويكيميديا أو أكثر من واحد. يعني هذا الأمر أن الامتداد مستقر ويعمل/تعمل جيدا بما فيه الكفاية ليستخدم/لتستخدم في مواقع تتمتع بمستوى زيارات مرتفع مثل هذه. ابحث عن اسم هذا الامتداد في ملفات الضبط CommonSettings.php وكذلك InitialiseSettings.php كي ترى أين تنصب. توجد قائمة كاملة بالامتدادات المنصبة على موقع ويكي بعينه على صفحة Special:Version الخاصة بموقع الويكي. |
This extension is included in the following packages and/or wiki farms: |