Topic on User talk:McMan

Jump to navigation Jump to search
PeaceDeadC (talkcontribs)

Hey! I saw your MagazineCovers template and it honestly hurt a little watching you fight with all those parser functions 😂 So I went ahead and created a clean Lua module that does exactly the same thing but much more elegantly. The module was developed to enhance the performance of template processing, eliminating the need for parser function templates like {{#if:}}, {{#ifeq:}}, {{#switch:}} and {{#expr:}}. Instead, all the logic runs inside the module using a real programming language, rather than a templating system that’s had various extensions bolted on over the years trying to turn it into one. Plus, using Lua completely removes the risk of hitting the template transclusion depth limit, because a fully Lua-based template never needs to transclude other templates.

McMan (talkcontribs)

Oh, thank you! I really appreciate it.

PeaceDeadC (talkcontribs)

Hey! I saw you wrapped the module call in a fixed-width div. It's better to avoid doing that now that we're using a Lua module.

I’ve already built a clean, responsive container directly inside the module using flexbox. It automatically centers the covers, adapts nicely to different screen sizes (including mobile), and doesn’t use any fixed pixel widths that can break on smaller devices. No extra divs needed. Much cleaner and more mobile-friendly.

McMan (talkcontribs)

Thanks for all the help until now, I'm new to all of this. Is there a way to make the redirect text become underlined and white instead of the default bold blue? (Like you can find in Cast for different movie pages).

PeaceDeadC (talkcontribs)

No problem at all, I’ve updated the module for you. Now you can use a new parameter called name1, name2, etc (not "date"). Example:

{{MagazineCovers
| title1 = December 1982
| cover1 = Honcho Dec1982.jpg
| date1  = December 1982
| name1  = Erik Rhodes
| desc1  = Blue-Collar Special

| title2 = January 1984
| cover2 = Honcho Jan1984.jpg
| date2  = January 1984
| name2  = Cade Maddox
}}
McMan (talkcontribs)

Thanks again!

Reply to "MagazineCovers"