Hello! Project Česká Wiki
Explore
Main Page
All Pages
Community
Interactive Maps
Recent Blog Posts
Hello! Project
Skupiny
Morning Musume
ANGERME
Juice=Juice
Country Girls
Tsubaki Factory
BEYOOOOONDS
Učnice
Hello Pro Kenshuusei
Hello Pro Kenshuusei Hokkaido
Bývalé skupiny
Berryz Koubou
°C-ute
Country Girls
Kobushi Factory
Komunita
Blog
Forum
Přehledy
Top uživatelé
Seznam stránek
FANDOM
Games
Movies
TV
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Hello! Project Česká Wiki
341
pages
Explore
Main Page
All Pages
Community
Interactive Maps
Recent Blog Posts
Hello! Project
Skupiny
Morning Musume
ANGERME
Juice=Juice
Country Girls
Tsubaki Factory
BEYOOOOONDS
Učnice
Hello Pro Kenshuusei
Hello Pro Kenshuusei Hokkaido
Bývalé skupiny
Berryz Koubou
°C-ute
Country Girls
Kobushi Factory
Komunita
Blog
Forum
Přehledy
Top uživatelé
Seznam stránek
Editace stránky
Modul:YearNav
Back to page
Editovat zdroj
Zobrazit historii
Talk (0)
Edit Page
Modul:YearNav
Varování:
Nejste přihlášen(a). Pokud uložíte jakoukoli editaci, vaše IP adresa bude zveřejněna v historii této stránky. Pokud se
přihlásíte
nebo si
vytvoříte účet
, vaše editace budou připsány vašemu uživatelskému jménu a získáte i další výhody.
Antispamová kontrola.
NEVYPLŇUJTE
následující!
local p = {} function p.YearNav(frame) Pattern = frame.args[1] or -1 if Pattern==-1 then Pattern = "####-10 ・・ ####-1 ・ '''####''' ・ ####+1 ・・ ####+10" --Default. Will be overwritten if something was there. for i,v in pairs(frame.args) do Pattern= i .. "=" .. v end end ThisPageTitle = mw.title.getCurrentTitle() Prefix = ThisPageTitle.nsText Namespace = ThisPageTitle.namespace PageName = ThisPageTitle.text --Prefix = "Category" --Namespace = 0 --PageName = "1987 Sandwiches" _, _, OriginalYear = string.find(PageName, "(%d%d%d%d)") PageWithout = string.gsub(PageName, OriginalYear, "@@@@") CurrentText = Pattern itsthere, _, _, _ = string.find(CurrentText, "####([%+%-])(%d+)") while itsthere do --Continue while there are still instances in the pattern to alter _, _, plusminus, amount = string.find(CurrentText, "####([%+%-])(%d+)") if plusminus=="-" then NewYear = OriginalYear - amount else --assume it's plus NewYear = OriginalYear + amount end NewPageName = string.gsub(PageWithout, "@@@@", NewYear) if Namespace==0 then ReplacementSection = "[[" .. NewPageName .. "]]" else ReplacementSection = "[[:" .. Prefix .. ":" .. NewPageName .. "|" .. NewPageName .. "]]" end CurrentText = string.gsub(CurrentText, "####[%+%-]%d+", ReplacementSection, 1) itsthere, _, _, _ = string.find(CurrentText, "####([%+%-])(%d+)") end CurrentText = string.gsub(CurrentText, "####", PageName) return CurrentText end function p.JustTheYear(frame) ThisPageTitle = mw.title.getCurrentTitle() PageName = ThisPageTitle.text _, _, OriginalYear = string.find(PageName, "(%d%d%d%d)") return OriginalYear end return p
Shrnutí editace:
Please note that all contributions to the Hello! Project Česká Wiki are considered to be released under the CC-BY-SA
Storno
Pomoc při editování
(otevře se v novém okně)
Follow on IG
TikTok
Join Fan Lab