Help:MerchandiseTable

From ClassicKidsTv.co.uk
Jump to: navigation, search

An extension to MediaWiki for ClassicKidsTV.co.uk to provide merchandise tables, with linked images and automatic linking to Amazon, and other sites.

Coded by Orbling for ClassicKidsTv.co.uk.

Syntax

The XML tag pairs enclose a list of entries, each one seperated by a line containing '---' on its own.

 <merchandisetable [options]>
   entry1
   [---
   entry2
   ---
   ...]
 </merchandisetable>

Available options are as follows:

 entriesPerRow=integer (default: 3)
 imgSize=pixels (default: 200)
 useButtons=boolean (default: true)

Each entry takes the form of key/value pairs, like that found in an INI file. The 'title' entry is compulsory, all others are optional.

 title=text (compulsory)
 image=filename (default: NoImage.png)
 amazon=both|uk|com|uk1st|com1st (default: both)
 amazonref=reference (default: null, this is the ASIN number)
 url=url (default: Amazon link to amazonref)
 tooltip=text (default: Image)
 link-text=url ("text" is link text, "url" is the corresponding url)

The values for the "amazon" tag mean the following.

uk
Just render the Amazon.co.uk link
com
Just render the Amazon.com link
both
Render both links (Amazon.co.uk first)
uk1st
Render both links, Amazon.co.uk first
com1st
Render both links, Amazon.com first

Any number of "link-" values may be given as long as they have differing "text" parts.

Example

 <merchandisetable imgSize="150" useButtons="true" entriesPerRow="3">
 title=The Complete Bagpuss
 tooltip=The Complete Bagpuss
 image=Bagpuss_The_Complete_Bagpuss.jpg
 amazon=both
 amazonref=B00004YVDL
 link-Play.com=http://www.play.com/DVD/DVD/4-/601970/The_Complete_Bagpuss/Product.html
 </merchandisetable>

Renders as -

The Complete Bagpuss
Bagpuss The Complete Bagpuss.jpg

Stb-amazon-co-uk.png Stb-amazon-co-uk.png


Notes

FAQ

What is an ASIN number?

When adding the "amazonref" tag in an entry, you need to specify an ASIN number. This is an Amazon Standard Identification Number.

All products on Amazon have one of these numbers, and it is unique across all their stores. For books the ASIN is just the ISBN number, for other products it is a unique code.

See Wikipedia for more details.

Is there a convention for naming image files?

Yes, though it's not always followed.

In general, the filename should be the name of the show (do not include "the"), followed by a quick picture title, seperated by underscores.

eg. Dogtanian_Series_1.jpg

If the item is not a Region 2 DVD, then it would be a good idea to add something about that in the title. All Region 1 DVDs should have "R1" at the end of the filename.

eg. Flintstones_Season_1_R1.jpg

VHS titles, should have "VHS" appended.

eg. Fiddly_Foodle_Bird_Volume_1_VHS.jpg

All images should preferably be in JPEG format, with ".jpg" as an extension.

What if the merchandise isn't on Amazon?

This is fine, just leave out the two Amazon fields (amazon, amazonref), but be sure to include a "url" option, to provide a link for the picture, as one will not be automatically generated in the way the amazon links are.

Should I use entriesPerRow?

In general, the default of 3 entries per row, at the default size (200 pixels), is fine. If it does not look neat to you, feel free to try another configuration, but bare in mind the typical size of peoples' screens.

In particular, if you have 4 entries, it tends to look neater if you make the table display as 2 entries per row. This can be done by adding "entriesPerRow=2" as parameter inside the main tag, see above.

Still stuck...

If you have questions that are not answered here, or have found a bug, please contact Orbling for help.


Images

DVD Covers

When uploading a DVD cover image, please fill in the Summary section with the standard template. This enables the site to automatically generate a gallery of DVD Covers.

Square Images

All images are assumed to be square and are scaled to the size specified by the 'imgSize' parameter (which defaults to a 200x200 pixel image).

Distorted

If you specify an image that is not square, the aspect ratio will be distorted when it is stretched leading to misshaped pictures.

Square

To avoid this, you should always create a square image from a non-square image, preserving the aspect ratios - this can be done fairly easily using most graphics packages.