Anonimo

Modulo:DTSem: differenze tra le versioni

Da Wikitrek.
m
nessun oggetto della modifica
mNessun oggetto della modifica
mNessun oggetto della modifica
Riga 88: Riga 88:
local CategoryText
local CategoryText
local Pages
local Pages
local PagesList = {}
local Series
local Series
local SeriesShort
local SeriesShort
Riga 114: Riga 115:
         return "''Nessun risultato''"
         return "''Nessun risultato''"
     else
     else
     return p.RecurringList(Pages, Series)   
    for _, Page in ipairs(Pages.results) do
    table.insert(PagesList, Page.fulltext)
    end
     return p.RecurringList(PagesList, Series)   
end
end
Riga 184: Riga 189:
--- Helper to extract recurring characters and list them
--- Helper to extract recurring characters and list them
--  
--  
-- @param Pages Array of characters' page name
-- @param Pages SMW QueryResult containing characters' pages names
-- @param Series String with name of the Series
-- @param Series String with name of the Series
-- @return String Bullet list of characters and episodes
-- @return String Bullet list of characters and episodes
Riga 191: Riga 196:
     if type(Pages) == "table" then
     if type(Pages) == "table" then
     for _, Page in ipairs(Pages.results) do
     --for _, Page in ipairs(Pages.results) do
    for _, Page in ipairs(Pages) do
     local Count
     local Count
     local Episodes = {}
     local Episodes = {}
Riga 198: Riga 204:
        
        
         --Count = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|format=count')
         --Count = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|format=count')
         Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|sort=Numero di produzione|order=asc')
         --Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page.fulltext .. ']]|sort=Numero di produzione|order=asc')
        Episodes = mw.smw.ask('[[Serie::' .. Series .. ']][[Personaggio::' .. Page .. ']]|sort=Numero di produzione|order=asc')
        
        
         if (Episodes ~= nil) and (#Episodes > 0) then
         if (Episodes ~= nil) and (#Episodes > 0) then