#nonmipassanulla

Così ci son ricascato.
randomalbum2014-ii


Prima era andata così:

Gli anni passati, invece:

ora in edicola, 2014

Nuovo tema, nuova entrata.

È un bel po’ che non scrivevo nulla, e quando sono a corto di idee faccio un giochetto. Questo qui: https://www.valeriovendrame.it/blog/nuevo-albume/.

album2014


Gli anni passati han prodotto:

relevanssi italian stopwords

Senza tanti preamboli, un elenco dei termini italiani di uso comune da escludere dai risultati di ricerca da poter utilizzare con il plugin per wordpress (al momento della pubblicazione 3.5.2) “relevanssi” (al momento della pubblicazione 3.1.6).

Il file .zip contiene un file .txt e un file .it_IT, quest’ultimo pronto per essere inserito nella cartella \wp-content\plugins\relevanssi\stopwords.

L’elenco è stato ottenuto unendo queste risorse:

download stopwords.zip | download stopwords.txt
Continua a leggere

wordpress php internet explorer browser detection, add body class

ie_detection_to_body aggiunge delle classi css utilizzando body_class di wordpress, adottando un approcio simile a questo snippet

/*
    ie_detection_to_body uses worpress body_class filter
    http://codex.wordpress.org/Function_Reference/body_class
    it has a similar approach of http://simplemediacode.info/?p=1006
Copyright (C) 2013 Valerio Vendrame (lelebart) http://www.valeriovendrame.it/
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/
function ie_detection_to_body( $classes ) {
    global $is_IE; $browser = $_SERVER['HTTP_USER_AGENT'];
    if ( $is_IE ) {    
        $classes[] = 'ie';    
        if ( isset( $browser ) && ( strpos( $browser , 'MSIE' ) !== false ) ) {
            preg_match('/MSIE (.*?);/', $browser, $matches);
            if ( count ( $matches ) > 1 ) {
                $classes[] = 'ie' . intval( $matches[1] );
                $classes[] = 'ie' . str_replace(".", "-", $matches[1] );
            }
        }
    }
    return $classes;
}
add_filter( 'body_class', 'ie_detection_to_body' );

pensato per un uso del tipo

.regola { /* per tutti */ }
.ie .regola { /* per internet explorer */ }
.ie.ie5.ie5-5 .regola { /* per internet explorer 5.5 */ }
.ie.ie7 .regola { /* per internet explorer 7.0 */ }

new album 2012!

Ebbene sì, sentivo la mancanza di scrivere qualche cazzatina.

Fatelo anche voi, le istruzioni: https://www.valeriovendrame.it/blog/nuevo-albume/ (e poi https://www.valeriovendrame.it/blog/anno-nuovo-album-nuovo/)