Jump to content
Michael
 Share


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. :)

 Share

Comments

Recommended Comments



sorry am way confused as to what happens

if for instance you create a new template set and alter template code to use your own design

e.g.

what exactly happens ?

does your idea know not to change that coding but to change anything else, for instance ... say you wanted to upgrade a 3.0.5 skin to 3.1.0 would we still have to reskin from scratch for 3.1.0 or would your idea just simply update the 3.0.5 skin to 3.1.0 ?

Apologies if questions sound stupid but as said am confused

<h2 class="maintitle">some text</h2>

to

<div class="mycss1><div class="mycss2"><h3>some text</h3></div></div>
Link to comment
Share on other sites

[quote name='-Stephen-' date='26 January 2010 - 06:03 AM']
sorry am way confused as to what happens

if for instance you create a new template set and alter template code to use your own design

e.g.

what exactly happens ?

does your idea know not to change that coding but to change anything else, for instance ... say you wanted to upgrade a 3.0.5 skin to 3.1.0 would we still have to reskin from scratch for 3.1.0 or would your idea just simply update the 3.0.5 skin to 3.1.0 ?

Apologies if questions sound stupid but as said am confused

To my knowledge, there isn't any way to know what customizations you (as a board owner, using a third party skin) might have made for a skin. Once you import a skin set, those templates get saved in the database. When you make your own customizations, it changes what's in the database. There isn't any 'master' version of third party skins to check against to determine what customizations you might have made. When you import a new version of a skin, it simply updates the old templates that were customized with the new content of those templates.

It's essentially working the same way mods work too. Say you installed a mod and you wanted to tweak it a bit. You make the changes to whatever files are necessary and save those. Then, when the mod author releases a new version, you'd again need to apply those tweaks to be upgraded and to have the same functionality.

My advice if you are finding that you need to make lots of tweaks to skins for your own sites, is to either tell the skin author that said tweaks should be included in the skin's next version. Or, if the tweaks are very specific to your own needs, maybe the best approach is to make a hook that will achieve what it is you need. That way it will still work after the upgrade. If all else fails, simply keep a log of what changes you do make.

<h2 class="maintitle">some text</h2>

to

<div class="mycss1><div class="mycss2"><h3>some text</h3></div></div>
Link to comment
Share on other sites

Quick update, I've tried to do an upgrade on the CleanCut skin on my own site and it appears to have gone well. The only issues I have seen thus far have been missing icons from applications (which you can just upload from the associated application's installation files) and third party mods. :)

Link to comment
Share on other sites

[quote name='Michael' date='26 January 2010 - 11:33 AM']
To my knowledge, there isn't any way to know what customizations you (as a board owner, using a third party skin) might have made for a skin. Once you import a skin set, those templates get saved in the database. When you make your own customizations, it changes what's in the database. There isn't any 'master' version of third party skins to check against to determine what customizations you might have made. When you import a new version of a skin, it simply updates the old templates that were customized with the new content of those templates.

It's essentially working the same way mods work too. Say you installed a mod and you wanted to tweak it a bit. You make the changes to whatever files are necessary and save those. Then, when the mod author releases a new version, you'd again need to apply those tweaks to be upgraded and to have the same functionality.

My advice if you are finding that you need to make lots of tweaks to skins for your own sites, is to either tell the skin author that said tweaks should be included in the skin's next version. Or, if the tweaks are very specific to your own needs, maybe the best approach is to make a hook that will achieve what it is you need. That way it will still work after the upgrade. If all else fails, simply keep a log of what changes you do make.

Must be me then as am still lost

I am a skin author, so are you saying that I will still need to create skins for 3.1.0 from scratch as I make changes to numerous templates/css (as have always done with every major new release), if so then have no idea what your idea does or is for ... or will this idea you are working on stop me having to work from scratch when 3.1.0, 3.1.1, 3.1.2 etc released

Link to comment
Share on other sites

[quote name='-Stephen-' date='27 January 2010 - 07:01 AM']
Must be me then as am still lost

I am a skin author, so are you saying that I will still need to create skins for 3.1.0 from scratch as I make changes to numerous templates/css (as have always done with every major new release), if so then have no idea what your idea does or is for ... or will this idea you are working on stop me having to work from scratch when 3.1.0, 3.1.1, 3.1.2 etc released

No, you should not need to make your skins from scratch each time. All you should have to do is take the current version of the skin, make whatever changes you need to make to update the skin, and then export that as the new version of the skin. As long as you use a skin set key each time, people will be able to upgrade the copies of their skins.

Consider this example. IPS released the CleanCut beta a couple months ago, and it worked well for the version of IP.Board and the applications available at that time. Since then, the author updated the skin to fix some bugs, and to make the skin look good in the new .1 releases of the applications. All that had to be done to fix this on boards that had the old CleanCut installed was to re-import this new version of the skin and select the option to upgrade.

As far as what you have to do when 3.1.0 is released, and whether your 3.0.x skins will need redone from scratch, I don't want to say for sure that there will be no changes. But from what I've seen to this point, it's not a major update as far as skins are concerned; 3.1.0 is not (again, from what I have seen) a major change in the way skins work. I think maybe your confusion is lying in the fact that this feature is intended to be used by people who install skins, so they can upgrade their skins on their sites, it's not intended to make skinners' lives a lot easier (although it should help if people ask you how they upgrade if you ever update a skin).

Link to comment
Share on other sites


ahhh .. so not much help to me then ... what you are saying is instead of people deleting (or disabling) the old skin and importing new updated skin they just basically import new skin version 'overwriting' the old skin version ?

Have I got that right now (if not then think will give up now and wait and experiment when released to see if I can then understand better as most of my skins have 3 image catheaders and some code moved in templates to another part of same template) ?

I think maybe your confusion is lying in the fact that this feature is intended to be used by people who install skins, so they can upgrade their skins on their sites, it's not intended to make skinners' lives a lot easier (although it should help if people ask you how they upgrade if you ever update a skin).

Link to comment
Share on other sites

[quote name='-Stephen-' date='27 January 2010 - 11:11 AM']
ahhh .. so not much help to me then ... what you are saying is instead of people deleting (or disabling) the old skin and importing new updated skin they just basically import new skin version 'overwriting' the old skin version ?
This is correct. The idea is that instead of making people import a new version of the skin, you simply update the existing one.

Link to comment
Share on other sites

This is great as I have just had to revert my custom skin after installing v3.1.0 of the Gallery and am told its a lot of work for the skinner to upgrade their existing skins. Very welcomed Michael

Link to comment
Share on other sites

This isn't going to help me, with my numerous tweaks to the IP.Board skin. I have to mark my inserts and deletes with comments, and save a copy of my additions somewhere.

I wish IPB would keep a log of changes made to each skin. I think this would not be hard to do.

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...

×
×
  • Create New...