« Module:Biblio/Lien web » : différence entre les versions
Contenu supprimé Contenu ajouté
message d'erreur : retire dépendance à Module:Outils, corrige accord manquant à "manquant" |
Le paramètre langue est appliqué au titre |
||
Ligne 52 :
end
-- url▼
local url = validArg( 'url', 'lire en ligne', 'url texte', 'lien' )
local archiveUrl = validArg( 'archive-url', 'archiveurl' )
local titre = validArg( 'titre', 'title' )▼
local description = validArg( 'description' )▼
▲ -- url
if url then
-- remplacement des crochets et espaces par leur équivalent HTML
Ligne 64 ⟶ 66 :
if dead or archiveUrl then
wiki.minsert( '<span class="noarchive">' )
end▼
if codeLangue and titre then
end
wiki.minsert( '[', url )
Ligne 71 ⟶ 76 :
-- titre
▲ local titre = validArg( 'titre', 'title' )
▲ local description = validArg( 'description' )
if titre then
-- suppression des retours ligne éventuels, sinon MediaWiki ne reconnaît pas le lien externe
Ligne 82 ⟶ 85 :
wiki.minsert( ' ', titre, url and ']' )
else
local sousTitre = validArg( 'sous-titre' )
if
sousTitre = ' : ' ..
end
local color = dead and not archiveUrl and ' color:red;'
wiki.minsert( ' « <cite style="font-style: normal;', color, '">', titre, sousTitre, '</cite> »', url and ']' )
end
if codeLangue and url then
wiki.minsert( '</span>' )
end
Ligne 152 ⟶ 155 :
wiki.minsert( ' <small class="plainlinks cachelinks">[[', archiveUrl, textArchive, dateArchive, ']]</small>' )
end
if url and ( dead or archiveUrl ) then
wiki.minsert( '</span>' )
▲ wiki.minsert( '</span>' )
▲ end
end
|