Categories
php tecnologia

i 20 maggiori errori da evitare in IT

error 18: IT managers who look only as far as J2EE and .Net when developing scalable Web apps are making a mistake by not taking a second look at scripting languages — particularly PHP. This scripting language has been around for a decade now, and millions of Yahoo pages are served by PHP each day

via harry fuecks

ciuaz

Categories
php tecnologia

The KnowledgeTree

che dire? stupendo!

KnowledgeTree™ is one of the most rapidly-adopted open source document management systems, with downloads currently running at several hundreds per month. It was originally developed for the South African Medical Research Council; so it has all the code quality, functionality and architectural rigour that you would expect of a top-of-the-range enterprise application. The only thing it misses is the million-dollar price tag: being Open Source, it’s licence cost free. The product includes advanced document version control, full text search capabilities, multiple search types and extensible metadata fields for documents. Some of the more advanced functionality includes a customizable dashboard and workflow for document authoring.

ciuaz

Categories
php

php e mvc

interessante articolo di John Lim sull’uso del paradigma di programmazione MVC all’interno di applicazioni PHP, molto interessanti anche i commenti dove lo stesso fuecks ammette che non tutte le applicazioni per il web possono utilizzare tale paradigma. Oltre all’articolo consiglio la lettura di un infuocato thread sul forum di sitepoint che cerca di spiegare a cosa serve MVC.

ciauz

Categories
altri linguaggi php

jpspan

Ho scovato per errore JpSpan, una classe che permette di richiamare tramite javascript uno script php senza dover ricaricare la pagina. JpSpan ha decisamente molte potenzialità, partendo dal completamento automatico delle form alla gestione dei log degli errori alla creazione di applicazioni XUL complete. Merita di darci un occhio…

JPSpan provides tools to “hook up” PHP and Javascript, for the purpose of fetching data from PHP into a web page which has already loaded, without reloading the entire page.

The objective is to make connecting a Javascript client with a PHP server as painless and error-free as possible. To this end JPSpan allows you to define a class in PHP and call it’s methods directly (and remotely) from Javascript.

aggiornamento:
ho appena scoperto che jpspan è stato scritto da quel geniaccio di harry fuecks

ciuaz

Categories
php tecnologia

wordpress: rss per commenti moderati

sulla mailing list hacker di wordpress ho scoperto un interessante hack su come far visualizzare al feed RSS i commenti moderati, in questo modo sarà più semplice controllare che ce ne siano senza dover intasare la propria casella di posta elettronica o dover andare sul pannello di amministrazione del blog.

