انتقل إلى المحتوى

الفرق بين المراجعتين لصفحة: «وحدة:InfoboxImage»

لا يوجد ملخص تحرير
لا ملخص تعديل
لا ملخص تعديل
سطر ١٢٤: سطر ١٢٤:
function i.InfoboxImage(frame)
function i.InfoboxImage(frame)
     local image = frame.args["image"];
     local image = frame.args["image"];
 
   
     if image == "" or image == nil then
     if image == "" or image == nil then
         return "";
         return "";
سطر ١٥٩: سطر ١٥٩:
         -- search for thumbnail images and add to tracking cat if found
         -- search for thumbnail images and add to tracking cat if found
         if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]") or mw.ustring.find(image, "|%s*تصغير%s*[|%]]")) then
         if mw.title.getCurrentTitle().namespace == 0 and (mw.ustring.find(image, "|%s*thumb%s*[|%]]") or mw.ustring.find(image, "|%s*thumbnail%s*[|%]]") or mw.ustring.find(image, "|%s*تصغير%s*[|%]]")) then
             return image .. "";
             return image .. "[[Category:Pages using infoboxes with thumbnail images]]";
         else
         else
             return image;
             return image;
سطر ١٨٢: سطر ١٨٢:
         local thumbtime = frame.args["thumbtime"] or "";
         local thumbtime = frame.args["thumbtime"] or "";
         local center= frame.args["center"];
         local center= frame.args["center"];
 
       
         -- remove prefix if exists
         -- remove prefix if exists
         local allNames = mw.site.namespaces[6].aliases
         local allNames = mw.site.namespaces[6].aliases
سطر ١٩٣: سطر ١٩٣:
             end
             end
         end
         end
 
       
         if maxsize ~= "" and maxsize ~= nil then
         if maxsize ~= "" and maxsize ~= nil then
             -- if no sizedefault then set to maxsize
             -- if no sizedefault then set to maxsize
سطر ٢١٢: سطر ٢١٢:
             size = size .. "px";
             size = size .. "px";
         end
         end
 
       
         result = "[[File:" .. image;
         result = "[[File:" .. image;
         if size ~= "" and size ~= nil then
         if size ~= "" and size ~= nil then
سطر ٢٤٥: سطر ٢٤٥:
         end
         end
         result = result .. "]]";
         result = result .. "]]";
 
       
         return result;
         return result;
     end
     end