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.