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

編集の要約なし
(すみません、ちょっとだけ修正。認証垢は引数verify = ○ を渡すが、認証じゃない垢も verity = "空白”を渡す(いままではNULL値になっていた))
編集の要約なし
 
(3人の利用者による、間の5版が非表示)
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|link=]]';
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 .. ';'..name
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;
user-upload
43,580

回編集