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

ナビゲーションに移動 検索に移動
Recordを使わないとアカウントに紐付かない
(Motodai (トーク) による版 179086 を取り消し)
タグ: 取り消し
(Recordを使わないとアカウントに紐付かない)
1行目: 1行目:
local p = {};
local p = {};


local function setProperty(t_name, n_name, i_v)
local function setProperty(dataStore)
-- メイン空間のみ
-- メイン空間のみ
11行目: 11行目:
         return true;
         return true;
     end
     end
   
    local dataStore = {}
    dataStore['Instagramアカウント'] = t_name
    dataStore['表示名'] = n_name
    dataStore['認証バッジ'] = i_v


     local result = mw.smw.set( dataStore )
     local result = mw.smw.set( dataStore )
39行目: 34行目:
local name = args[2] or args.name or '';
local name = args[2] or args.name or '';
-- Instagram 認証バッジ
-- Instagram verify
local verified = args[3] or args.v or '';
local verify = args[3] or args.verify or '';
    local v_veryfy = '';
if verify == '' then
verify = 'false';
        v_veryfy = '';
else
verify ='true';
v_veryfy = '[[ファイル:認証バッジ.png|15px]]';
end
 


-- Instagram 表示名デフォルト
-- Instagram 表示名デフォルト
48行目: 51行目:
end
end


local veri =' '
if verified == '' then
      veri =' '
else
      veri ='○'
end


-- SemanticMediaWiki
-- SemanticMediaWiki
    local dataStore = {}
    dataStore['Instagram'] = '' .. i_name .. ';'..verify
if not args.nosmw then
if not args.nosmw then
setProperty(i_name, name, veri);
setProperty(dataStore);
end
end


65行目: 65行目:
end
end


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


return p;
return p;

案内メニュー