#infobox country

214 messages · Page 1 of 1 (latest)

robust shale
#

how do i get country infoboxes to work? for example:
{{Infobox country <!-- English name here --> |conventional_long_name = Republic of Template }}

doesnt work on a new wiki but on a separate wiki it works and pops up as a infobox.

#

this is what im talking about. one returns this (first one), the other gives me this (second one) despite me inputting the same exact things

oak osprey
#

infobox needs to be created, your wiki doesn't have Template:Infobox country page

#

there are 2 popular ways to create infoboxes

#

import from another place or build by yourself - PortableInfobox extension seems to be the easiest method to achieve that

robust shale
#

how does one import that?

oak osprey
#

via Special:Export on another wiki and Special:Import on yours
if you gonna import from Wikipedia get ready to loads of dependency errors and stuff on yours
it's important to flag the "Include templates" on export page

robust shale
#

alr im going to be frank here i appreciate the help but im so cofnused on what everything u just said means, is there a guide somewhere or smth? like a video? i found the import pages thing but i have no clue how to get a file and im confused on what u mean by if im going to importan from wikipedia

oak osprey
#

first time working w/ wiki?

robust shale
#

yup

#

unfortunately

oak osprey
#

then on your wiki you should go ro similar page for import
yourwikiname.miraheze.org/wiki/Special:Import

#


about namespaces:

  • infobox is a template page and will have Template: prefix
  • pages for operating wiki, settings, etc have that Special: prefix
  • normal articles don't have prefixes, they're in so called main namespace
    etc
    mediawiki.org has loads of help pages and guides
#

but, as I said, be careful w/ Wikipedia import, it might get messed up, because templates on Wikipedia are VERY complicated, you'll have a hard to time to maintain them in a long run

robust shale
#

hey just got back--thanks so much

#

so heres where i am at

#

you mentioned namespace so i assume im meant to selec tthat

oak osprey
#

oh, last time I tried to import was hundreds years ago, I forgot about this part 🤔

#

@lean mantle can you help?

lean mantle
#

if you've exported a mess of templates from Wikipedia, chances are their subpages/helper pages/modules could be in a few different namespaces. My expectation is that the "default locations" option is the best one here, as it should put templates in templates, modules in modules, and so on

#

The other thing I notice is that you've supplied an interwiki prefix of template. I don't recommend doing that, as it may have collision with the template namespace. Instead, make it the same as your wiki's domain. E.g. bread.miraheze.org has an iw prefix of bread

robust shale
#

ok i think tomorrow i need to do some research and learning here. i have no clue what namespace or any of this stuff means. i appreciate u both, ill get back to you on this

lean mantle
#

Glad we could at least start pointing you in the right direction, wishing you luck!

oak osprey
#

he just said

  • leave "Interwiki prefix" field empty in "Interwiki prefix" type your wiki's name/subdomain
  • flag "Import to default locations"/unflag "Import to a namespace"
lean mantle
#

It usually doesn't let you leave the interwiki prefix empty, so I recommend either using the same as your wiki's subdomain or some random variation of that, e.g. if your normal prefix is bread, you could give it breadwp to indicate that it's on your wiki but came from wikipedia

oak osprey
lean mantle
robust shale
#

Alright, im going to mull all this over and ill get back to u both. thanks again

#

