PTL plugin
(English readers skip to english very bad translation, this page, only few lines bottom)
Post Terms List Plugin
Analizza il testo del post e stampa i termini più frequenti.
Funziona anche in Wordpress 2.5.
- Sorgente: versione 0.2;
- Installazione: metti il file .php nella directory wp-content/plugins, attiva il plugin;
- Uso: aggiungi all’interno del The Loop o dove ti serve nei file del template:
<?php
if (function_exists(post_term_list)) {
echo “Termini del post: <br />”;
post_term_list($post->ID);
} ?> - Personalizzazione: 1- cambiare le stop words: modifica l’array $overusedwords; 2- cambiare il numero di termini mostrati: nella funzione the_terms modifica il parametro 20 nella riga $terms = get_post_terms( $content['post_content'], $content['post_title'], $options['utf8'] == ‘true’, $options['bias_title'], 20);
Nota: questo plugin è un furto, il codice usato è stato preso da http://rmarsh.com/plugins/similar-posts/ e modificato per i miei scopi.
Post Terms List PluginOutputs the most frequent terms of a post.
Works up to Wordpress 2.5.
- Source: version 0.2;
- Install: upload the .php file to wp-content/plugins directory and activate the plugin;
- Usage: add into The Loop or where you need in the template files:
<?php
if (function_exists(post_term_list)) {
echo “Post terms: <br />”;
post_term_list($post->ID);
} ?> - Customization: 1- change stop words: change $overusedwords array (if you write in english be sure to delete the italian stop words); 2- change number of term: in the function the_terms alter the parameter 20, this is the line $terms = get_post_terms( $content['post_content'], $content['post_title'], $options['utf8'] == ‘true’, $options['bias_title'], 20);
Note: this plugin is heavily based on http://rmarsh.com/plugins/similar-posts/ from which is a stripped down version for my personal purposes.
