Daniele Cruciani
Programmatore Developer PHP/MySQL Freelance
mobile: +39 3489215204

icq skype msn linkedin fb t ff youtube picasa google
seconds to the end of World
End of World 21 December, 2012 11:11:00
Hire me before that day! | don't bother

Come nascondere le immagini al right click context menu del visitatore

Ho trovato questo hack in http://coollogo.net/cool_logo_70/ una buona risorsa per le social icon.

Poniamo che deve essere mostrata image.jpg, allora basta mettere una immagine trasparente in una div con background-image: url('image.jpg'), in questa maniera (mostrando linkedin.png):

Why not to use remove link

This is my experience: I have to rewrite administration page where
there is remove button (in a form) with only javascript confirm.

I thought: "no one had problem with no limitation in the past, why they
should now? I'll use a link with javascript confirm.

It happened I have a dashboard page where is listed the last entries
and links for update and delete its. It happened that few day later 20
entries was deleted and I was looking for what caused the problem for
one day.

I supposed no one would be so silly to click on delete for 20 times

Google Chrome no-cache and Login throw oauth services

I found this very annoying, it seem chrome optimization make it not works things like "login via facebook" or "login via twitter" button with this browser and make it wait forever.

I implemented oauth support for http://www.cellularmagazine.it/recensioni/inserisci.php and had a similar problem: Expires setted to access plus 10 minute (via .htaccess , this happen to set Cache-Control header too) and google do not reload the actual page but use the one in cache. I would suggest to remove Expires header or set it to past data, but I found out adding

php goodies: filter

Filter is in php by default from 5.2.0 and is a usefull library for web developer, so it is the time to make use of it.

It was created for validation and sanitization of foreign input, that is GET, POST, COOKIE, or anything that you can't trust on.


With php filter one can tests if a variable is present in the current request:

if(filter_has_var(INPUT_POST,'login')) {
  //manage login
}

wwwsqldesigner short review

Install

Download from http://code.google.com/p/wwwsqldesigner/
Very easy installation: you need a webserver running, unpack
wwwsqldesigner it in a folder, setup your virtual host (I use
personal domain for my pc), all done!

Use

There is a small tool bar to the right, very simple and intuitive to
use, it is grouped in 4 areas:

  1. Save/load
  2. Table actions (Add,Edit,Keys,Remove,Align,Clear)
  3. Field actions (Add,Edit,Up/Down,foreign key management, remove field)
  4. Option & Documentation

Wordpress Category external feed plugin

This wordpress plugin is for show custom external rss feed in category page.

For example if you want a category page list rss feed from another site category page, this is for you.

It is my first wordpress plugin (ok, maybe not exactly the very first hello world like ;)

It use simplepie because I like it. (it is included in package and license is almost compatible)

License: GPL
From an idea of: IM Evolution a SEO/SEM Company

Admin page:

Differire l'esecuzione di javascript usando i dati

Dal punto di vista delle performance si dovrebbero caricare i javascript alla fine della pagina (vedere http://developer.yahoo.com/performance/rules.html), almeno tutti i javascript di cui si può differire il caricamento. Ci sono script che devono essere caricati all'inizio della pagina... Ma siamo sicuri che non c'è altra possibilità?

Beh, in realtà questa è una autocritica su di un mio script. Nel codice di imagedata drupal example module rimpiazzo {imagedata ...} con una chiamanta alla funzione del plugin jQuery.

jQuery context menu

Ok, I admit I do not search to much out there if this is available..

A simple jquery plugin that permit to show context menu

I take inspiration from yahoo library: here is an example

But I want it as jquery plugin and also I want to have option to choose the way it should work, for example I also want to fire context menu on hold down left mouse button for 1 second, or just hover on element.

Introduzione a JavaScript - Terza parte

Una video introduzione al linguaggio javascript e le sue principali caratteristiche

In questa terza parte: gli eventi.

Introduzione a JavaScript - Seconda parte

Una video introduzione al linguaggio javascript e le sue principali caratteristiche

In questa seconda parte: oggetti, il DOM, un esempio concreto, le closure

Syndicate content