Extension talk:Capiunto

Jump to navigation Jump to search

About this board

Sannita (talkcontribs)

@Hoo man: As I already told you at Wikimania 17, I might have found someone who can be interested in testing your extension on minor WP project. Pinging @Sciking: for lmo and @Ruthven: for nap (who's also a it.wp admin), who kindly volunteered. :) I'll try to stick around and give a hand, as much as I can too.

Ruthven (talkcontribs)

Hi, I'm here. Feel free to write me whenever you want/can.

Reply to "Testing on lmo.wp and nap.wp"
209.252.234.128 (talkcontribs)

I am a total newb at MediaWiki and am trying it out on a WIMP stack.
MediaWiki 1.23.8 on IIS 7.5
PHP 5.6.5 (cgi-fcgi)
MySQL 5.6.22-log
Lua 5.1.4

After much frustration trying to get the Wikipedia infoboxe templates to work I decided to look into Capiunto. Got the extension and enabled it, but I am at a total loss for how to use it. I see here that it involves Lua code, but where am I supposed to put this? How do I use it?

Hoo man (talkcontribs)

Hi :) I assume you got MediaWiki, Scribunto and Capiunto installed correctly. After you've done that, you can create Lua modules on your Wiki by creating Module:NameOfYourModule with the Lua code for your module. The Lua code there returns a table with methods which you can invoke from your Wiki pages. More detailed instructions for that can be found at the English Wikipedia (although that's a Wikipedia help page all information there will apply also to your local setup).

After you have a basic idea how to make these Lua modules work, you can experiment with the Capiunto methods outlined in the documentation.

If you have further questions, feel free to ask me (but poking me on meta or on my user talk page here might be necessary, as I barely check my watchlist over here).

DksDev064 (talkcontribs)

Thank you for the quick response! I think you left out the links, though?

I will get working on adding these and playing around with them. I am a pretty quick learner but this is all totally foreign to me as a lowly windows developer :/

Hoo man (talkcontribs)

Oh sorry, the link to that help page got lost... fixed.

DksDev064 (talkcontribs)

I'm still missing something here I think.
I added the code at the top of this page to a module page in my wiki, but when I added {{#invoke:testInfobox|create}} to a test page I got a script error saying Lua error in package.lua at line 80: module `capiunto' not found.

Hoo man (talkcontribs)

Please make sure you have the latest version of Capiunto, that was changed only recently (but will stay stable now, in preparation to deploying it to the Wikimedia Foundation sites)

DksDev064 (talkcontribs)

I am downloading from the extension page on mediawiki.org, which I assume is the latest version. I have 1.23, but tried the 1.24 version just in case and still get the same error.

On my version page says - in the column for version of Capiunto

Hoo man (talkcontribs)

You need to download the master version, which is said to be a development version, but should work with 1.24 just fine.

DksDev064 (talkcontribs)

Okay I had to upgrade to 1.24 for a number of reasons, and now I am back to working with Capiunto. Still getting a lua script error when trying to invoke the module, but now it is simply

Script error: The module returned a nil value. It is supposed to return an export table. No further details are available.

Reply to "Tutorial or instructions?"
Mr. Stradivarius (talkcontribs)

On enwiki we have en:Template:Infobox3cols, which makes it possible to specify one label and two data cells on each row. This is used in quite a few sports-related infoboxes for career statistics, e.g. en:Template:Infobox AFL biography. Infobox3cols has about 150,000 transclusions on enwiki at the moment. Would it be possible to add support for another data cell so that infoboxes that use infobox3cols can be converted to Capiunto easily? I'm not aware of any infoboxes that use more than three columns, but I shall have another look around and report my findings.

Mr. Stradivarius (talkcontribs)

It's been pointed out to me that infobox3cols actually allows four columns, despite its name. See en:Teddy Sheringham for an example of an infobox with the full four columns in use.

Reply to "Multi-column infoboxes"
Mr. Stradivarius (talkcontribs)

We had a discussion on the enwiki Template:Infobox talk page a while back about having different styles for odd- and even-numbered headers in infoboxes. At the moment this happens in en:Template:Infobox baseball biography, for example in the en:Ichiro Suzuki article, which alternates the colour of the header cells between each of Ichiro's two team colours. At the moment it does this by using a horrible hack; each second header in the infobox is in fact a child infobox with the headerstyle set to the team's secondary colour. It would be nice to be able to specify conditional styles for rows or headers so that we can do away with hacks like this.

Different infoboxes will have different requirements for conditional styling, though. One infobox might require every even-numbered header to be a certain colour, and another might require every second data row after a header to be a certain colour. Because of this, I think the functionality may be best implemented as a function that can be passed to the infobox object. It would take a few different parameters as input: the row number, the header number, isHeader, and the number of rows since the last header. And as output, it could produce a table that would then be passed to mw.html:css. Is this idea workable?

Reply to "Row-styling function"
There are no older topics