The Last Homely House

General => Wiki Project => Topic started by: Kralik on April 18, 2012, 02:08:52 PM

Title: Other Versions and Prints Template
Post by: Kralik on April 18, 2012, 02:08:52 PM
I made some thumbnail images for the wiki and have come up with a template for alternate versions. Someone (I don't remember who) once offered to write a script to skim the database spreadsheet for subtitles and add alternate versions to the wiki. Whoever it was, now would be a good time.  :mrgreen:

I experimented a LOT with tables, image captions, etc. and I found the cleanest layout is simply using tooltips for the names of each alternate card. Using tables is doable but it is a major PITA to edit. I actually like the clean layout a bunch of captionless thumbnails gives.

I would like to keep alternate versions to "unique" versions of a card, so any reprints and/or promos should be in a separate category. Take a look at The One Ring (1C2) as an example.

Here's the code:
Code: [Select]
--snip--
Ugh, the forum autolink messes with it. You'll just have to check the page itself.

For a card like Isildur's Bane, I would add a "Promo Versions" section for things like Tengwar. Since The Ruling Ring has no promo versions, there is simply a reprint section that references each set.
Title: Re: Alternate Versions Template
Post by: TelTura on April 18, 2012, 02:37:15 PM
That was me.  I'll get something thrown together tonight after work; how is the wiki held together behind the scenes?
Title: Re: Other Versions and Prints Template
Post by: Kralik on April 18, 2012, 02:42:07 PM
The wiki is DokuWiki. It is written in PHP and keeps its data in simple text files. I modified the template to make it as minimal as possible and it is integrated into the card pages using an IFRAME and some fancy Javascript to automatically (re)size the frame. I plan on having the text files packaged nightly and made downloadable at some point.
Title: Re: Other Versions and Prints Template
Post by: TelTura on April 18, 2012, 02:44:57 PM
I'll just get the info packed in another spreadsheet, then, until you've got it packaged and then I'll write a small module to merge the two.
Title: Re: Other Versions and Prints Template
Post by: Kralik on April 18, 2012, 02:46:17 PM
Do you need a copy of the database spreadsheet? If it's too much hassle, I could do it as well. Most likely I'd write a script to parse the data looking for commas, throwing out any items without, and then running through making the wiki image/link code. Then I'd sort them alphabetically and have at it.
Title: Re: Other Versions and Prints Template
Post by: TelTura on April 18, 2012, 02:51:50 PM
nah, no problem at all.  You've still got a link to the db spreadsheet in the "useful resources" thread in the golden hall, so assuming that's not obsolete I've got what I need for now. 
Title: Re: Other Versions and Prints Template
Post by: Kralik on April 18, 2012, 02:54:33 PM
I think it's a bit dated. It might have a few typos here and there, but they aren't likely to be related to card titles or ID#s.
Title: Re: Other Versions and Prints Template
Post by: Kralik on April 18, 2012, 09:05:54 PM
TelTura just BLASTED out 1000+ pages and we now have Other Versions/Prints for all the cards (unforeseen bugs excluded ;)). If any of those pages were recently edited, I'll be adding the edits back in.
Title: Re: Other Versions and Prints Template
Post by: TelTura on April 19, 2012, 07:04:07 AM
I'll work on those bugs you PM'd me about and get you updated versions sometime today.
Title: Re: Other Versions and Prints Template
Post by: Kralik on April 19, 2012, 01:55:42 PM
All set! You deserve some serious kudos. =D>
Title: Re: Other Versions and Prints Template
Post by: TelTura on April 19, 2012, 01:58:21 PM
Is there any chance I could look at the script used to display the popup for the forums?  I think once the wiki's populated it will almost be more useful there than here.
Title: Re: Other Versions and Prints Template
Post by: Kralik on April 19, 2012, 02:05:54 PM
You can -- it's actually right near the top of the source code in every forum page. But now that the normal autolinking is working for the wiki, I'd like to leave it as it is for now. I keep debating whether I should port it, and so far I'm thinking it doesn't need to be. The links to the wiki pages should be worth following (assuming that they have helpful strategy info).

Note: The Javascript code is visible in each page. The PHP code to parse the card titles is a bit buried throughout various SMF sources, but consists of a giant Regex block and some code to parse [ card ] tags.
Title: Re: Other Versions and Prints Template
Post by: TelTura on April 19, 2012, 02:16:18 PM
This is true.  If it ever gets as complete as we hope, it will likely suck one in as much as any other wiki.  I just find the hover-image incredibly useful in the forum discussions; someone mentions a card and you can see at a glance what it is instead of changing tabs, etc. 
Title: Re: Other Versions and Prints Template
Post by: TelTura on April 22, 2012, 12:50:00 PM
haha, the script took like an hour and a bit.  I HAS A SOCIAL LIFE, YOU JUST CAN'T SEE IT [rocks back and forth]
Title: Re: Other Versions and Prints Template
Post by: TelTura on April 28, 2012, 11:35:00 PM
I think it's a bit dated. It might have a few typos here and there, but they aren't likely to be related to card titles or ID#s.


Speaking of which, is there an updated version of this data somewhere?  Doesn't have to be a spreadsheet; I'm looking to parse it into an XML equivalent anyway.
Title: Re: Other Versions and Prints Template
Post by: Kralik on April 30, 2012, 06:59:00 AM
Updated http://lotrtcgwiki.com/files/CardData.xls