Piero V.

Plugin Tag (v1.1) [Flatpress]

See below for English.

Italiano

Ho aggiornato il Plugin Tag.

Ci sono pochi miglioramenti e solo dal punto di vista “grafico”, perciò per più informazioni vi rimando alla vecchia pagina.

Ho sistemato la compatibilità con i plugin che vengono subito come readmore o autoreadmore.

È stato aggiunto l’hook tag_link (che vuole un parametro e cioè il nome del tag) e il supporto per visualizzare l’elenco dei tag sul proprio template che si usa così:

{if $tags}Tag: {$tags|@tagplugin_list}{/if}

Il modificatore tagplugin_list accetta due parametri:

  1. glue (opzionale, se non presente “, “): cosa deve unire i tag
  2. default (opzionale, se non presente “No Tags”): cosa deve apparire in assenza di Tag

Lingue: en-us, it-it.

Licenza: GNU GPL v2.

Download: [iurl:relative:fp-content/attachs/tag_v1.1.tar.gz title=”Tarball della versione 1.1”]Plugin Tag v1.1.

English

I’ve updated the Tag Plugin.

There aren’t so much changes so for more information, read the old page.

I’ve fixed the compatibility with some plugins like readmore o autoreadmore.

tag_link hook has been added (it wants one parameter, the tag name) and now you can list the tags of the entry in your template. This is the code to do it:

{if $tags}Tag: {$tags|@tagplugin_list}{/if}

tagplugin_list accepts two parameters:

  1. glue (optional, default: “, “): what joins the tags
  2. default (optional, default: “No tags): what is seen if there aren’t tag.

Languages: en-us, it-it.

License: GNU GPL v2.

Download: [iurl:relative:fp-content/attachs/tag_v1.1.tar.gz title=”Tarball of version 1.1”]Tag Plugin v1.1.

Plugin Tabmenu (v1.5) [Flatpress]

Italiano

Ho scritto un plugin che permette di fare dei menu in cui la pagina dove ci si trova rimane selezionata.

Infatti esso aggiunge la classe sel se ci si trova in quella pagina (l’equivalente HTML di class=”sel”).

Questo è un esempio di uso (per l’homepage):

<li {{TABCLASS:index}}><a href="/" title="Homepage>Homepage</a></li>

Al posto di index potete mettere:

  • index per l’homepage
  • contact per la pagina contact.php
  • post:entry_id oppure entry:entry_id con al posto di entry_id l’identificatore di flatpress per il post
  • static:static_id con al posto di static_id l’identificatore di Flatpress per la pagina statica (quello che decidete voi)

Rispetto alla versione 1.0 ho corretto un piccolo bug con l’index.

Licenza: GNU GPL 2.0.

Download: tabmenu_v1.5.tar.gz

English

I’ve written a plugin that allows to make menus where page where you are, it’s selected.

It adds “sel” class if you are in that page (in HTML, class=”sel”).

This is an example (for the homepage):

<li {{TABCLASS:index}}><a href="/" title="Homepage>Homepage</a></li>

Replace index with:

  • index for the homepage
  • contact for contact.php
  • post:entry_id or entry:entry_id for entries (with entry_id the ID of the entry)
  • static:static_id for static pages (with static_id a static page id)

License: GNU GPL 2.0.

Download: tabmenu_v1.5.tar.gz

Plugin Tag (v1.0) [Flatpress]

Italiano

(See below for English)

Ho scritto un plugin che implementa i tag su flatpress.

Li implementa tramtite bbcode con [tag]i miei, tag, separati, da virgola[/tag].

Questo plugin in più aggiunge di default la lista dei tag alla fine del post ma questa funzione può essere disattivata (penso però sia possibile anche fare con $tags in smarty, ma non l’ho provato).

In più rende disponibile un widget con la tagcloud e si integra perfettamente (dopo un sacco di codice fatto a posta) con PrettyURLs.

Essendo un plugin complicato non ne garantisco il corretto funzionamento.

Lingue: en-us, it-it.

Licenza: GNU GPL v2.

Download: [iurl:relative:fp-content/attachs/tag_v1.0.tar.gz title=”Tarball della versione 1.0”]Tag v1.0.

English

I’ve written a plugin that implements tags on flatpress.

It uses BBCode: [tag]my tags, comma, separated[/tag].

