Jump to content
MediaWiki

বর্ধনাংশ:কেন্দ্রীয়-বিজ্ঞপ্তি

From mediawiki.org
This page is a translated version of the page Extension:CentralNotice and the translation is 13% complete.
মিডিয়াউইকি এক্সটেনশন ম্যানুয়াল
CentralNotice
মুক্তির অবস্থা: স্থিতিশীল
বাস্তবায়ন বিশেষ পৃষ্ঠা , এপিআই
বিবরণ Adds a central sitenotice
লেখক(গণ) Andrew Russell Green, Matthew Walker, Adam Roses Wight Formerly: Brooke Vibber, Tomasz Finc, Trevor Parscal, Ryan Kaldari
সর্বশেষ সংস্করণ 2.6.1 (continuous updates)
সামঞ্জস্য নীতি Snapshots releases along with MediaWiki. Master is not backward compatible.
ডাটাবেজ পরিবর্তন হ্যাঁ
Virtual domain virtual-centralnotice
  • $wgNoticeUseTranslateExtension
  • $wgNoticeBannerReducedMaxAge
  • $wgNoticeNumberOfBuckets
  • $wgCentralNoticeCategoriesUsingLegacy
  • $wgNoticeUseLanguageConversion
  • $wgNoticeCookieDurations
  • $wgCentralNoticeBannerMixins
  • $wgCentralNoticeLoader
  • $wgCentralBannerRecorder
  • $wgNoticeBucketExpiry
  • $wgNoticeCookieDomain
  • $wgNoticeTranslateDeployStates
  • $wgCentralNoticeAdminGroup
  • $wgCentralNoticeCampaignTypes
  • $wgCentralNoticeImpressionEventSampleRate
  • $wgCentralNoticePerCampaignBucketExtension
  • $wgNoticeNumberOfControllerBuckets
  • $wgNoticeProject
  • $wgNoticeTabifyPages
  • $wgCentralNoticeGeoIPBackgroundLookupModule
  • $wgCentralNoticeApiUrl
  • $wgNoticeProjects
  • $wgCentralNoticeMessageProtectRight
  • $wgNoticeBannerMaxAge
  • $wgNoticeInfrastructure
  • $wgCentralNoticeHideBannersP3P
  • $wgCentralNoticeSampleRate
  • $wgNoticeHideUrls
  • $wgCentralNoticeMaxCampaignFallback
  • $wgCentralNoticeContentSecurityPolicy
  • $wgCentralNoticeFallbackHideCookieDuration
  • $wgCentralSelectedBannerDispatcher
  • $wgCentralNoticeCampaignMixins
Licence গ্নু জেনারেল পাবলিক লাইসেন্স ২.০ অথবা পরবর্তী
ডাউনলোড
উদাহরণ Special:CentralNotice on Meta (read-only)
ট্রানশলেটউইকি.নেট-এ উপলভ্য থাকলে CentralNotice বর্ধনাংশটি অনুবাদ করুন
Issues উন্মুক্ত কাজ · বাগ প্রতিবেদন

CentralNotice বর্ধনাংশটি উইকিমিডিয়া উইকিসমূহে (সাধারণত ব্যানারের আকারে) ঘোষণা প্রদান করে। Fundraising দল অনুদানের আহ্বান জানাতে এবং উইকিমিডিয়া সম্প্রদায় ও ব্যবহারকারীদের জন্য গুরুত্বপূর্ণ ঘোষণা প্রচারে এটি ব্যাপকভাবে ব্যবহার করে। কেন্দ্রীয়-বিজ্ঞপ্তি ঘোষণাগুলো দেশ, ভাষা, প্রকল্প, যন্ত্র এবং লগ-ইন অবস্থার ভিত্তিতে সুনির্দিষ্টভাবে লক্ষ্য নির্ধারণ করতে সক্ষম।

