Pierrick on Piwigo

Piwigo is the open source photo gallery for the web

Piwigo 2.2 Release Candidate 4

OK, I remember I said last time Piwigo 2.2.0RC3 would be the last release candidate before version 2.2.0. While writing a technical documentation to make plugins and themes compatible with Piwigo 2.2, we realized that some new technical features (combined script) could be simplified, to make life easier for plugin writers. So we’ve decided to simplify. This simplification meant many code changes and it would not be safe to release it as 2.2.0. So here is Piwigo 2.2 release candidate 4.

Piwigo 2.2.0RC4 also includes the upgrade script. Now you can test the upgrade from Piwigo 2.1 (or even older).

Upgrade from any older Piwigo version to Piwigo 2.2

Upgrade from any older Piwigo version to Piwigo 2.2

In addition to bug fixing, we have added a few features : Piwigo can detect if your themes/languages have updates available.

So what about the simplification P@t has made in the code? This is about the new combine_script feature which replaces known_script in your template files. Let’s just give an example to get the idea. Here is what plugin writers are coding in Piwigo 2.1:

{known_script id="jquery" src=$ROOT_URL|@cat:"themes/default/js/jquery.packed.js"}
{known_script id="jquery.ui" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.core.packed.js" }
{known_script id="jquery.ui.sortable" src=$ROOT_URL|@cat:"themes/default/js/ui/packed/ui.sortable.packed.js" }
 
{literal}
<script type="text/javascript">
jQuery().ready(function(){
  jQuery(".catPos").hide();
  jQuery(".drag_button").show();
  jQuery(".categoryLi").css("cursor","move");
  jQuery(".categoryUl").sortable({
    axis: "y",
    opacity: 0.8
  });
});
</script>
{/literal}

And here is what they will code in Piwigo 2.2:

{footer_script require='jquery.ui.sortable'}{literal}
jQuery(document).ready(function() {
  jQuery(".catPos").hide();
  jQuery(".drag_button").show();
  jQuery(".categoryLi").css("cursor","move");
  jQuery(".categoryUl").sortable({
    axis: "y",
    opacity: 0.8
  });
});
{/literal}{/footer_script}

Much simpler, isn’t it? More details and examples can be found in the technical documentation to make plugins and themes compatible with Piwigo 2.2. I will write another blog post about CSS sprites and combine_css.

Details about Piwigo 2.2.0RC4 and downloads

Advertisements

Written by plg

March 11, 2011 at 11:02 pm

%d bloggers like this: