Category: PHP

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!

Multilingual applications with P4A

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

P4A 3.0.2 is out

We’re not on holiday yet, time for a new minor release :-)

Changelog:

  • a small change was done on P4A_Array_Source to enable the usage of empty array_sources without warnings
  • tooltips are now automatically translated at rendering time
  • P4A_DB_Source::saveRow() now reads pk values back from Zend_DB_Table::insert() gaining better functionality with auto increment primary keys
  • jQuery UI was updated to 1.5.2
  • a small bug with P4A_I18N::_normalize() method was solved
  • p4a_focus_set() javascript function was reworked to avoid a javascript warning in firebug
  • loading a P4A_Array_Source with a simple array of data now does not create the “0″ field anymore, it’s been renamed to “f0″ to avoid problems with some PHP configurations with numerical object properties

Download P4A 3.0.2

P4A 3.0.1 released

Changelog:

- a bug about session name was solved
- FCKEditor was updated to 2.6.2
- a bug with shadows CSS was solved (unused shadow.png file is not linked by screen.css anymore so we’ve no “file not found” in web server’s logs)
- P4A_Error_Handler() global function now uses the P4A::messageWarning() wrapper for P4A::message() solving a bug with the warning icon name that was changed in 3.0.0-rc5
- jQuery UI was updated to 1.5.1

For the first time p4a is also available as .deb package. We encourage all users of Debian based distros to test this new package and give us feedback.

Download P4A 3.0.1

P4A 3.0 is out!

It was a long long journey started on December 17th, 2007, with more than 800 commits it has really been an hard work but we’re proud to tell everybody that P4A 3.0 is finally released!

Thank you everybody contributed to this wonderful release!

I suggest you to check the official release notes, they’re full of useful info and… For who was waiting… commercial license is available too.

Note: the image at the top is just a humorous revisitation of P4A logo with some “300 the movie” effect :-) hope you enjoyed.

P4A 3 updates, wiki, guides and release plans

I spend some hours working on the new P4A wiki that’s finally open for contributions, I finished some guides:

and I’m working on the new P4A manual which is definitively a long work and would really need your help.

I think that we can expect the final P4A 3 release in a few days :-)

P4A 3.0.0-rc5 released, hopefully the last one :)

It’s been a long time since we published rc4 (2 weeks? :-)) anyway, we wanted to work a bit on the graphic theme giving develpers the possibility to change the look&feel of their applications with ease and we introduced some variations to the default P4A theme which was pretty the same since some years :)

Now check out the new default theme:

You can notice that we’ve shadows, gradients and some new icons… but… with just a few lines of code you can get:

or this:

or thousands more :-)

To know how to create color schemas and icons pack just check the rc5 overview on P4A TV

Now, I’m running out of time so let’s jump to the changelog:

- P4A_Table’s CSS was beautified a bit
- _disabled icons were removed, opacity: 0.2 filter is added to buttons
to simulate the disabled effect
- P4A_Message’s CSS was changed due to the variation of its usage,
now it’s not black/bold anymore
- P4A_Table’s order/row indicators were replaced with HTML entities
removing the need for icons
- default fonts in CSS were changed because of the lack of some UTF-8
characters in IE6
- P4A_Menu’ submenu indicator icon was replaced with an HTML entity
which is applied by a javascript function because the indicator
has no reason to be in the HTML
- spacer.png image was removed ’cause unused
- loading.gif was moved from icons directory to theme directory
- some new constants were added to customize theme colors
- a bug with PNG uploads under IE was fixed
- separator.png icon was removed
- P4A_Toolbar’ separators are now rendered as empty divs instead of
an image
- P4A_Toolbar’ were switched from P4A_Image to P4A_Box
- P4A_Toolbar::setSize() method now checks if buttons have the setSize
method to propagate it, otherwise tries the setHeight method, otherwise
throws a warning
- P4A_Message default size was changed to 32
- 48 pixels icons were removed
- a gradient was added to some elements in the default theme
- P4A::messageInfo(), messageWarning() and messageError() methods
were added wrapping P4A::message() method
- P4A icons now implements the freedesktop icon naming specifications:
http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
- P4A_Mask’s default icon size was changed from 48 to 32
- P4A_Table_Navigation_Bar’s current page indicator was switched from a
P4A_Label to a P4A_Box because the P4A_Label has to be bundled with a
P4A_Field
- a nice shadow effect was added to system messages and tooltips if
not on handheld or internet explorer browsers
- jQuery::UI was updated to 1.5
- P4A_DB_Navigator’s HTML was reworked to work on ie6 without GIF images
and removign inline CSSes

DOWNLOAD P4A 3.0.0-rc5

P4A 3.0.0-rc4 is out, you choose the new icon set

A few bugfix and a bit of work on P4A_Table for a better readability:

