2007-12-02

papaya 5 RC1

papaya 5 RC1 package had just got uploaded to the webserver. A beta of the German manual can be found here. The RC1 still uses FCKEditor by default. You can activate TinyMCE in the conf.inc.php:
define('PAPAYA_USE_RICHTEXT_EDITOR', 'tinymce');

2007-11-27

New Backend: Overview page, toolbars and new icons

You may have noticed that the screenshots in the blog posts show a new papaya CMS backend. The old look was a little dark and cramped. We decided to group the buttons of the main menu to add a little context.

The applications menubar is now one of these groups. Each user can add up to 5 individual application links to the button group (The limit is an option). The last button shows all applications and allows to add/remove buttons from the button group.


The overview page shows tasks, messages and page informations for the current user. The amount of items in each list are user options.

The icons in the new interface are based on the Tango Icon Theme. Some are copied, some are new, some are modified (got emblems). The flags are the FamFamFam Flag Icons created by Mark James. He created another great set of icons, too. But Silk has only 16x16 bitmaps. For papaya we need larger sizes, too. So we had to create our own. But you will recognice some of them if you know Silk.

We hope you will like it.

2007-11-15

Searchable Listboxes

The backend got searchable selects. It's pure javascript - you will not see any hint of it without it.


The javascript adds a little input field just before the select box. You input a text and the select will only show items that matches your input. All larger selects (with optgroups) got the new feature.

2007-11-14

papaya CMS in the iX 12/07

The cover topic of the december issue of the iX (a german computer magazine) are content managment systems. They tested 5 PHP bases CMS including papaya CMS 4. The text about papaya CMS is really positive. :-)

2007-11-13

IPC 2007 Slides

I published the slides of my talks at the International PHP conference on Google Docs: The source for the PDF talk still needs some clean up and packaging. I will publish it the next days.

2007-10-23

Browser Compatibility 3 - Lynx

We already had support for the most major browsers, but one was still missing: Lynx.


Cool, isn't it?

2007-10-12

Browser Compatibility 2

Have a look at papaya CMS 5 in Opera 9.


Of course IE7 is supported, too:

2007-10-11

Browser Compatibility

The Screenshots here in the blog show the new papaya CMS 5 Backend in Firefox 2. But it works in other Browsers, too.

Some users may still have IE 6. He does not support all of the eye candy stuff but it works:


Of course we do not look backwards only. Here is Safari 3 on Windows:

2007-10-10

Several Websites with one installation

We just implemented a new feature into papaya CMS 5. It has now a domain handling. Just direct several domains to one papaya CMS installation. You can now set up how each domain is handled in the papaya Backend. Wildcards for subdomains are possible.


Here are the 5 options.

"default" - The domain handling does nothing, default options are used
"domain" - Redirects to the requested page on another domain
"page" - Redirects to a specified page on another domain
"language" - Redirects to a language if the main page is called without a language (e.g. / or /index.html to index.de.html)
"tree" - Limits the domain to a subtree of the pages

The last option "tree" allows you to have several websites with one papaya CMS installation. They will share the users and other data but are limited to one part of the pages.

2007-10-05

Uploaded file is to large

PHP has a setting in the php.ini named upload_max_filesize. If your uploaded file is larger, you will get an error code in the $_FILES array. But here is another limit. If post_max_size is to small for the uploaded data, you will get emtpy $_FILES and $_POST arrays. So how to output an error message for the user? I found $_SERVER['CONTENT_LENGTH']. It contains the byte length of the content.
...
if (isset($_SERVER['CONTENT_LENGTH']) &&
   $_SERVER['CONTENT_LENGTH'] >
     $this->iniGetSize('post_max_size')) {
 $this->addMsg(MSG_ERROR,
   $this->_gt('Uploaded data is to large.'));
}
...
Does anybody know a better solution or problems with that one?

2007-09-28

Upload Files

Finally we got an upload progress bar in the new media database using the uploadprogress extension. Looks nice, doesn't it?

The Javascript extends the used form with an onsubmit event to track the progress. So the upload still works without JS.

2007-09-03

Database debugging in Firebug

After I got the php errors in Firebug I still had some ugly debug outputs in my pages - the database errors and explains. Some lines later I got new data in Firebug.


Thanks Firebug - Web Development Evolved!

2007-08-31

PHP errors and debugs in Firebug

Do you know Firebug? It is perfect for debugging webpages. I got the idea to use it for my php error and debug outputs as well. The error handler / debug functions in papaya CMS can now use the Firebug console.log() function.


Nice detail: It works in other browsers using Firebug Lite.

Formatting a select


The list of page and box modules grows and grows. Now we added some style to keep it usable. This is pure html+css, without any javascript. It uses the optgroup tag.

If the list grows to large, we have to rethink the form concept.

2007-08-27

TinyMCE TabJump Extension

Here's is a nice plugin for TinyMCE called TabJump. It allows you to leave a TinyMCE editor area using the tab key (like other edit fields). In the first version by Jan Lenhardt you had to define the id of the next html element in the TinyMCE configuration. I added some code to detect the next element and sent it to Jan. Now it is a Google Code project. :-)

2007-08-14

FrOSCon Talk

I will talk about generating PDF with XSLT and FPDF on the FrOSCon in Sankt Augustin next week. It is the first talk of the day in the PHP Room.

