#My infobox code needs serious overhauling

72 messages · Page 1 of 1 (latest)

gritty leaf
#

This is my old infobox, and its code

{| class="wikitable"
! colspan="2" | {{{subj|Placeholder}}}
|-
! colspan="2" | [[File:{{{img|Placeholder.png}}}|400px]]
|-
| colspan="2" style="text-align: center" | <small>{{{capt|Replace the placeholder image(and other shit) with the character's image and other info}}}</small>
|-
! Nicknames
| {{{name|Placeholder}}}
|-
! Species
| {{{species|Placeholder}}}
|-
! Gender
| {{{gender|Placeholder}}}
|-
! Birthday
| {{{birthday|Placeholder}}}
|-
! Affiliations
| {{{affiliation|Placeholder}}}
|-
! Occupation
| {{{occupation|Placeholder}}}
|-
!Allies

Placeholder
!Enemies
Placeholder
}
#

I struggled to make a half-decent template, and I should also mention how this template sucks

#

I have to copy-paste the entire code onto a page, because it won't let me edit if I used the "Insert Template" function, every page that uses this template(and any template, for that matter) will go in the "Templates" category(meanwhile the actual templates won't let me add categories to THEIR pages)

#

And I'd also like to add this feature(this is on a FANDOM wiki)

stiff crane
#

the way how FANDOM's infoboxes work and are coded is replicated on Miraheze w/ PortableInfobox extension

#

to make templates work decently w/ visual editor extension TemplateData is needed, otherwise it's always blank template code copypasta, in source editor (I personally find it to be better way)

gritty leaf
#

I have both those extensions enabled?

stiff crane
#

to make categories work w/ templates you should use <noinclude> and/or <includeonly> tags

stiff crane
#

I don't know what is your wiki and neither will have access to ManageWiki pages to see by myself

#

your current infobox is wiki table, the code you pasted here, not PortableInfobox

gritty leaf
#

My friends want it to be private

stiff crane
#

are you an admin?

gritty leaf
#

yes

stiff crane
#

w/ bureaucrat role?

gritty leaf
#

yes

#

I created the wiki

stiff crane
#

you sure PI extension is enabled?

gritty leaf
stiff crane
#

okay, do you know how to code PI?

gritty leaf
#

no?

stiff crane
#

familiar w/ FANDOM infoboxes?

gritty leaf
#

I used the template instructions on a Miraheze Meta page

#

not exactly

stiff crane
#

alright

stiff crane
gritty leaf
#

Where?

stiff crane
#

a visual infobox builder will open

#

the screenshot you just send

#

in parser hooks extensions list

gritty leaf
#

My internet's not good, so images wo't load

stiff crane
#

in extensions list, under PortableInfobox there's link Special:PortableInfoboxBuilder

gritty leaf
#

okay

stiff crane
#

if takes long to load refresh the page

#

yup, this thing

#

you can create basic infobox w/ it, easy way

#

try to replicate same labels and parameters as in your old infobox

gritty leaf
stiff crane
#

you can't pin that in template itself, <gallery> has to be used on article

gritty leaf
#

It doesn't work

stiff crane
gritty leaf
#

How?

stiff crane
#

ooof

stiff crane
#

the builder already made image block code for you - the <image source="image" />
you don't touch that

#

you go to article and do the gallery trick when filling up infobox w/ stuff

gritty leaf
#

And I can't add the placeholde rimage

stiff crane
#

placeholders are done differently

#

wait a sec

#

here are instructions/guides
#general message

#

also why did you put template in itself, it creates loop error

gritty leaf
#

{{Infobox_Building1_Portable
|name=
|image=
|category=
|tier=
|prereq=
|size=
|cost=
|upkeep=
|consumes=
|produces=
|occupancy=
|upgrade_name=
|upgrade_cost=
|desirability=
}}

gritty leaf
#

I don't know how ANY of this works

stiff crane
#

please

#

wait

#

a little

gritty leaf
#

My computer's blocking FANDOM

stiff crane
gritty leaf
#

Fine then

#

I'll just go back to my shitty old template

stiff crane
#

I can't hang here atm but maybe another volunteer will have time

#

considering your wiki is private I won't be able to fix it either