Sunday, May 15, 2011

ConfigWizard available in version 1.5.0

Version 1.5.0 of ZedSeries Library features a ConfigWizard class that lets developers quickly implement custom config options for their Contao extensions.

Config options are managed through a section/key/value schema.

In the following example we’ll manage two configuration options for a virtual extension. We’ll choose to assign to this configuration the name ‘dummy_ext’ (it will be our “section” name). Our two configuration options will be named option_string and option_flag.

Monday, March 21, 2011

What’s new on ZedSeries Maps 1.2.0

ZedSeries Maps 1.2.0 contains the following changes:

  • ability to show the infowindow of the map center after map loads
  • a new item type was added: “Directions item” let you define some starting points that will be shown in the "Get directions" form

Take a look at the new features in the demo page of ZedSeries Maps

If you wish to have a preview of all the features of ZedSeries Maps download the user guide.

Sunday, March 20, 2011

Tuesday, November 2, 2010

What’s new in ZedSeries Help System 2.0

ZedSeries Help System for Contao cms  is a valuable tool that allows you to easily create user guides.
Through full integration with Contao you can associate a particular paragraph in a specific context, eg you can create a link into the “global operations menu” of the “news module” and bind it to a paragraph that explains the “news module”.

Sunday, July 25, 2010

How to create an extension for Contao starting from a Language Pack

This tutorial is tailored for windows users, I’m sure that users of other operating system know how to adapt it to their needs :)

A few days ago I’ve released a command line script that aims to build a Contao extension starting from a language pack.

The project page is located at http://bitbucket.org/zedseries/contao_languagepack_builder/, the script can be downloaded from http://bitbucket.org/zedseries/contao_languagepack_builder/get/v1.0.1.stable.zip

Requirements

  • Php executable installed on your system (The script is written in php, so you must have a php cli installation to run it)
    If you do not have a php executable installed on your system, you can download a copy for windows at http://www.php.net/get/php-5.2.14-Win32.zip/from/a/mirror)
  • Some basic knowledge of the command line
  • An account on Contao.org (if you are a translator you can use your translator username)

Monday, July 19, 2010

Let users find custom templates with Contao 2.9

This article has developers as audience, if you came here wondering why your custom template doesn’t get listed, please contact the author of the extension and tell him about this article :)

From version 2.9 Contao introduces the concept to pick templates from different directories and subdirectories.

Contao 2.9 introduces also the concept of themes, and let users assign a directory of templates to a theme. You can read the full announcement here.

If an user put a custom template into a subdirectory of the main templates dir, some extensions will not show it.

Every developers should update their extensions to reflect the above changes, here I will propose a cross-version solution to solve this problem.

If your extension uses a custom template, you will have a line like this in your d.c.a (let me tell we are talking about the tl_example dca):

$GLOBALS[‘TL_DCA’][‘tl_example’][‘fields’][‘my_template_field’] = array(
‘inputType’
=> ‘select’,
‘options’
=> $this->getTemplateGroup(‘my_prefix’)
);






in order to list the templates that exists in the template folder assigned to a theme, you must make the following changes:




Create a class wherever you want




(the “Contao way”  of doing it is to create a class named as the dca inside the same file.)




 


class tl_example extends Backend {
public function __construct() {
parent
::__construct();
}

public function listTemplates($dc) {
if (version_compare(VERSION.BUILD, '2.9.0', '>=')) {
return $this->getTemplateGroup(‘my_prefix’, $dc->activeRecord->pid);
}
else {
return $this->getTemplateGroup(‘my_prefix’);
}
}
}





 




then change the field’s entry in your dca to take the list of templates from the above function:




 


$GLOBALS[‘TL_DCA’][‘tl_example’][‘fields’][‘my_template_field’] = array(
‘inputType’
=> ‘select’,
‘options_callback’
=> array('tl_example', 'listTemplates')
);





These changes will make you extension compatible with Contao 2.9 and mantain the compatibilty with older versions.




Please comment below if you find errors or you simply  want to say something :)

Sunday, July 11, 2010

Just published api.zedseries.com

I have just uploaded the documentation for ZedSeries Library to http://api.zedseries.com.

Feel free to comment below if you find errors or if you have suggestions to improve it.