2007-08-09

Problem with libxslt

If you use the current PHP 5.2 with libxslt, libxml will add CDATA sections to your XHTML script tags. The W3C suggests the use of a CDATA section (less escaping for special chars needed), but the most browsers will not support this. Firefox supports it, if you send the mimetype application/xhtml+xml. To avoid the problem make your script section a html comment. Here a sample:
<xsl:template match="script">
<script type="{@type}"><xsl:comment>
  <xsl:copy-of select="text()"/>
//</xsl:comment></script>
</xsl:template>
This is a generic match for all script elements in the xml tree. But will take care of xslt generated script elements, too.
<script type="text/javascript"><xsl:comment>
myLittleJSCall();
//</xsl:comment></script>
Here is a bug reported for libxml. But it is closed. :-(

2007-08-08

papaya CMS on Lighttpd

Our current development system is Apache httpd. But it can run on Lighttpd, too. First you need to activate the mod_rewrite and define a set of rewrite rules in the configuration file.
url.rewrite-once = (
# admin pages
"^/?(?:sid[a-z]*(?:[a-zA-Z0-9,-]{32}|[a-zA-Z0-9,-]{40})/)?papaya/module\_([a-z\_]+)\.[a-z]{3,4}(?:\?(.+))?$" => "/papaya/module.php?p_module=$1&$2",
# pages
"^/?(?:sid[a-z]*(?:[a-zA-Z0-9,-]{32}|[a-zA-Z0-9,-]{40})/)?[a-zA-Z0-9_-]+(?:(?:\.[0-9]+)?\.[0-9]+)(?:(?:\.[a-z]{2,5})?\.[a-z]+)(?:(?:\.[0-9]+)?.preview)?(\?.+)?$" => "/index.php$1",
# index page
"^/?(?:sid[a-z]*(?:[a-zA-Z0-9,-]{32}|[a-zA-Z0-9,-]{40})/)?index(?:(?:\.[a-z]{2,5})?\.[a-z]+)(?:(?:\.[0-9]+)?.preview)?(\?.+)?$" => "/index.php$1",
# media files
"^/?(?:sid[a-z]*(?:[a-zA-Z0-9,-]{32}|[a-zA-Z0-9,-]{40})/)?[a-zA-Z0-9_-]+\.(?:media|thumb|download|popup|image)(?:\.(preview))?(?:(?:\.(?:[a-zA-Z0-9_]+))?(?:\.[a-zA-Z0-9_]+))(\?.+)?$" => "/index.php$1",
# sid only
"^/?(?:sid[a-z]*(?:[a-zA-Z0-9,-]{32}|[a-zA-Z0-9,-]{40}))(/.*)(\?.+)?$" => "$1$2"
)
Next you need to define the 404 handler for alias handling:
server.error-handler-404   = "/index.php"
The last step is a little bugfix in ~/papaya/inc.conf.php. Lighttpd sets $_SERVER['PATH_TRANSLATED'], but it is empty. So this check needs a little patch:
if (isset($_SERVER['PATH_TRANSLATED']) && $_SERVER['PATH_TRANSLATED'] != '') {
This way papaya CMS will use $_SERVER['SCRIPT_FILENAME']. We fixed this in the development version already. It will be included in the next public version.

2007-08-06

Last PHPUG Meeting

At the last PHPUG Meeting I talked about file delivery with PHP-Scripts. Here are the slides: PDF

2007-08-02

Optimizing Backend

We are currently optimizing the backend performance. With Firebug we could get all requests for a page and optimize the caching.

First a result with an empty browser cache. It loads about 60 files and takes some time. Because some of the images are module files and can be outside the document root, they need to be send using a php script.

A second click on the same button shows a nice result. Most of the files, including the module images, are cached. Only 13 requests for the page now.

We are still trying to improve that result. But I think it is a good start.

2007-07-31

International PHP Conference

At the International PHP Conference in Frankfurt (Main), Germany I will talk about generating PDF with XSLT and FPDF.

It is not a talk about papaya CMS but the concept and source code of the PDF Output Filter.

Views in papaya CMS

Unlike other cms a view in papaya CMS is not just a template. It is the full configuration for the output.

You create several output filters like html, rss, pdf or print. Each of them can use a different filter module like the xslt filter module or the pdf filter module. The name of the output filter is later used as an extension in the filename of the page urls.

After you defined all the output filters for your project you create a view for a page or box module and link them to the output filters. Each of the links can hold a configuration depending on the selected filter module. For the two existing module you can select a xsl file (the template) and a switch for fullpage mode.

The setting of the fullpage switch is given to the page module, so it can split large content into several outputs in one mode (html) and return a single output in another mode (pdf, print). This needs to be implemented in the page module or it will have no effect at all.

Take a look at the following little graphic:


Editing a page or a box you only need the select a view, because the views knows of its page/box module.

2007-07-30

nrw.summit 07 and FrOSCon 07


I will have a session at the nrw.summit 07 about the PHP Baysian Spamfilter integrated into papaya CMS.

The FrOSCon is at the same weekend. The program of the PHP Room is great. Maybe I will see you there?

Hello World

Hi world, this is my second try to write a blog. Maybe I can keep it up to date this time. It is related to my job - I am the technical director of the papaya CMS.
x