Jump to content

Invision Community Blog


Managing successful online communities

Michael
Sign in to follow this  
 

IP.Board 3.1.0 Dev Update: Skin Upgrader

One of the neat new features of IP.Board 3.0 was its integrated application/hook installer and upgrader. Using this took a lot of the headache out of updating modifications when the author produced a new version as you would have either needed to use a custom installer script or install a component dedicated to modification installations. This has helped out with the installations of modifications, but skins still install in essentially the same way, and there is nothing built in to the product to let you upgrade skins.

Currently, when a new third party skin gets updated by its author, it can involve a lot of work for board owners who use that skin to upgrade the copy of it on their site. The old procedure was to import the new version of the skin, move everyone who was using the old version onto the new version, and delete the old version. If you had customized anything to do with that skin template prior to initially installing it, you'd have to keep track of what changes you had made so that you could apply them to the new version of the skin. It should go without saying, this procedure was clunky at best.

Recently I stumbled across a post where this frustration was mentioned. This got me thinking about the issue. Surely there must be a way to upgrade a skin just like hooks and applications can be upgraded, right?

Right now I'm developing some additional functionality in the Skin Import/Export feature in IP.Board 3.1 to take care of this. Essentially how it will work is this: when you import a skin set, the skin info is checked to see if a 'skin set key' has been set. If it has, it checks if this key matches the key of a skin you already have installed. If it does match, and you check a box indicating you want to try and upgrade, it will attempt to upgrade your existing skin. Any replacements/CSS/templates that this new skin XML has will be checked against the existing items from the old version of the skin to see if changes are needed.

Thus far, I have it coded to show you the check box to indicate whether or not an upgrade will be attempted:

blogentry-44642-12644422719_thumb.png

I also have a lot of the back end work done where it will see if it needs to upgrade an existing item instead of just inserting a new version of the item. There's a lot of checking involved to be sure I'm not duplicating elements, so this will require a lot of testing. I've got a few bugs to work though on this, but it should be in place pretty soon.

I think that this will be a feature that will be appreciated by a lot of folks. I welcome any feedback you may have. :)

Sign in to follow this  

Comments



Recommended Comments

[quote name='No1 1000' date='25 January 2010 - 06:41 PM']
Very good!

Does this mean that skin keys will be packaged along with the export now? In my experience, they haven't been in the past.

This. I've been copying skins from dev site to dev site over the last few weeks, and every time I have to re-input the skin key

Share this comment


Link to comment
Share on other sites

[quote name='No1 1000' date='25 January 2010 - 01:41 PM']
Very good!

Does this mean that skin keys will be packaged along with the export now? In my experience, they haven't been in the past.

Thank you for bringing that up. That's correct, currently, skin set keys do not show up in the export. I fixed that while working on this. Starting with the next update, skin XML exports will contain that value.

Since they didn't show up in the exports before, they would never have been set when people imported them. So to take advantage of this feature, it's going to be important for skin authors to communicate that people will need to set these keys prior to upgrading. Once they are set, the upgrade should work fine, and further upgrades after that point should also work fine.

Share this comment


Link to comment
Share on other sites

Just as a quick update, I just took the CleanCut beta skin available in the client center, imported it into a test board, and set the skin set key. I then downloaded the new update for CleanCut for IP.Board 3.0.5 and the latest IPS applications and imported it, selecting to upgrade the existing skin; it seemed to work well. :)

Share this comment


Link to comment
Share on other sites

Wow. I have to hand it to you here Michael! This is unbelievable. Although I would have appreciated it before, I never even remotely thought of this being possible with such ease to the board user. Thanks for proving me wrong! I can see this coming in handy as I really like to have multiple skins on my board and upgrade them when the time comes around to doing so. Now this will speed things up so much more and contribute to making normally hard tasks into simplistic ones with IPB! In turn this will make it a lot less cumbersome (if it was at all) to me as a board owner and will give me valuable time to worry about other things with my board. Great progress so far!

Share this comment


Link to comment
Share on other sites

Any more information on how it works exactly? Does it mean when IPB adds to the default skin you can use this and your custom skins will gain the updates made to the default board skin? Or does the skin author first have to manually make all the changes and release an update?

When I upgrade my skin that has for example 6 edited templates (ie: google ad additions, mod edits, etc...), what is the process it follows to update a modified skin template?

Just curious :) - very anxious to give this a try.

Share this comment


Link to comment
Share on other sites

[quote name='.Logan' date='25 January 2010 - 09:07 PM']
Any more information on how it works exactly? Does it mean when IPB adds to the default skin you can use this and your custom skins will gain the updates made to the default board skin? Or does the skin author first have to manually make all the changes and release an update?

When I upgrade my skin that has for example 6 edited templates (ie: google ad additions, mod edits, etc...), what is the process it follows to update a modified skin template?

Just curious :) - very anxious to give this a try.

It does a similar process for templates, replacements, and CSS, but I'll walk you through the template process as an example.

It reads the XML file to find which templates are defined for this skin, and it puts those into an array. It then loops through the array and checks to see if there is already a template for this skin group, named the same as this skin template, and for this skin ID. If there is one there already, it updates the existing entry to set the new template content, the template data variables, the updated time, etc. If it couldn't find an exact match for this template, it adds it.

Make sense?

Share this comment


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...