[php]
if (is_single()) {
$comments = $wpdb->get_results(“SELECT comment_ID, comment_author, comment_author_email, comment_author_url, comment_date, comment_content, comment_post_ID, $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE comment_post_ID = ‘$id’ AND $wpdb->comments.comment_approved = ‘1’ AND $wpdb->posts.post_status = ‘publish’ AND post_date < '".date("Y-m-d H:i:59")."' ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') ); } else if (isset($_GET["view"]) && $_GET["view"] == 'moderated_comments') { $comments = $wpdb->get_results(“SELECT comment_ID, comment_author, comment_author_email, comment_author_url, comment_date, comment_content, comment_post_ID, $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->comments.comment_approved = ‘0’ AND $wpdb->posts.post_status = ‘publish’ AND post_date < '".date("Y-m-d H:i:59")."' ORDER BY comment_date LIMIT " . get_settings('posts_per_rss') ); } else { // if no post id passed in, we'll just ue the last 10 comments. $comments = $wpdb->get_results(“SELECT comment_ID, comment_author, comment_author_email, comment_author_url, comment_date, comment_content, comment_post_ID, $wpdb->posts.ID, $wpdb->posts.post_password FROM $wpdb->comments LEFT JOIN $wpdb->posts ON comment_post_id = id WHERE $wpdb->posts.post_status = ‘publish’ AND $wpdb->comments.comment_approved = ‘1’ AND post_date < '".date("Y-m-d H:i:s")."' ORDER BY comment_date DESC LIMIT " . get_settings('posts_per_rss') ); } [/php]

Find the SQL queries in wp-commentsrss2.php and replace with this code.
Then subscribe to:
http://www.example./com/wp-commentsrss2.php?view=moderated_comments
This is from a recent nightly build, it will be slightly different in 1.2.1 or previous versions.

Cheers,
–Alex
http://www.alexking.org/

ciuaz

Categories
php

wordpress fickr gallery

This plugin allows you to display your Flickr photos and photosets on your site like a photo gallery using Flickr’s API. Some of the salient features include:

* Flickr photosets as “albums” – complete with descriptions and meta
* Support for Flickr “notes” feature (looks kind of like this)
* EXIF data support to display camera settings the photo was snapped with — in addition to the description and meta info from Flickr
* Valid XHTML output

An example installation can be found here.

ciauz

Categories
php tecnologia

php|architect novembre

è uscito il numero di novembre di php|architect, in questo numero:

PHP 5 & XML
When most people talk about PHP 5, they tend to concentrate on the many improvements in the way it works with objects, which is certainly a significant component of the new release. This often leaves equally important improvements, such as the changes made to the way PHP works with XML, neglected. This article’s goal is to familiarize you with how XML is handled by PHP 5 and how these changes make working with XML much easier. Join PHP developer and author Ilia Alshanetsky for the ultimate tour of all that is PHP 5 & XML!

PHP – XML Generator
Developing a UI that manipulates large data sets is difficult. Developing a UI dynamically upon user request is even more difficult. In this article, Man-ping Grace Chau aims to discuss the difficulties in developing a complex UI, demonstrated by the XML/XSL generator made in the Infospheres Lab at the California Institute of Technology. Examples of how to generate JavaScript dynamically at run time and how to represent a complex DOM tree with simple HTML data structure will also be shown. Furthermore, the article will discuss the optimization of input validation. Several error checking/correction algorithms will be demonstrated. This application is developed in PHP5, with extensive use of the new XML library.

Confronting the Object-Oriented vs. Relational “Impedance Mismatch” – Part II: Managing Distractions
To many object-oriented developers, there is a sense that the relational model for data management is at odds with the concepts of object-oriented development. Are these views justified? Are they practical? In part II of this two-part series, author Rick Morris builds a simple example of an object-oriented application that derives business logic from the database without object/relational mapping.

Hiding Your Sins – Practical Caching for the PHP Developer
After code acceleration (also called opcode cache), caching is one the easiest ways to make an existing website faster by saving the result of a time-consuming operation in a temporary storage medium from which it can be retrieved until a particular event takes place. Allen Smithee illustrates a practical caching approach that requires no external dependencies.

Secure Your System with a Port Security Guard
Intrusion prevention and detection are two essential components of a successful security strategy. In this article, Ron Goff discusses the creation of a “port guard”–a PHP-based system designed exclusively to detect and act upon malicious activity on your server’s Internet connection.

ciauz

Categories
php tecnologia

wp-mail hack

john blade ha realizzato un piccolo hack per wordpress che permette di pubblicare direttamente post contenenti immagini e file inviati via email (prima era possibile pubblicare solo email testuali).

ciuaz

Categories
php

nameko

nameko è un webmailer scritto in php, l’unica cosa che lo differenzia dagli altri webmailer è che l’installazione è mostruosamente semplice, infatti nameko ha solo un file!

ciuaz

Categories
php tecnologia

wordpress FOAF plugin

nonostante sia da un pò che non sento più parlare di FOAF nella blogsfera ho trovato qualcuno a cui interessa ancora l’argomento e che ha creato addirittura un plugin per wordpress che genera un file FOAF per ogni autore di un blog, includendo in questo anche i recenti post e sfruttanto la gestione di wordpress dei link per gli amici.

ciuaz