2009 Sourceforge Community Choice Award

We’re approaching P4A 3.4.0 release, we need your help making P4A a little more famous, you can do a lot for our project, click the following banner and nominate P4A for the “best tool or utility for developers” category.

Thank you so much!

Share/bookmark:
Digg StumbleUpon Facebook Reddit Mixx del.icio.us Google Live NewsVine

P4A 3.2.2 is out!

Changelog:

- P4A_Table’s image cols are now centered horizontally
- P4A_Button::setTooltip() and getTooltip() methods were added
- afterupload event typo was fixed
- P4A_Thumbnail_Generator::renderToFile() method was added
- P4A_Mask::getSource() method was added
- Zend Framework was updated to 1.7.7
- a bug with P4A_Fieldset theme was fixed (thanks to Mario Spada)
- P4A_DB::singleton() DB type verification is now case insensitive (bug #2643785) (thanks to BES)
- a few modifications were done on screen.css file for a better theme result (thanks to pbond81)
- The way we managed P4A_Validate translations was rewritten to fit the new rules by Zend Framework (we need your help translating the new messages)
- a bug with P4A_DB_Source::setWhere() method was fixed
- translations were synchronized
- auto file inclusion system was updated to avoid reading Mac hidden files
- a bug with P4A_DB_Source::addGroup() method was solved (internal syntax change due to a Zend Framework change)
- p4a_load_js() javascript function was updated to avoid errors if no callback function is passed

Download P4A 3.2.2

Share/bookmark:
Digg StumbleUpon Facebook Reddit Mixx del.icio.us Google Live NewsVine

P4A 3.2.1 released!

Changelog:

  • Zend Framework was updated to 1.7.4
  • PEAR::Net_Useragent_Detect was updated to 2.5.0
  • jQuery::form was updated to 2.19
  • P4A_DB_Source::setQuery() now strips out final semicolon from the passed SQL query (if present) (bug #2557215)
  • P4A_DB_Source::setWhere() now calls a firstRow() if the DB_Source isn’t in the “new row” state (bug #2316271)
  • P4A_Filename2File() now uses the fileinfo module if no mime type is detected otherways (bug #2121565)
  • a bug with P4A_Field::getAsDate() and Internet Explorer was fixed (thanks to Mario Spada)
  • P4A_Thumbnail_Generator::setWidth() now resets the max_width to avoid conflicts
  • P4A_Thumbnail_Generator::setHeight() now resets the max_height to avoid conflicts
  • P4A_Thumbnail_Generator::setMaxWidth() now resets the width to avoid conflicts
  • P4A_Thumbnail_Generator::setMaxHeight() now resets the height to avoid conflicts
  • P4A_Thumbnail_Generator::processFile() height/width calculation was
    rewritten in order to fix bug #2270922

Download P4A 3.2.1 now!

Share/bookmark:
Digg StumbleUpon Facebook Reddit Mixx del.icio.us Google Live NewsVine

P4A Table, a delete row helper

Sometimes, when I work with P4A, I prefer to allow the deletion of a record with a click on the table row. Look at this screenshot to have an idea:



Doing that with P4A is not hard: you have to add an action col, intercept the afterClick event and then call the db_source deleteRow event. Yet now it's even simpler because we have added the addDeleteRow helper to the P4A core :


$mytable->addDeleteRow();



If you want you can also call the helper with a custom label col and a custom confirmation message:



$mytable->addDeleteRow('Delete Row','Do you want to delete this row?');


You can find this helper in the svn repository or you can copy and past my code in the libraries directory:


<?php
function P4A_Table_addDeleteRow($table$params)  
{      
    if (isset(
$params[0])) {
        
$col_label $params[0];
    } else {
        
$col_label 'Delete';
    }
        
    if (isset(
$params[1])) {
        
$message $params[1];
    } else {
        
$message 'Delete current element';                   
    }

    
$table->addActionCol('delete');
    
$table->cols->delete->setWidth(150)
                        ->
setLabel($col_label)
                        ->
requireConfirmation('onClick'$message);
    
$table->data->intercept($table->cols->delete,'afterClick','deleteRow');

    return 
$table;
}


Happy P4A hacking!

P4A 3.2 is out!

Yes, P4A 3.2 is finally out!

The Changelog is really long but there are 3 big news to focus on:
  1. P4A is now released under LGPL 3. This means more flexibility for developers and customers.
  2. A new widget, the P4A_Grid, has been added to fast table data editing.
  3. P4A_Simple_Edit_Mask has been added to quickly create a simple mask to edit a database table.

To download P4A 3.2 visit:
http://sourceforge.net/project/showfiles.php?group_id=98294&package_id=105252&release_id=647599

Happy P4A hacking :)

Big news for the incoming P4A 3.2

Yes, big news for the incoming P4A 3.2

I've just finished to commit the first beta release of a new widget: the p4a_grid.
What is it? It's simply an editable table. This widget has been for a lot of time a highly requested feature so now I'm really happy to have it :) There's a lot of work to be done to have the perfect widget, for example to add checkbox cells and combo box cells, but now it already does a good job.

Using the p4a_grid is similar to using the p4a_table:

$this->build("p4a_grid", "grid")
->setWidth(600)
->setSource($this->source)
->setVisibleCols(array("product_id", "model", "date_arrival", "category", "brand"));

Now you have two options:

1) Using the "autosave" method to save automatically the changed values to database

$this->grid->autosave();

2) Intercepting the onChange event if you need to add more complex business logic:

