Simbiontes
Cada loco con su tema   

Blog |  Acerca de...  |  Asuntos recurrentes  | 

DirifyES: the power of dirify-plus with unicode support

Escrito por (A) El Malvado Acidonitrix , Lunes 25 de Diciembre de 2006
   0 Comentarios
Archivado en: Codeblog

DirifyES merges both dirify-unicode and dirify-plus, giving the later the ability to handle accented languages. The main problem with dirify-unicode is that features are worse than those of dirifyplus operator, other than high unicode replacement. In fact, it has just the power of the old dirify operator.

DirifyES merges both dirify-unicode and dirify-plus. The purpose for dirifyES is to solve a bug in Dirifyplus with unicode languages. Of course, dirifyunicode gives you unicode support. But the main problem with dirify-unicode is that features are worse than those of dirifyplus operator, other than high unicode replacement. In fact, it has just the power of the old dirify operator. DirifyES is aimed at archive mapping with fully human readable URLs. Continue reading.

En castellano: DirifyES: arreglando la función dirify, dirifyplus y dirify unicode para MovableType.

Download

Download DirifyES with install notes.

To install

Just extract and place dirifyes.pl at your cgi-bin/plugins directory.

Usage

Use dirifyES like dirifyplus. Example: <$MTCategoryLabel dirifyes="sld" $>/<$MTEntryTitle dirifyes="sld"$>.php

About dirifyES

So, for example, if you are building a human readable URL in spanish or swedish, you can have one like this:

Cruzada y revolución: la Guerra Civil Española
-> cruzada-y-revolucion-la-guerra-civil-espanola-un-juego.php

El inglés es sólo un idioma más
-> el-ingles-es-solo-un-idioma-mas.php

If you are using dirify plus in fact you get these URLs:
-qua-aspecto-tiene-sap.php
-el-inglas-es-salo-un-idioma-mas.php
-cruzada-y-revolucian-la-guerra-civil-espanola-un-juego.php

which are still (but quirky) human readable, but are going to be badly indexed (if indexed at all).

We prefer to make our own operator rather than changing an existing one which somebody making a plugin expects to work as always. Of course, you don't need to be a crack to make this (you don't even need to understand the code). The fix is done changing dirifyplus, removing the call to convert_high_ascii and puting dirify-plus' convert_high_unicode instead.

Call to convert_high_unicode is done changing this line:

$s = convert_high_ascii($s); ## convert high-ASCII chars to 7bit

with this other:

$s = convert_high_unicode($s); ## convert high-ASCII chars to 7bit.

So, this way, we can have this archiving map:

<$MTCategoryLabel dirifyes="sld" $>/<$MTEntryTitle dirifyes="sld"$>.php

DirifyES gets just the same parameters as dirifyplus. We have been working with it for a year without problem. Feedback will be appreciated!

Resources:



Mostrar búsqueda avanzadaActivar búsqueda avanzada

Bienvenido al repositorio de los simbiontes

Una página colectiva y ecléctica para comentar y apuntar cosas.

Estás viendo los archivos de Diciembre de 2006. Visita la portada para ver las últimas notas.

Sugerencias de lectura

Los simbiontes hablan de...

Sugerencias de lectura

Si quieres curiosear, puedes consultar:

  • todas las entradas archivadas por categoría (abstract).
  • Las entradas ordenadas mensualmente.
  • Suscribirte a los feeds (más abajo).
  • Lo que vienen buscando otras personas.
  • Si lo prefieres, puedes ver la portada en el formato anterior.
  • ...o leer la presentación para saber qué es esto y si puedes fiarte o no de lo que aquí se dice, y por qué pensamos que esto no es un blog aunque lo llamemos así para entendernos entre nosotros.

Sindicación RSS

  • ¿Qué es un feed?
  • Agregadores recomentados

Lecturas edificantes y tráfico de influencias

La tira Ecol

Tira Ecol

http://tira.escomposlinux.org
La tira ecol ha vuelto.