gnosygnu / xowa

xowa offline wiki application
Other
375 stars 41 forks source link

Adding Wikia infoboxes #201

Open ThRvnchst opened 6 years ago

ThRvnchst commented 6 years ago

So the Wikia infoboxes (like this one: http://starwars.wikia.com/wiki/Obi-Wan_Kenobi/Legends) show this in XOWA:

 <infobox layout="tabular" theme="character" theme-source="type"> <image source="image"/> <title source="name"><default>Obi-Wan Kenobi/Legends</default></title> <navigation><mobile>

</mobile></navigation> <group> <header>Biographical information</header> <label>Homeworld</label> <label>Born</label> <label>Died</label> </group> <group> <header>Physical description</header> <label>Species</label> <label>Subspecies</label> <label>Gender</label> <label>Height</label> <label>Mass</label> <label>Hair color</label> <label>Eye color</label> <label>Skin color</label> <label>Cybernetics</label> </group> <group> <header>Chronological and political information</header> <label>Era(s)</label> <label>Clan(s)</label> <label>Kajidic</label> <label>Affiliation(s)</label> <label>Caste</label> <label>Domain</label> <label>Masters</label> <label>Apprentices</label> </group>

       <navigation>[Source]</navigation>

</infobox>

instead of what they're supposed to show. I did manage to find the template for them in the Wikia common.css here: http://www.wikia.com/MediaWiki:Common.css but when I tried to add that to the xowa_common.css file it did nothing. Also, for some reason it shows both the desktop and mobile navigation UI.

Any idea what could fix this? Thanks.

gnosygnu commented 6 years ago

Hi! Thanks for the report as well as the detail.

Unfortunately, this doesn't look possible. Wikia recently added their own code to handle infoboxes, and I'd have to write that code into XOWA. I took a quick look at their code and it isn't trivial: https://github.com/Wikia/app/tree/dev/extensions/wikia/PortableInfoboxBuilder

I know Wikia is making these infoboxes the official infobox of Wikia, so the same issue will show on a lot of pages. I don't have a fix for this, and can't say when I'll ever get around to porting it.

Sorry.

ThRvnchst commented 6 years ago

Thank you for the response.

No problem. However, I've been wondering if it would be possible to display the data from them in infoboxes XOWA can handle, say, the Wikipedia ones?

gnosygnu commented 6 years ago

Unfortunately, that is basically the problem. To be explicit:

Hope this makes sense.

ThRvnchst commented 6 years ago

I see. Oh well, I just hope it can be added someday. Thanks for clearing this up!

gnosygnu commented 6 years ago

Yup, no problem. I'll re-evaluate if Wikipedia ever adopts Wikia's PortableInfobox or if there's a lot more demand for Wikia wikis. As it stands, I haven't had much time for XOWA recently, and all of it goes towards supporting Wikipedia wikis.

Thanks.