so im trying to understand this here; essentially what I am doing is taking the like page of infoboxes and then importing that into my wiki as a template so that way whenever someone types (whatever it is i forget) {{infobox country ..., it knows to refer to the created template and it creates said infobox

#

maybe that wasnt a great explanation but thats what im picking up on

oak osprey
#

correct

#

all templates are used inside {{...}}

lean mantle
#

And to add to the fun, templates themselves can refer to other templates internally in the same way.

#

So template infobox_country might call template infobox, which itself invokes module infobox

robust shale
#

gotcha okay

#

so i would want to be under the "import from another wiki" page

#

actually, couldnt i just import the exact same infobox from the other miraheze wiki?

#

and just completely avoid wikipedia since you all said theres some issues there potentially

#

and i know thats the exact infobox i want--i dont necessarily know the wikipedia one is what i want (if that makes sense)

#

altho that ones probably from wikipedia tbf

oak osprey
#

there's possibility that another wiki on miraheze took the dark road of wikipedia import lol

robust shale
#

knowing the dude, he probably did

oak osprey
#

that's why I suggested at the very beginning to build infobox by yourself using PortableInfobox extension (aka how infoboxes are made on FANDOM, pretty easy, especially for newcomers)

robust shale
#

sure ill do that, does it require any coding knowledge?

oak osprey
#

it has a visual builder which lets you to create infobox w/ basic stuff

#

it has its own tag system but it's pretty easy, there are guide on it too

robust shale
#

gotcha

oak osprey
#

[[mw:Extension:PortableInfobox]]

sly yarrowBOT
oak osprey
#

this page has a link to FANDOM guide

#

ignore the download/install part, on Miraheze you just activate extensions in admin menu

robust shale
#

ah yueah im on that part rn and i was confused

#

cause im here but i dont see portableinfobox -- where do i activate it?

oak osprey
#

it must be in parser hooks

lean mantle
#

It is, yes

robust shale
#

thats crazy thats the only one i did not check

#

yes it is

#

so i check it and its activated

#

press save ofc

#

alright so now im at the builder, i press publish once im satisfied and in order to actually use this, what do i type?
{{portable infobox ...?

#

oh nvm it asks me to name it

#

ok, it works

#

sort of

#

let me play around with this for a minute here and ill let u guys know if i need anything. thanks again so much

#

ok this is the hardest thing ive ever attempted. i tried to refer to the other infoboxes off the other wiki (miraheze) that had the correct templates and everything. evidently, that did not work, seemingly because it used Lua. i would like to be able to ideally just copy/port the source code of the templates, especially the infobox and country infobox ones over from that wiki but an exceptional amount of issues are arising. is there anyway just for me to use lua and port these templates over using the source?

oak osprey
#

what exactly you didn't worked out w/ Portable one?

#

have you added other fields, defined labels and value in the builder? it works as drag and drop

#

amd on actual article infoboxes are typed w/ values, to work
for example
{{infobox country |title = Romania |map = Romania.jpg |continent = Eurasia ...}}
where title and continent are defined titles of values

#

map gets the image block of the box

#

etc

robust shale
#

what i tried to do was copy and paste the other infobox country's code (from the other wiki that has what i want) to the current one but it seems that built completely different and uses other stuff so

#

how do i edit an already published infobox?

oak osprey
#

so, you get dependencies errors now

robust shale
#

yeah i believe so

oak osprey
robust shale
#

also i dont know if the old/other wiki used portable infoboxes, it says it uses lua

oak osprey
#

Lua is Wikipedia way

#

Wikipedia is huge and needs very complicated templates, that's why they use a whole separate established programming language

#

specific wikis, w/ defined topic usually don't need that

#

especially the small ones

robust shale
#

gotcha

#

but would it not be easier--especially considering how confusing this is atleast for me--to be able to just copy and paste over all the stuff that i know is correct and works

#

like all those templates

#

since those will guaranteed be more extensive and proper than whatever i could make

#

even if it is at times extraneous and potentially overly complicated, the works already done for me, i just have to port it all over which would take some time yes but nothing compared to starting from ground 0

oak osprey
#

well
a) licensing - simply copy/pasting code isn't welcomed because all wikis utilize licenes, especially Wikipedia, so the correct way is to do import
b) you gonna have a very hard time chasing and copy pasting each included module and template

#

because modules, too, use other modules

robust shale
#

the code is created by a member in our community. this is just a second rendition (actually more like 10th) of this ongoing community if that makes sense

#

the old wiki is just an older project that has since died

#

this is sort of a rerun

oak osprey
#

well, you do you

#

I gave you all the information

robust shale
#

yeah i appreciate that greatly and i dont mean to fight you here on this

#

im just incredibly confused and i dont want to keep on pestering and bothering u guys with questions and stuff

#

and even if i did spend a while working on this it would still be quite crude in comparison to whats already made

#

i hope that makes sense

oak osprey
#

don't feel bad as it is a support server
you make the decision in the end, it's your wiki

robust shale
#

what does this imply?

#

i have to create module:infobox?

oak osprey
#

correct

#

it's the base infobox all other infoboxes would use

lean mantle
#

So here's the rundown:

Modules: Lua instructions that introduce new capabilities into a wiki
Templates: Use module code or logic in a more friendly way to tell the wiki page parser what to do in a repeatable way
Articles or other templates: where you use the templates

#

If you see a dependency error requiring some missing template or module, if you're going down the wikipedia template rabbit hole, you can navigate to the template/module of the same name there (or on the wiki you're borrowing from), copy the code, then create an equivalently named page on your wiki.

#

I would copy that script and head over to my own wiki, creating a page also called Module:Infobox and pasting in the code.

#

Once saved, I would go back to the template that was throwing the error in the first place, refresh (and purge the page if necessary) and see if it was throwing a new error.

Context: "Purging" a page forces the server to parse a new version of your page's content, which can be helpful if changes aren't showing up.

oak osprey
#

"Purge" is a button near "Edit"

lean mantle
#

The instructions above are for wikipedia-style templates, Portable Infobox templates are an entirely distinct thing that don't use the same code base, which is why they're not interchangeable

#

If you do decide that dependency chasing is getting old and want to give Portable Infobox another shot, I also compiled some helpful links for Portable Infobox. Since we're using near-enough code to Fandom, most of their documentation works here too:

#general message

robust shale
#

Gotcha. how do i get a template to redirect to another one?

#

For instance, Template:A has xyz, but i want Template:B and Template:C to redirect to Template:A. is it valid to just use the same code or should i redirect?

lean mantle
#

Well, if you just want them to use the code from A, then a simple redirect works

#

E.g. if you call {{CR}} and the template CR is actually a redirect to Template:Change Request, that should work

robust shale
#

What am I missing here? I don't see any errors and theres no missing templates or modules from what i can see but for some reason the infobox isnt drawing/working.

lean mantle
#

You have to edit the x bits and religion names to what you want them to be in the bit that's pasted to the article, it's not automatic.

#

Templates are a re-usable framework, but if they're dynamic they require inputs to work correctly

robust shale
#

I dont get what you mean

#

this is meant to be a template page that people copy and paste the info from then edit it

lean mantle
#

Do you have a link to where you're testing this?

lean mantle
#

Thanks, I'll check out the code and give you an example

robust shale
#

Sure

#

thanks

#

my concern is though that the infobox isnt being drawn

#

and if it is its not in the correct spot

lean mantle
robust shale
#

Yeah i get that

#

but the infobox isnt showing up?

#

heres what i mean

#
TerrumWiki

Vostochnia (Vostok: Восточня, Vostochnya), fully styled Democratic People's Republic of Vostochnia, is the official name of the political entity that which spans Northern Artopa in Kovira. Its neighbors are Azir (east), Koivumata, Vadeerjyk, Hassenberg, and Silnazomei (west). Vostochnia has the largest population out of all Kovrian nations; they...

#

This is my old countries wiki page

#

im talking about how the infobox physically shows up and is drawn

lean mantle
#

So my example was showing you how to edit parameters in the infobox.

#

The styling is a different issue

robust shale
#

Now, i just copy and pasted everything form that page to a projectum wiki page titled Vostochnia and got this: https://projectum.miraheze.org/wiki/Vostochnia

Projectum

Vostochnia (Vostok: Восточня, Vostochnya), fully styled Democratic People's Republic of Vostochnia, is the official name of the political entity that which spans Northern Artopa in Kovira. Its neighbors are Azir (east), Koivumata, Vadeerjyk, Hassenberg, and Silnazomei (west). Vostochnia has the largest population out of all Kovrian nations; they...

lean mantle
#

Finding the relevant link for that now

robust shale
#

yeah im talking about styling

#

thanks

lean mantle
#

With that it now appears like this:

robust shale
#

Indeed it does!

#

Thank you so much; how did you arrive at that though?

#

As in how did you figure out I was missing that

lean mantle
#

So, missing formatting is usually a style issue, e.g. CSS

robust shale
#

Like if i was missing other stuff how would i figure that out

lean mantle
#

I checked to see if the wiki was using /styles.css subpages for templates, it looks like this wiki never really set that up.

#

So the next place to look is their Common.css page, which applies styling to every single page on the wiki

robust shale
#

Gotcha okay

#

So then I think im okay here? That solved it btw thank u so much. I was so confused there.

#

So in reference to 1) is there a way to fix that and then 2) should i be concerned

