Jump to content

مساعدة:تحويلات

From mediawiki.org
This page is a translated version of the page Help:Redirects and the translation is 26% complete.

لمعلومات موجهة نحو إداريو المواقع والمطورون، انظر Manual:Redirects بدلاً من ذلك

تُستخدم التحويلات لتحويل المستخدمين من اسم صفحة إلى آخر. يمكن أن تكون مفيدة إذا تم الإشارة إلى مقالة معينة باسم متعدد، أو لديها علامة ترقيم بديلة أو التهجئة.

أنواع التحويلات

هناك نوعان من التحويلات:

  • تحويل صعبة: يتم نقلهم مباشرة إلى الصفحة المستهدفة (عادةً إلى صفحات أخرى من نفس الويكي). عندما تكون الصفحة تخويلة، لن تستطيع الوصول إلى تلك الصفحة باستخدام اسمها أو عن طريق أي رابط باستخدام هذا الاسم. فقط تُوصف التحويلة الصعبة في هذه المقالة.
  • تحويلة ملموسة: يُبقى القراء على صفحة إعادة توجيها ولكن يُعطون خيار النقر على الرابط إلى صفحة الهدف. Usually this is achieved via a template; see corresponding article on Meta.
في الويكيات التي تم تمكينها من $wgDisableHardRedirects (مثل معظم مشاريع ويكيميديا العامة) ، ليس من الممكن إنشاء تحويلة صلبة إلى صفحات خاصة (مثل Special:MyLanguage) أو الصفحات الموجودة في ويكي آخر.

المظهر

Following a redirect

When a hard redirect is followed, the target page is immediately displayed, with a small notice below the page title to indicate you arrived here indirectly.

Help:Redirects
من MediaWiki
(بالتحويل من Help:Redirect)

You can use the link in this notice to view the redirect page. This link adds the &redirect=no URL parameter.

عرض تحويلة

عندما تُعرض صفحة تحويلة، فإن الإشعار الصغير أسفل عنوان الصفحة يشير إلى هذا، والرابط بعد رمز السهم يعرض هدف التحويلة.

Help:Redirect
من MediaWiki
صفحة تحويل

Help:Redirects

بمجرد عرضها، يمكنك القيام بكل الأشياء مع صفحة التحويلة التي تسمح بها أي صفحة ويكي. يمكنك الذهاب إلى صفحة المناقشة المرتبطة لمناقشة التحويلة. يمكنك عرض تاريخ الصفحة، بما في ذلك سجل التحويلة. يمكنك تحرير الصفحة إذا كان التحويلة خاطئًا، ويمكنك العودة إلى نسخة سابقة لإزالة التحويلة.

إنشاء تحويلة

When a page is moved, a redirect from the old to the new page name is automatically created.

Users with the "suppressredirect" right may move a page without creating a redirect. By default this right is assigned to sysops and bots.

You may start a new page with the name you want to direct from (see مساعدة : بدء تحرير صفحة جديدة ). You can also use an existing page that you are making inactive as a page by going to that page and using the "edit" tab at the top. In either case, you will be inserting the following code at the very first text position of the Edit window for the page:

#REDIRECT [[pagename]]

where pagename is the name of the destination page. The word "redirect" is not case-sensitive, but there must be no space before the "#" symbol. If any text is present before this line, it will disable the redirect. However, text or other content may appear after this line. This is often used to add redirects to categories.

Redirections can be simple page names or specified using a namespace. They can be suffixed with a section name if you have the corresponding anchor defined on the target page.

Examples of valid operational redirections:

  • #REDIRECT[[Help:Magic_words#Page_names]]
  • #redirect [[Help:Magic_words#URL_encoded_page_names]]
  • #Redirect [[Manual:$wgConf]]
  • #REDIRECT [[MediaWiki/fr]]

You should 'preview' (using the button below the Edit window, or use Alt+P) to check that you have entered the correct destination page name.

When the redirect is valid, it will appear in preview as shown in the "Viewing a redirect" section above.

When the redirect is not valid, it will appear in preview like a numbered list item:

  1. REDIRECT pagename

If the pagename as you typed it is not a valid page, it will show in red. If there is no valid destination page, you should not create the redirect.

Limitations

A redirect target cannot depend on a variable, template, or parser function. If that is the case, the browser will not be automatically redirected on visiting the page.

Example of redirection not allowed (not operational):

  • #REDIRECT [[{{ll|Help:Magic_words#Page_names}}]] although {{ll|Help:Magic_words#Page_names}} is operational.

JavaScript page redirect

In order to avoid JavaScript functionality from breaking, all JavaScript pages have a different redirect syntax from regular pages. This syntax allows for proper execution of the page by the browser's JavaScript engine, as well as being recognised by MediaWiki as a redirect. To create a JavaScript page redirect, the format that must be used is as follows:

/* #REDIRECT */mw.loader.load( "{{fullurl:Target.js|action=raw&ctype=text/javascript}}" );

Where Target.js is the target page name.

حذف تحويلة

There's generally no need to delete redirects. They do not occupy a significant amount of database space. If a page name is vaguely meaningful, there's no harm, and some benefit, in having it as a redirect to the more relevant or current page.

If you want to move a page over a redirect that has only one edit in its history and targeted to the old page name, there is no need to delete the redirect: it is overwritten. If the redirect has more than one history entry, or the redirect target is somewhere else, then it can only be deleted-and-moved by an administrator.

If you do need to delete a redirect, e.g. if the page name is offensive, or you wish to discourage people from referring to a concept by that name, then you simply go to the redirect page as mentioned above, and follow the procedures at تعليمات: الحذف وإلغاء الحذف .

Problematic redirects

Double redirects

A double redirect is a page redirecting to a page which is itself a redirect, and it will not work. Instead, people will be presented with a view of the next redirect page. This is a deliberate restriction, partly to prevent infinite loops, and partly to keep things simple.

However, you could look out for double redirects and eliminate them by changing them to be one-step redirects instead. You are most likely to need to do this after a significant page move. Use the ماذا يصل هنا toolbox link to find double redirects to a particular page, or use Special:DoubleRedirects to find them throughout the whole wiki.

There is an option, $wgFixDoubleRedirects , to automatically fix double redirects with a job queue. However, it tends to aggravate page move vandalism, so it is disabled by default. The __STATICREDIRECT__ magic word can be used to skip the double-redirect fix on a particular page.

إصدار ميدياويكي:
1.44
Gerrit change 1090544
Since 1.44, MediaWiki shows a warning if you try to save a page that redirects to a target that is also a redirect.

Broken redirects

If the target page does not exist, the redirect is broken: redirection will not occur. You may find all broken redirects at Special:BrokenRedirects.

إصدار ميدياويكي:
1.44
Gerrit change 1089205
Since 1.44, MediaWiki shows a warning if you try to save a page that redirects to an nonexistent page.

Transcluding a redirect

When a page called for inclusion is a redirect page, the redirect target is included instead, with the same parameters, without any redirect message. A double redirect does not work.

This allows to create several names for the same template.

An internal link to a redirect page has CSS class mw-redirect. This can be useful to make them stand out, for clean-up work involving bypassing redirects.

انظر أيضا