|
Packaging Your Skin
Distribution is something that's often overlooked in the world
of software. Many developers either zip their files and assume
their users will know what to do with them or use generic
installers that can't always react properly to certain
exceptions.
If you've already worked with Messenger Plus! scripts before,
this section won't be a surprise to you as the exact same principle
is used. Skins are distributed in what's called a Skin
Pack. To create a skin pack, compress all the files of
your skin into a zip archive using your favorite zip tool (such as
Winzip) and
change the extension of the file from ".zip" to ".plsk". That's all
you need to do to create a working distribution package for your
skin.
Directories and sub-directories can be used to organize the
skin's files, however, SkinInfo.xml
must always be at the root of the archive. If no skininfo file can
be found, Messenger Plus! will consider the Skin Pack to be
invalid. Skin Packs can be imported from the Messenger Plus!
preferences and are also registered in the shell: double-clicking
on a plsk file while being signed-in in Messenger will
automatically trigger the display of the Import Skin window.
Note to webmasters: because Skin
Packs are actually zip files with a different extension, some
servers may detect the real file type and automatically send a
".zip" to your visitors, preventing them to properly import the
file once it's been downloaded. On Apache, this problem can be
fixed by adding an AddType directive in
your .htaccess file. If you're
experiencing the problem on a server that you do not control, just
re-zip your plsk file to protect its extension inside a new archive
or contact your server's administrator.
Although the only information required in your skininfo file is
<Name>, it is recommended to take
advantage of a maximum of other elements to improve the experience
of your future users. All the information that's allowed for a skin
is listed in the
schema file of SkinInfo. Here are some of them:
- Name. The name of your skin as displayed in
every window of Messenger Plus! when needed. This name is also used
to create the destination directory of your skin during
importation. Do not specify a version number here.
- Description. This text can be several lines
long and is displayed during the importation of your skin.
- AboutUrl. If you have a web site, specify it
here. Users will have access to your site from the Import window
and the Skin menu in Messenger.
- Version. The version of your skin, to identify
updates. It is displayed next to the name of your skin, as-is.
- Screenshot. Before reading the name or the
description of your skin, people will want to know what the skin
actually looks like. A picture file can be specified here for that
reason. It will be displayed in a square, resized if needed, and
will be visible in both the Import Skin window and the Preferences
panel. It's not very big so avoid adding screenshots of entire
windows here.
- Compatibility. This element is important as it
informs Messenger Plus! about the version(s) of Messenger that are
compatible with your skin. Versions specified here won't restrict
any part of your skin from being loaded but will provide visual
clues to the user if the skin is incompatible.
Here is an example of a skininfo file created for Test Skin that uses all the elements described
above:
<SkinInfo>
<Information>
<Name>Test Skin</Name>
<Description>This skin is for documentation purposes only.</Description>
<AboutUrl>http://www.msgpluslive.net</AboutUrl>
<Version>1.00</Version>
<Screenshot>
<File>screenshot.png</File>
</Screenshot>
<Compatibility>
<MsgVersion Major="8" Minor="5"/>
</Compatibility>
</Information>
...
</SkinInfo>
Once a skin is packed properly, it can be redistributed without
any constraint and by any means you judge appropriate. Remember to
instruct your visitors to download the latest version of Messenger
Plus! Live as well as Skin Packs are not recognized by older
versions of the software. Also, if your skin uses features that
were added in subsequent versions of Messenger Plus! and you want
to prevent importation in incompatible versions, add a Version attribute to your <SkinInfo> element.
Here is the list of schema versions that can be used:
- Messenger Plus! Live 4.50 : skin schema version 1.
- Messenger Plus! Live 4.60 : skin schema version 2.
So, for example, if you used a DateRange restriction in your skin (added in
Messenger Plus! 4.60) and want to make sure the restriction is
always considered when the skin is loaded, you would have to define
the root element of your skininfo file as:
<SkinInfo Version="2">
...
</SkinInfo>
If you've read all the sections of Skins Essentials, you now have the
knowledge to create great skins with Messenger Plus!. When you'll
feel comfortable enough using the system, go read about the
Specialized Subjects. These
additional sections will brief you about the cool features
available to those who want to do more than the average
developer.
Good luck!
See Also
Skins Essentials, Specialized Subjects.
|