lean mantle
#

Enable the TemplateStyles extension

#

You'll then want to borrow the css from that styles subpage listed there on the source wiki

shadow nimbus
#

Use Wikipedia for enwp as the prefix

#
  1. no you shouldn't be too concerned. See if the source wiki has the same categories, make sure you enable show hidden categories
robust shale
#

also Module:Navbar/styles.css already contains info

#

ah nvm

#

(i enabled darkmode btw, same wiki), for some reason its self-corrected itself

#

yeah thats weird, everywhere but the Template page is correct; even a page i just created which i copied exactly from the template page. not really a concern ig

lean mantle
#

You might want to purge the page

#

Sometimes it gets stuck on an old cached version on the server

robust shale
#

Purge which page?

#

The navbar styles or template?

lean mantle
#

Template page

robust shale
#

gotcha

#

and just repaste it all in

lean mantle
#

No, no need

#

It's looking fine to me.

robust shale
#

oh my bad it keeps it

#

yup that fixed it

#

i figured purge would delete the page

#

thanks man

lean mantle
#

Yep, despite the scary name, what Purge actually does is force the server to generate a new parsed copy of the page

#

Instead of using the cached version it already has

robust shale
#

gotcha

#

thats useful

lean mantle
#

Mhmm, not all changes will force a refreshed parsing, so that purge button is very handy

