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.

Monday, July 5, 2010

ZedSeries Listing Tutorial (part #1)

Today was released ZedSeries Listing 1.6.0.stable, it is compatible with Contao 2.9 and is shipped with an inline guide. The following tutorial is taken from the inline guide. The project page is located at http://www.zedseries.com/zedseries-listing-extension-for-typolight.html. The issues are managed through bitbucket at http://bitbucket.org/zedseries/zedseries_listing/issues/. You can also visit the project page of ZedSeries Listing on Contao.org website.

Sunday, February 28, 2010

An overview of ZedSeries CommentEverything

ZedSeries CommentEverything is an open source extension for TYPOlight cms provided by zedseries.com improves the comments  default  module    providing the ability to setup a 'topic' for each content element;

Offers, also, the possibility to setup a relation between the topic and any table in your TYPOlight installation.

The screenshot below show how appears the comments module (after users have made a comment) used by default in the F.A.Q. module

faq_comments_default

As you can see there is no way to know that F.A.Q. 1 (listed in the filters bar) is related to the “Question #1”, this can be ok if you do not have many faq or if you have just some comments.

Using ZedSeriesCommentEverything you have more control on the comments of your website. It adds a new filter on the comments module so you can filter only the comments about a topic.

faq_comments_commenteverything

“Question #1” is more readable than “Parent ID 1” isn’t it? :)

How to setup ZedSeriesCommentEverything


The extension replaces the content element “comments” so don’t expect to find additional entries in your “content elements” list: just use a “content element” of type “comments”.

You can setup the (new) comments element with or without a database table relation.

Database table relations are useful if you want to bind  comments with existing data such as the f.a.q. example above. To add a relation just enter the topic and specify the field of which table will match the topic. Then you have to specify a field that will be used as label on the filters panel.

The (new) comments element can be set up with a topic that is not related to existing data. A tipical usage could be to setup a `shoutbox`on your website.

In this article we are going to show how to setup a (new) comments content element in both cases.

Setup with a relation to existing data


In order to reproduce the example above (comments related to the faq) set the “content element” as follow: dynamic

faq_setup_comments_ce

To give it a try, just put it in the same article in which you put the faq reader.

(If you are wondering about the ”{{request::}}” “insert tag” it is bundled with zedseries_lib)

Setup up as a shoutbox


Another way of using the (new) comments content element is to use it to put comments to a specific section of your website (e.g. the layout, a restricted member area section … and so on).

Create a (new) comments content element and specify a topic leaving blank the “Foreign key” and “Show field” fields.

commenteverything_shoutbox_setup

Once your users add comments you can filter it using the MyShoutbox filter as “Related topic”.

commenteverything_shoutbox_filter

That’s all


ZedSeries CommentEverything can be installed through the TYPOlight repository catalog browser.

You can find it quickly searching for “comment topic” tag-

If you need help or have some questions please post a comment.

Saturday, February 27, 2010

ZedSeries Listing v. 1.6.x: search system improved

From version 1.6.x (currently in rc1) ZedSeries Listing introduces a new search system to improve the search experience of the users of your website.

Basically it allows users to select more than just one field.

The new interface is composed by two select and one text field

zedseries_listing_search_ui

Compared to the previous interface now user can choose not only the field to filter but also the comparison operator. Multiple conditions can be added easily clicking on the green plus sign or deleted clicking on the red x.

Currently the supported operators are the following:

  • equal
  • greater than
  • equal or greater then
  • lower than
  • equal or lower than
  • starts with
  • contains
  • ends with

 

Next release will contain the option to show only selected operators.

Thursday, February 25, 2010

ZedSeriesUI: how to output nice messages in your backend modules

Sometimes you need to show some messages coming from your own backend module. In these cases usage of a template would be only a waste of time.

ZedSeriesUI satisfies these needs.

With ZedSeriesUi output your message will be easily as writing these lines:

        $ui = new ZedSeriesUi();


return $ui->title('Operation completed')
.$ui->box(
$ui->beLink('Go back to the main module.', 'do=myModule&key=MyModule')
);



the result will be graphically  integrated with TYPOlight default theme:




zedseriesui_box




 




Another useful function, if you need to build a list from custom data, is the  listingContainer function that along with the listingItem, can produce output like this:




zedseriesui_listingcontainer




The above result can be produced with the following code:




 




        $ui = new ZedSeriesUi();

// just a fake data array
$items = range(1, 15);

$listingItems = array();

foreach ($items as $item) {
// collect them using listingItem
$listingItems[] = $ui->listingItem('List item #'.$item, $ui->beLink('edit', 'do=MyModule&key=MyFunction&id='.$item));
}

// then return it inside a listingContainer
return $ui->listingContainer(implode("\n", $listingItems));



ZedSeriesUI is distributed inside the ZedSeries Library extension for TYPOlight cms




ZedSeriesUI is a young project but it will grow in the next releases of ZedSeriesLibrary




Do not forget to add the proper ‘<requiredextension name=”zedseries_lib” … />’ in the package.xml of your extension




Issues of the ZedSeries Library extension are managed through bitbucket at: http://bitbucket.org/zedseries/zedseries_lib/issues/

Monday, February 22, 2010

tl_debug: An useful extension for debugging TYPOlight

Project:  http://www.cyberspectrum.de/

Project webSvn page: (http://websvn.cyberspectrum.de/wsvn/tl_debug/)

tl_debug enable using firePhp from inside your TYPOlight extension.

Installation

You can download the source through svn.

At this time the most recent version is available doing a checkout at http://websvn.cyberspectrum.de/wsvn/tl_debug/tags/0.5.0

If you are not familiar with svn you can use tools like TortoiseSVN  (http://tortoisesvn.net/downloads)

debugger_be_link

Once downloaded the source you must copy the directory contained in system/modules (z___debug and debug) to your system/modules installation (i.e. TL_ROOT/system/modules/). Then a “developers” section appears to backend menu: click on “Debugger” to open the tl_debug settings panel.

 

In order to display the log messages you need the Firebug add on for Firefox (at least version 1.5.0 http://getfirebug.com/releases/firebug/1.5X/) and the firePHP plugin for FireBug https://addons.mozilla.org/en-US/firefox/addon/6149

Usage

Be sure to enable the debug in the backend module (Debugger) and set the options related to error level and database query you wish to log. You can log hooks on database queries coming from specific modules. It is a great tool.

Usage is simple as adding these lines where you need to debug:

/**
* $channel is one of ('log', 'info', 'error', 'warn')
* $label is a custom label
* $message is the message you want to show
*/
if ($GLOBALS['TL_CONFIG']['debugMode'])
$GLOBALS['TL_DEBUG'][$channel][$label] = $message;



This is the results on message logged with channel ‘log’ label ‘Hello’ and message ‘World!’;




i.e.




if ($GLOBALS['TL_CONFIG']['debugMode'])
$GLOBALS['TL_DEBUG']['log']['hello']= 'world!';



 




debugger_firebug




 




I hope you enjoy it!




thank you to qrczak for letting me know this project.