কেন্দ্রীয়-বিজ্ঞপ্তি উন্নয়নকারী এবং যেসকল উইকি প্রশাসক তাদের নিজস্ব সাইটে কেন্দ্রীয়-বিজ্ঞপ্তি ইনস্টল করতে চান, তাদের জন্য এই পাতয় তথ্য রয়েছে। কেন্দ্রীয়-বিজ্ঞপ্তি প্রচারণা কীভাবে তৈরি ও কনফিগার করতে হয়, তা শিখতে দয়া করে Meta-Wikiতে থাকা Help:CentralNotice দেখুন। উইকিমিডিয়া ফাউন্ডেশনের সমষ্টিতে কেন্দ্রীয়-বিজ্ঞপ্তি সেটআপ সম্পর্কিত তথ্যের জন্য, Wikitech-এ থাকা CentralNotice পাতাটি দেখুন।

কেন্দ্রীয়-বিজ্ঞপ্তি একটি কেন্দ্রীয় উইকি (তথা অবকাঠামো উইকি) থেকে একাধিক উইকিতে (গ্রহীতা বা সাবস্ক্রাইবিং উইকি হিসেবে পরিচিত) ঘোষণা প্রদানের সুবিধা দেয়। যদি আপনার শুধুমাত্র একটি নির্দিষ্ট উইকিতে বার্তা পোস্ট করার প্রয়োজন হয়, তাহলে এর পরিবর্তে Sitenotice ব্যবহারের বিষয়টি বিবেচনা করতে পারেন।

ইনস্টলেশন

CentralNotice is developed, tested, and known to be deployed only on wikis that do not use table prefixing. If your setup uses table prefixing there is no guarantee this extension will work. Please report any bugs to Phabricator.


  • Install Extension:EventLogging first
  • ডাউনলোড করুন এবং আপনার extensions/ ফোল্ডারের CentralNotice নামক ডিরেক্টরিতে ফাইল(গুলি) নিন।
    Developers and code contributors should install the extension from Git instead, using:
    cdextensions/
    gitclonehttps://gerrit.wikimedia.org/r/mediawiki/extensions/CentralNotice
    
  • আপনার LocalSettings.php -এর নিচের অংশে নিম্নলিখিত কোড যোগ করুন:
    wfLoadExtension( 'CentralNotice' );
    
  • হালনাগাদ করার স্ক্রিপ্টটি চালান যা স্বয়ংক্রিয়ভাবে এই এক্সটেনশনের জন্য প্রয়োজনীয় ডাটাবেস টেবিল তৈরি করবে।
  • By default, GeoIP lookup is disabled. If the Geo cookie is pre-populated, however, its value will be used. For local development, you can enable a client-side implementation that uses https://freegeoip.net as follows. For more information, see #GeoIP lookup.
    $wgCentralNoticeGeoIPBackgroundLookupModule = 'ext.centralNotice.freegeoipLookup';
    
  • Yes করা হয়েছে – এক্সটেনশনটি সফলভাবে ইনস্টল করা হয়েছে কিনা তা যাচাই করতে আপনার উইকির Special:Version-এ যান।

The infrastructure wiki

The CentralNotice extension enables both the infrastructure and subscribing roles by default, which suffices for most development tasks and involves only a single wiki.

Members of the sysop group are granted the right to administer CentralNotice campaigns and banners. If additional groups are needed, assign them the centralnotice-admin and editinterface permissions.

Some CentralNotice features optionally integrate with অনুবাদ . To fully utilize these features, you'll need to install that as well.

Subscribing-only wikis

Edit LocalSettings.php and set...

  1. $wgNoticeInfrastructure to false;
  2. $wgCentralSelectedBannerDispatcher to the URL of Special:BannerLoader on the central wiki, for example: https://meta.wikimedia.org/w/index.php/Special:BannerLoader;
  3. either $wgCentralDBname to the name of the infrastructure wiki's database, or $wgCentralNoticeApiUrl to the API endpoint of the infrastructure wiki; and
  4. $wgCentralBannerRecorder to the URL of Special:RecordImpression on the central wiki. For example: https://meta.wikimedia.org/w/index.php/Special:RecordImpression.

