Module:EmailTracking
Jump to navigation
Jump to search
This documentation is transcluded from Module:EmailTracking/doc. (edit | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Text | Code | Result |
---|---|---|
Right examples | ||
[email protected] | {{#invoke:EmailTracking|EmailTracking|[email protected]}} | |
Wrong examples | ||
[email protected], [email protected] | {{#invoke:EmailTracking|EmailTracking|[email protected], [email protected]}} | Category:Listing with multiple email addresses |
[email protected]; [email protected] | {{#invoke:EmailTracking|EmailTracking|[email protected]; [email protected]}} | Category:Listing with multiple email addresses |
--[[
Source script: https://it.wikivoyage.org/wiki/Module:EmailTracking
Maintainer: Andyrom75
]]
local p = {}
function p.EmailTracking(frame)
return frame.args and p.EmailTrackingValue( frame.args.email ) or ''
end
function p.EmailTrackingValue( email, demo )
if mw.ustring.match(email or '','@.*@') then
return '[[' .. (mw.title.getCurrentTitle().namespace == 0 and '' or ':' ) .. 'Category:Listing with multiple email addresses]]<span class="phoneinfo" style="display:none;">MULTIPLE-EMAIL</span>'
end
return ''
end
return p