「モジュール:Instagram」の版間の差分

ナビゲーションに移動 検索に移動
認証バッジ 「v=○」を入れてみる
(デフォルトをページ名に)
(認証バッジ 「v=○」を入れてみる)
1行目: 1行目:
local p = {};
local p = {};


local function setProperty(t_name)
local function setProperty(t_name, i_v)
-- メイン空間のみ
-- メイン空間のみ
14行目: 14行目:
     local dataStore = {}
     local dataStore = {}
     dataStore['Instagramアカウント'] = t_name
     dataStore['Instagramアカウント'] = t_name
    dataStore['認証バッジ'] = i_v


     local result = mw.smw.set( dataStore )
     local result = mw.smw.set( dataStore )
36行目: 37行目:
-- Instagram 表示名
-- Instagram 表示名
local name = args[2] or args.name or '';
local name = args[2] or args.name or '';
-- Instagram 認証バッジ
local verified = args[3] or args.v or '';
-- SemanticMediaWiki
-- SemanticMediaWiki
if not args.nosmw then
if not args.nosmw then
setProperty(i_name);
setProperty(i_name, i_v);
end
end


53行目: 57行目:
end
end


return '[' ..url ..' ' ..name ..'] ' ..i_name2 ..' - [[Instagram]]';
    if verified == '' then
    return '[' ..url ..' ' ..name ..'] ' ..i_name2 ..' - [[Instagram]]';
    end
return '[' ..url ..' ' ..name ..'] ' ..i_name2 ..' [[ファイル:認証バッジ.png|15px]] - [[Instagram]]';
end
end


return p;
return p;
管理者、user-upload
32,056

回編集

案内メニュー