$this->intercept($this->grid,'onChange','myhandler');
...
function myhandler($obj,$params){
/*
$params[0] -> the primary key value
$params[1] -> the column name
$params[2] -> the formatted new value
$params[3] -> the unformatted new value
*/
...
}

If you want to try it checkout it from svn and please give me your feedback :)

P4A on Facebook

Are you on Facebook? Then you sure don’t want to miss the new and shining P4A Facebook page!

Share/bookmark:
Digg StumbleUpon Facebook Reddit Mixx del.icio.us Google Live NewsVine

P4A 3.0.3 released

Time for a new maintenance release for our beloved framework, here you’ve the complete changelog:

- P4A_Thumbnail_Generator now supports ie’s pjpeg extension
- a bug with P4A_I18N::_format() method was solved
(YYYY was changed to yyyy)
- P4A_Field::setYearRange() method was added to be able to
manage the year range in the datepicker
- 10px top padding was added to P4A_Fieldset
- jQuery::maskedinput 1.1.4 plugin was added
- P4A_Field::setInputMask() and getInputMask() methods were added,
check the code reference for usage
- popup template support for “top” zone was added
- P4A_Table’s caption (label) is now automatically traslated at run time
- P4A now triggers the “ontranslate” event, you can intercept it
(getting string/translation/istranslated parameters) to track
translations while developing your application
- a bug with P4A_Table’s label with IE6 was fixed
- P4A_Table’s navigation bar’s “go to page” label’s CSS was changed
so now it will remain on a single line
- a typo in P4A_DB_Source documentation was fixed
- a PHP warning was fixed in P4A_DB_Navigator
- more info were added in products_catalogue’s index.php file
- P4A_Mask::setRequiredField() and unsetRequiredField() methods
now check if the field exists before calling the addValidator()
otherwise show an error message

Download P4A 3.0.3

Share/bookmark:
Digg StumbleUpon Facebook Reddit Mixx del.icio.us Google Live NewsVine

P4A documentation, the first mask

I’m taking a bit of time (before leaving for a week of pure holiday) to write some pages of the P4A manual.

After the latest post about P4A’s I18n I’m now working on the first mask page, containing documentation about building widgets, displaying them in the mask, using layout managers (frames, fieldsets, canvases, sheets) and using the field.

Work is nearly completed, I think I’ll finish it today and that will be great!

We still have a lot of parts that need documentation, you can find the list here, you know… your help would be really appreciated!

Share/bookmark:
Digg StumbleUpon Facebook Reddit Mixx del.icio.us Google Live NewsVine

Multilingual applications with P4A

How translations work and how to create multilingual applications in P4A.

Share/bookmark:
Digg StumbleUpon Facebook Reddit Mixx del.icio.us Google Live NewsVine