This plugin adds by default the tag list in the bottom of every entry but you can disable this (I think you should use $tags on Smarty but I haven’t tested, yet).

The plugin makes available a widget with tag cloud and it’s compatible with PrettyURLs (with a lot of ad-hoc code for the integration).

As it is a complicated plugin, I don’t ensure the proper functioning.

Languages: en-us, it-it.

License: GNU GPL v2.

Download: [iurl:relative:fp-content/attachs/tag_v1.0.tar.gz title=”Version 1.0, gzipped tarball”]Tag v1.0.

Flatpress: Next/Prev Page link and PrettyURLs

Italiano

(See below for English)

Come ho già detto in qualche post fa, sto facendo un plugin per implementare i tag su flatpress.

Dopo alcuni giorni di lavoro, pensando di averlo finito, mi accorgo di un bug: dalla seconda pagina non funziona più il filtro dei tag (e me ne sono accorto per puro caso!!)

La colpa è di Pretty URLs, che gestisce gli url delle pagine ricreandoli dall’inizio.

Le soluzioni sono quattro:

  1. Fare un plugin che non supporta PrettyURLs
  2. Fare un plugin che usi delle estensioni PECL
  3. Fare un plugin solo per PHP 4 (e io uso PHP5 😊 )
  4. Fare una classe sostitutiva a pretty urls

L’unica che mi pare accettabile è la quarta, ed ecco il codice (testato, sembra funzionare):

## Replacement Class for PrettyURLs Plugin
if(class_exists('Plugin_PrettyURLs')) {
	class class_name {
		function class_name(&$original) { # Constructor
			$this->original=&$original;
			$this->baseurl=&$original->baseurl;
		}
		function permalink($str, $id) {
			return $this->original->permalink($str, $id);
		}
		function commentlink($str, $id) {
			return $this->original->commentlink($str, $id);
		}
		function feedlink($str, $type) {
			return $this->original->feedlink($str, $type);
		}
		function commentsfeedlink($str, $type, $id) {
			return $this->original->commentsfeedlink($str, $type, $id);
		}
		function staticlink($str, $id) {
			return $this->original->staticlink($str, $id);
		}
		function categorylink($str, $catid) {
			return $this->original->categorylink($str, $catid);
		}
		function yearlink($str, $y) {
			return $this->original->yearlink($str, $y);
		}
		function monthlink($str, $y, $m) {
			return $this->original->monthlink($str, $y, $m);
		}
		function daylink($str, $y, $m, $d) {
			return $this->original->daylink($str, $y, $m, $d);
		}
		function nextprevlink($nextprev, $v) {
			if(!empty($fp_params['myparam'])) {
				## My code here
			} else
				return $this->original->nextprevlink($nextprev, $v);
		}
	}
}

Si fa il backup di $plugin_prettyurls, quindi si dà a $plugin_prettyurls questa classe: … [Leggi il resto]

Plugin Autoreadmore (v1.5) [Flatpress]

Italiano

Questo è un plugin per flatpress che serve per fare in modo che automaticamente, quando un testo è lungo, venga tagliato e aggiunto un Leggi il resto nell’anteprima.

È una modifica del plugin readmore originale di flatpress di NoWhereMan fatta da me per l’integrazione con flatpress usando la funzione cutHtmlText di Abidibo.

L’unica modifica dalla [iurl:post:entry100619-133625 title=”Autoreadmore v1.1”]versione 1.1 è che il testo viene tagliato dopo, così non taglia es BBCode.

Lingue: en-us, it-it.

Licenza: GNU GPL v2.

Download: [iurl:relative:fp-content/attachs/autoreadmore_v1.5.tar.gz title=”Tarball della versione 1.5”]Autoreadmore V1.5.

English

This flatpress plugin automatically chop a long entry and adds “Readmore” to the preview.

It’s a modification of the original Read More plugin by NoWhereMan using cutHtmlText by Abidibo.

The only change from [iurl:post:entry100619-133625 title=”Autoreadmore v1.1 (IT only)”]version 1.1 is that entry is cut after other plugins (such as BBCode).

Languages: en-us, it-it.

License: GNU GPL v2.

Download: [iurl:relative:fp-content/attachs/autoreadmore_v1.5.tar.gz title=”Tarball of version 1.5”]Autoreadmore V1.5.