All code that runs on subscribing wikis should be smoke-tested with MobileFrontend , to ensure they work on the mobile version of the site.

Getting help

The WMF Fundraising tech team are the maintainers of CentralNotice. For questions about installation, bug reports, or usage of CentralNotice please send an email to the mailing list wikitech-l@lists.wikimedia.org or join us in the IRC channel #wikimedia-fundraising connect .

অনুমতি

  • centralnotice-adminPermission required to modify campaigns and banners. Relevant only to the infrastructure wikis (see also bugzilla:26377).
    • editinterfacerequired to edit banner content.

Design concepts

From a user facing perspective, the high level CentralNotice objects are campaigns (a.k.a. notices) and banners (a.k.a. templates). These are affected by the back end concepts of selectors and allocation.

  • Banner – a single block of translatable html/wikitext/css/javascript that will display at the top of Manual:$wgContentNamespaces pages. The user status, device type, UI language selectors are applied to banners.
    • Banners may be grouped by category. All banners in a category share user side cookies, such as the hiding cookie that is set when a user clicks a banner close button.
  • Campaign – a collection of banners. The project, country and content language selectors apply at the campaign level. The system allows as many active campaigns at the same time as you want dynamically calculating an allocation for each banner in an active campaign. Campaigns are defined as active if the central wiki time is greater than the campaign start time, less than the campaign end time, and the campaign is marked as enabled.
    • Banners in a campaign are assigned a bucket and weight. Buckets are yet another selector, and weight affects the relative allocation of banners inside a campaign.
    • There are four priority levels in CentralNotice. Higher priority campaigns will get a greater allocation of page views.
    • Campaigns may be locked which will prevent editing and deletion of the campaign; but not the banners inside a campaign.
  • Selectorany property which may be filtered on for the purposes of allocation. This allows, for example, different banners to be shown to logged in versus logged out users in Argentina browsing Wikipedia in English.
    • A selection vector is the complete set of selectors a user presents to the central wiki when requesting a banner.
  • AllocationThe chance a banner will be shown to a user under a given selection vector.

Design documents

GeoIP lookup

By default, CentralNotice has no client-side GeoIP lookup service configured. This is optimised for the Wikimedia Foundation production configuration where Varnish populates the Geo cookie from the server-side. (See wikitech:Geolocation.) You can configure CentralNotice to use a custom data source client-side through the CentralNoticeGeoIPBackgroundLookupModule configuration variable. This variable expects the name of a ResourceLoader module that exports a function. The function will be called without parameters and should return a Promise that resolves with an object containing the following properties:

  • country: string – Two-letter country code.
  • region: string – Implementation specific.
  • city: string – City name.
  • lat: number.
  • lon: number.

Usage

Full usage instructions can be found at meta:Help:CentralNotice.

New Banner

  1. Load Special:CentralNoticeBanners
  2. Click on the add banner link at the bottom of the page (must be logged in as an admin).
  3. Enter in a name and the raw HTML for the given banner.
    1. If this banner is going to be translated then enclose any text to be translated with triple parens – {{{FOO}}}.
  4. Submit

(TODO: move and expand this snippet)

  • Each banner has its banner definition stored in MediaWiki:Centralnotice-template-<name>
  • All of its messages are stored below the banner defined in MediaWiki:Centralnotice-template-<name>-<message>/<language_code>

New Campaign

  1. Load Special:CentralNotice
  2. Add a campaign with a given start time at the bottom portion of the page, leave a comment, and click submit.
    1. If this campaign is only run on a specific wiki and or language then select it from the pull downs.
  3. Click on the new campaign and add the banners you want within this running campaign and their respective weights.
  4. If all looks well then set this campaign to enabled and it will show at the corresponding time.

Overriding selection