- a default submit button was added to P4A default HTML form
(hidden and without events) to solve the
enter key bug (propagating event to the first button)
- mouseover on system messages pause the fadeOut timer giving
more time to read the messages
- P4A_Table_Col::setHeader() method was marked deprecated
- P4A_Table_Rows and P4A_Table_Col now trigger the onclick event
(in addition to beforeclick and afterclick) useful if you don’t
want the table to move your linked P4A_Data_Source
- P4A_Table::showTitleBar() method was removed because obsolete
- P4A_Table_Rows::disable() won’t disable table’s “action cols”
- A P4A_Table’s caption small rendering bug with safari was solved
- P4A_Table’s CSS was modified for a better readability
- jQuery was updated to 1.2.6
- P4A_Redirect_To_Url() global method was added, useful if you want to
redirect the user outside P4A

Download P4A 3.0.0-rc4, but before downloading, please take a minute to nominate P4A for the Sourceforge 2008 community choice awards:

New icon set survey
As you may know the default P4A’s icon set has been the “nuvola” one for ages, now for the 3.0 release we’re asking you if you continue to love the nuvola style or you wish to switch to the tango icon set (preview below, click to enlarge):

We’re waiting for your feedback!!

P4A 3.0.0-rc3 released

Thanks to your feedback we have a few improvements beside some fixes that are usual for a RC release.

Highlights of this release:

  • P4A_DB_Navigator drag&drop implemented
  • date P4A_Field now allows inputing dates by hand
  • P4A_DB_Source::setTable() now supports database views

Complete changelog:

- file upload check and error reporting was enhanced
- a bug with file download within a non-ajax environment was solved
- Zend Framework was updated to 1.5.2
- P4A_Redirect_To_File() global function now checks if the file really
exists within P4A_UPLOADS_DIR, otherwise throws a P4A_Exception
- P4A_Tab_Pane’s pages’ labels are now auto translated on getAsString()
- P4A_Field::getAsDate() does not set the field “readonly” anymore thus
now dates can you written by hand too
- jQuery was updated to 1.2.5
- jQuery::UI::datepicker javascript file was replaced with the packed one
which is only 20kb instead of 60kb
- folder_home icon was changed with a new one that degrades to GIF in a
better way
- jQuery::UI::core, draggable and droppable 1.5b4 were added
- P4A_DB_Navigator’s drag&drop movements were implemented
- P4A_DB_Table::_setupPrimaryKey() method was added, it just calls
the parent::_setupPrimaryKey() avoiding exceptions (used when the
table has no primary keys)
- P4A_DB_Source now supports database views within the setTable() method
- P4A_DB_Source::load() now does not set pk if P4A_DB_Table does not
return one or more pk(s)
- jQuery::dimensions plugin was removed because it has been bundled to
the jQuery core
- P4A_Mask’s default template now includes CSS first and then JS, solving
some jQuery related issues (on safari/opera)
- fix_date option was added to P4A_I18N::_normalize() method
- jQuery::form plugin was updated to 2.10

Before downloading please remember to nominate P4A for the SF 2008 community choice award!

Download P4A 3.0.0-rc3 :-)

P4A 3 development update and commercial license

Hello everybody,

I worked a lot on 3.0-rc3, mostly on 2 things:

  • patching the db_source so that the setTable() method could work with database views too
  • update jQuery to 1.2.5 and implement drag&drop for db_navigator again

I’ve to say that I’m quite stuck with jQuery development, there are many delays and this release introduces (at least in our usage) a lot of regressions due to the integration of the “dimensions” plugin within jQuery core. Many things doesn’t work anymore on Safari 3.1 (win), there are some weird behaviours with opera (but there were also before the latest updates) and the drag&drop has issue on all browsers (ok, jQuery UI 1.5 is in beta, but the problems I’m talking about are related to the “dimensions” plugin again).

I filled a few bug reports on jQuery’s trac, let’s see what happens but I’m in a bad mood now and I can’t release the rc3.

Commercial license update

We finally have a draft of P4A Commercial License Agreement but it should be pretty definitive…

We think we can confirm the 100 Eur + 20% VAT (total = 120 Eur) for every developer, with a year of free upgrades.

Some sample of commercial policy:

  • If 2 analysts and 3 developers work together on a commercial software based on P4A, than you should buy 3 licenses
  • If a company buys 3 licenses and after 2 years the company wants to have new commercial updates, the company will have to pay for all developers that will work again on the commercial applications. Buying only 1 license to gain the commercial package won’t be enough if the application is coded by other developers (also if they have a previous license).

Hope it’s all enough clear.
Please write me all your considerations.

UPDATE: digging on jQuery’s trac I found a post where someone told to change the inclusion order (CSS before JS), I tried and that fixed all bugs. I’ve updated the bugs I filled with this info. I think we can release the rc3, just need a few more test.