Technopedia Center
PMB University Brochure
Faculty of Engineering and Computer Science
S1 Informatics S1 Information Systems S1 Information Technology S1 Computer Engineering S1 Electrical Engineering S1 Civil Engineering

faculty of Economics and Business
S1 Management S1 Accountancy

Faculty of Letters and Educational Sciences
S1 English literature S1 English language education S1 Mathematics education S1 Sports Education
  • Registerasi
  • Brosur UTI
  • Kip Scholarship Information
  • Performance
  1. Weltenzyklopädie
  2. Module:Notification — Wikipédia
Module:Notification — Wikipédia 👆 Click Here! Read More..
Cette page est protégée.
Une page de Wikipédia, l'encyclopédie libre.

 Documentation[voir] [modifier] [historique] [purger]

Ce module à risque est inclus sur un très grand nombre de pages et ne peut pas être modifié.

Cette protection ne constitue pas obligatoirement une approbation de la version actuelle. Vous pouvez proposer une modification en page de discussion. Lorsqu'un compromis sera trouvé en page de discussion, vous pourrez demander la modification auprès des administrateurs (voir le journal des protections).

Module utilisé par {{Mention}}, {{Notif}}, {{Notif discret}} et {{Notif invisible}}, ainsi que {{Bonjour}}, {{Bonsoir}}, {{Salut}}, {{Merci}}, etc.

    • Projet Scribunto Projet Scribunto

La documentation de ce module est générée par le modèle {{Documentation module}}.
Elle est incluse depuis sa sous-page de documentation. Veuillez placer les catégories sur cette page-là.
Les éditeurs peuvent travailler dans le bac à sable (créer).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.

-- luacheck: globals mw

local mwTrim = mw.text.trim

local p = {}

function p.main( frame )
    local parentArgs = frame:getParent().args

    local intro
    if frame.args.intro and frame.args.intro ~= '' then
        intro = frame.args.intro
    end

    -- utilisé par Modèle:Mention
    local prefixe = frame.args.prefixe or ''

    local indexMax = 50
    local depasseMax = false

    local items = {}

    for i, v in ipairs( parentArgs ) do
        if i <= indexMax then
            local username = mwTrim( v )
            if username ~= '' then
                local texte = username
                if parentArgs[ 'texte' .. i ] and parentArgs[ 'texte' .. i ] ~= '' then
                    texte = parentArgs[ 'texte' .. i ]
                end
                local item = prefixe .. '[[Utilisateur:' .. username .. '|' .. texte .. ']]'
                if intro and #items == 0 then
                    items[ 1 ] = '<span class="nowrap">' .. intro .. item .. '</span>'
                else
                    if texte:find( ' ', nil, true ) or texte:find( '-', nil, true ) then
                        item = '<span class="nowrap">' .. item .. '</span>'
                    end
                    items[ #items + 1 ] = item
                end
            end
        else
            depasseMax = true
        end
    end

    if #items == 0 then
        return '<span class="error">vous devez spécifier au moins un utilisateur</span>'
    end

    local result = mw.text.listToText( items )

    if depasseMax then
        result = result .. '<span class="error">trop d\'utilisateurs : maximum ' .. indexMax .. '</span>'
    end

    return result
end

return p
Ce document provient de « https://fr.teknopedia.teknokrat.ac.id/w/index.php?title=Module:Notification&oldid=231708313 ».
Catégorie :
  • Module en langage Lua
Catégorie cachée :
  • Module protégé

  • indonesia
  • Polski
  • الرية
  • Deutsch
  • English
  • Español
  • Français
  • Italiano
  • مصر
  • Nederlands
  • 本語
  • Português
  • Sinugboanong Binisaya
  • Svenska
  • Українска
  • Tiếng Việt
  • Winaray
  • 中文
  • Русски
Sunting pranala
Pusat Layanan

UNIVERSITAS TEKNOKRAT INDONESIA | ASEAN's Best Private University
Jl. ZA. Pagar Alam No.9 -11, Labuhan Ratu, Kec. Kedaton, Kota Bandar Lampung, Lampung 35132
Phone: (0721) 702022
Email: pmb@teknokrat.ac.id