robust shale
#

real quick, where do i go to make edits to things like this?

lean mantle
#

That's the logo, you'll find that under additional settings > Styling, or Special:ManageWiki/settings#mw-section-styling

robust shale
#

how do i get a sound file to pop up (for reference this is in the infobox)

shadow nimbus
#

Depends where it came from

robust shale
#

wdym?

shadow nimbus
#

Where the file is from

#

Can you access it from the file page?

robust shale
#

yes

#

i sent the link but it wouldnt let me send it it says it contains content blocked by this community

shadow nimbus
#

@robust shale you need to /auth

#

Too much spam

robust shale
#

heres what im encountering now

#
{{listen
|filename=Anthem Test.ogg
|title="Anthem Test"
|description=The "[[Anthem Test]]"}}
#

i would like it to pop up like so so its playable

robust shale
#

Hey how can i make the coat of arms not appear when not in use?

#

I'd imagine it has something to do with the infobox country template but

#

cause this is all thats there and its still showing up

lean mantle
#

Usually just setting everything after the = to blank should cause it not to be included, provided there isn't a default value for that parameter.

#

Calling it a night, have a good holiday.

robust shale
#

yup, that solved it, thanks !

#

So coat of arms is gonna be a permanent thing?

#

no way to just have image_flag?

robust shale
#

So I am getting a reference to Module:Strict but that doesnt exist in Wikipedia

lean mantle