Add any of the following URL parameters to preview a specific banner, defeat "diet" schemes, or debug pseudorandom banner selection.

banner
You can test a banner directly on any wiki by adding ?banner=<bannername> to the end of the URL.
randomcampaign
A decimal number between 0 and 1, to be used as the "random" seed for choosing a campaign.
randombanner
A decimal number between 0 and 1, to be used as the "random" seed for choosing a banner among banners available in the chosen campaign.
country
Override the country code, before filtering to geotargeted campaigns. Accepts two-character ISO 3166-1 codes.
uselang
Its usual meaning in MediaWiki, this determines which banners you may be shown. Beware of content language vs. user language.
force
Override any banner hiding code, show the banner.
reset
Zero out any cookies being used to customize banner display (e.g. delivered impression count).

উদাহরণ স্বরূপ,

Debugging problematic banners

If there is a problematic banner in the page, you can identify which banner is active by opening your developer console and inspecting the value of: mw.centralNotice.bannerData.bannerName.

Limitations

Banners do not display on pages in the Special namespace, as well as edit pages and diff pages.

API

CentralNotice adds two API modules, centralnoticechoicedata and centralnoticequerycampaign. (The API module centralnoticeallocations was deprecated and removed in MediaWiki 1.25.)


নিম্নলিখিত ডকুমেন্টেশনটি Special:ApiHelp/centralnoticechoicedata এর আউটপুট, এই সাইটে (MediaWiki.org) চলমান মিডিয়াউইকির প্রাক-প্রকাশ সংস্করণ দ্বারা স্বয়ংক্রিয়ভাবে উত্পন্ন হয়।

action=centralnoticechoicedata

(main | centralnoticechoicedata)
  • This module requires read rights.
  • Source: CentralNotice
  • License: GPL-2.0-or-later

Get data needed to choose a banner for a given project and language

Specific parameters:
Other general parameters are available.
project

The project to get banner choice data for.

This parameter is required.
language

The language to get banner choice data for.

This parameter is required.
Example:
Get the data for choosing a banner for English Wikipedia users.
api.php?action=centralnoticechoicedata&project=wikipedia&language=en [open in sandbox]


নিম্নলিখিত ডকুমেন্টেশনটি Special:ApiHelp/centralnoticequerycampaign এর আউটপুট, এই সাইটে (MediaWiki.org) চলমান মিডিয়াউইকির প্রাক-প্রকাশ সংস্করণ দ্বারা স্বয়ংক্রিয়ভাবে উত্পন্ন হয়।

action=centralnoticequerycampaign

(main | centralnoticequerycampaign)
  • This module requires read rights.
  • Source: CentralNotice
  • License: GPL-2.0-or-later

Get all configuration settings for a campaign.

Specific parameter:
Other general parameters are available.
campaign

Campaign name. Separate multiple values with a "|" (vertical bar).

This parameter is required.


আরও দেখুন

এই এক্সটেনশন এক বা একাধিক উইকিমিডিয়া প্রকল্পসমূহ-এ ব্যবহৃত হচ্ছে। সম্ভবত এটির অর্থ হল এক্সটেনশন স্থিতিশীল এবং এই জাতীয় উচ্চ ট্রাফিক ওয়েবসাইটগুলি ব্যবহার করার জন্য যথেষ্ট ভাল কাজ করে। উইকিমিডিয়ার CommonSettings.php এবং InitialiseSettings.php কনফিগারেশন ফাইলগুলিতে এটি কোথায় ইনস্টল হয়েছে তা দেখতে এই এক্সটেনশনের নামটি সন্ধান করুন। নির্দিষ্ট উইকিতে ইনস্টল করা এক্সটেনশন-এর সম্পূর্ণ তালিকা উইকির Special:Version পৃষ্ঠাতে দেখা যাবে।
This extension is included in the following wiki farms/hosts and/or packages:

AltStyle によって変換されたページ (->オリジナル) /