Lexi – Plugin para Wordpress

Lexi es un plugin que permite sindicar noticias por RSS en una página de Wordpress. ¿Y para qué otro lector RSS si ya hay tantos? Para entender la justificación les contaré mi historia. Mi página visualiza la información de 4 fuentes de datos externas en la barra lateral. Las primeras versiones de la página implementaban los mecanismos de RSS disponibles en WP, por lo tanto su comportamiento era secuencial, es decir que al llegar a uno de estos puntos el sistema se detenía a esperar hasta que llegaran los datos desde el RSS para continuar con el proceso. Mientras no se presentaran problemas al leer los feeds la página se visualizaba sin contratiempos, pero cuando llegaba la hora de renovar el caché de los feeds el tiempo de espera se hacía aveces tan largo que llegaba a ser molesto, y si por casualidad se presentaba algún problema con un feed se truncaba el proceso y la págiba quedaba inconclusa. Al desarrollar el plugin para iRateMyDay implementé una solución con Ajax para que los datos fueran leídos una vez la página ya estuviera cargada en el browser, para así no sufrir del bloqueo molesto cada que se actualizan los datos desde iRateMyDay. Pues bien, apliqué ese mismo enfoque para Lexi y ahora la página no se detiene esperando a cargar los RSS.

Inicialmente Lexi era un widget para la barra lateral que ofrecía un mecanismo de configuración para definir los RSS, el título, el número de items a publicar, si se debía almacenará la información en caché y si se requiere o no publicar el contenido de las noticias. Una vez instalado solo era necesario agregar el widget a la barra y editar la lista de RSS con los mecanismos que el plugin ofrecía. Esta funcionalidad fue el principio de Lexi, y sigue siendo su característica más representativa. En la etiqueta ‘Referencias’ de la barra lateral de esta página se puede ver el widget activo.

Pero desde la versión 0.7 se aumentó la funcionalidad del plugin para permitir también la visualización de feeds en páginas o posts sin necesidad de declarar el RSS en el menu de configuración, dejando la lista de Lexi dedicada exclusivamente al manejo del widget

Para agregar un RSS se usará la siguiente etiqueta [lexi: configuration, rss, title, max_items]. La variable RSS identifica el link del feed, max_items declara el número máximo de elementos a publicar, title indica si se usará un título específico en vez del título específico de la fuente. El número de configuración se calcula de la siguiente forma:

  • Agregar 1 para almacenar en el caché.
  • Agregar 2 para mostrar contenido.
  • Agregar 4 mostrar el encabezado del título (este también es el enlace al canal).
  • Agregar 8 si desea que se abran los enlaces en una nueva página.
  • Agregar 16 si desea que no se muestre el ícono RSS (este también es el enlace a la fuente).
  • Agregar 32 si se desea mostrar el nombre del autor.
  • Agregar 64 si se desea mostrar la fecha.

Como ejemplo a continuación se publica el RSS de Calvin & Hobbes disponible en FeedBurner:

RSSCargando Fuente...

Para lograrlo he usado la siguiente etiqueta (sin espacios)

[lexi: 13, http://feeds2.feedburner.com/uclick/calvinandhobbes?format=xml, 5]

La etiqueta indica que se deben mostrar máximo 5 items, pero como el feed solo ofrece 3 entonces la lista se trunca cuando no hay más items por mostrar.

Estos mismos resultados se pueden obtener con la función lexiRSS(configuration, rss, title, max_items) al emplearse en los templates.

El plugin activa un botón en el editor de texto para facilitar la declaración de esta etiqueta.

¿Por qué existe la posibilidad de guardar en Caché un RSS? Muchas páginas bloquean los dominios que hacen muchas consultas, como una manera de prevenir un posible ataque. Si los feeds se actualizan con poca frecuencia es mejor almacenar los feeds en caché para evitar que una de estas páginas confunda las consultas con un ataque y para que el proceso de carga de los feeds se haga más rápido. Pero si los feeds se actualizan frecuentemente, se puede hacer unas pruebas sin caché para ver que tal va.

Importante: desde la versión 0.5.1 este plugin requiere la instalación de minimax para que funcionen los complementos Ajax.

El plugin está bajo licencia GPL para que lo usen, abusen y descuarticen, solo recuerden dar los créditos del caso.

Ir a la página de descarga.

Características

  • Lector de RSS por AJAX.
  • Lexi está disponible en el servidor SVN de Wordpress.
  • Importante: se debe instalar minimax 0.2 para que funcionen los complementos Ajax
  • Botón para agregar elementos en lista a la página.
  • Botón para agregar elementos que no están en lista a la página.
  • Genera código XHTML válido
  • Mecanismo de administración integrado a Wordpress 2.7
  • Solución parcial de problemas de codificación (Español)
  • Esquema de menús ajustado a políticas de WordPress
  • Empla librería CURL por defecto, si no entonces emplea fopen
  • Permite almacenar en caché los datos del RSS.
  • Permite visualizar el contenido de cada item de RSS.
  • Permite indicar el número de items que visualizará por cada feed.
  • Traducido al Ruso por Fatcow (traducción disponible en la siguiente versión).

Plugins similares

  • firstRSS permite agregar feeds de un RSS en una página.
  • Agrr permite agregar feeds de un RSS en una página. Habilitado para emplearse como Widget.

70 comentarios para “Lexi – Plugin para Wordpress”

  1. [...] todos optimizan la plataforma, y otros sirven para el theme que elijamos, por ejemplo el plugin Lexi, una especie de consiguración general del blog, para definir los RSS, el título, la cantidad de [...]

  2. [...] Télécharger Page du plugin [...]

  3. jockoe dice:

    Is any support offered for this plugin?

    • sebaxtian dice:

      Hello jockoe.

      Tell me what you need. I’m currently developing the next release, and any feedback would be wellcome.

    • jockoe dice:

      Hello sebaxtion,

      What is happening is that instead of the feed being displayed, I only get the words “Loading Feed”. (but the feed never appears) You can see what I am talking about at my site at this URL… http://www.tracyandcarol.com/the_tracy_times/sports/detroit-lions/

      I also get it on this site, but only when I use the “Google Translate” function to display this site in English. When I view this site without translating I can see the “Calvin and Hobbes” feed and the “IRate” feed, but when I translate it I only see “Loading Feed”.

      Lexi once worked on my site and it was perfect for my needs. My database got corrupted many months ago. I restored my backup copy, but I’ve not been able to get Lexi to work since.

    • jockoe dice:

      correction… “Lexi EVEN worked…”

    • sebaxtian dice:

      Hello jockoe. Thanks for answer.

      First part, some browsers has a security restriction with Ajax. A page can create a sincronous link ‘only’ to a URL in the same Domain the page is. In your site, Lexi is asking to ‘tracyandcarol.com’ but your site is in ‘www.tracyandcarol.com’. Check out this situation inside your wordpress General Configuration.

      Second part, I create Lexi to read RSS feeds ‘after’ the site has been rendered by Wordpress, because some slow feeds takes a year to be read, that’s why it uses Ajax (Javascript). A translator let the javascript code as the original one, so it behaves the same. If the word to translate is in the HTML code when the page was rendered, the translator will translate it, but Lexi takes the feeds from another page, and the feeds words aren’t in the HTML code when the page was rendered.

      Hope it will help.

    • jockoe dice:

      Hi Sebaxtian,

      Thank you. Removing the “www” inside my wordpress General Configuration did the trick.

  4. Juanma dice:

    Hola Sebaxtian.

    Estoy intentando modificar lexi para que al utilizar la función lexi() muestre los feeds ordenados según la fecha de actualización. ¿Me echarías una mano?

    Saludos

  5. ricland dice:

    Loading Feed…mx_lexi782327739 = new minimax(‘http://booglenews.com/wp-content/plugins/lexi/content.php’, ‘lexi782327739′); mx_lexi782327739.post(‘url=http%3A%2F%2Fwww.averagebro.com%2Ffeeds%2Fposts%2Fdefault%3Falt%3Drss&title=Avg B&num=3&sc=1&cache=1′); Loading..

    lexi installed
    minimax installed
    simplepie installed

    • sebaxtian dice:

      Hello Ricland.

      As I can see in the HTML code from booglenews.com, your site cuts the ’script tags’ in some parts. Minimax is a javascript function and it needs to be surrounded by ’script tags’.

      Maybe I can fix this situation looking at the way you create the grid of feeds. Is this a plugin or a theme?

  6. jockoe dice:

    Hi sebaxtian,

    I’ve run into one more issue. I’m trying to add the feed from http://www.freep.com/apps/pbcs.dll/section?category=rss14&mime=xml. When I click on the link (when it is displayed on my page) it just refreshes my page. Do you know why this happens? (The link is “Freep” at http://www.tracyandcarol.com/the_tracy_times/sports/detroit-lions/lion-feeds/)

  7. Nacho dice:

    Hola Sebaxtian,

    Sábes si es posible controlar el ancho y alto de lás imágenes que aparecen al leer y mostar el rss de algún site?

    Gracias por tu trabajo!!

    • sebaxtian dice:

      Hola Nacho, gracias por usar Lexi.

      La única solución que veo para ese interrogante sería crear algo en el CSS del tema para que todas las imágenes que estén dentro del ‘div’ de Lexi modifique su tamaño específico. Habría que modificar el código del plugin para que los divs usaran una clase CSS común. Si puedes darme una mano con esa regla CSS te lo agradecería porque no soy muy conocedor del tema.

  8. jockoe dice:

    I would like to use quotes in the name of one of my feeds like this –> Tom “Killer” Kowalski …but it shows up like this –> Tom \”Killer\” Kowalski. How do I get rid of these slashes?

  9. jockoe dice:

    Hi sebaxtian,

    Do you take “feature requests”? If you do… My requestt is to be able to put the feeds into categories. That way a category could be added to a page instead of having to list each individual feed.

  10. [...] plataforma y otros serán útil para agregar más opciones a nuestros themes, por ejemplo el plugin Lexi, un widget para la barra lateral que ofrece un mecanismo de configuración para definir los RSS, el [...]

  11. jockoe dice:

    Hi sebaxtian,

    When I upgrade to version 0.7.95 I get the following error…

    Warning: ./cache/7a0c9151b09dc1850a620f67cfef9300.spc is not writeable in /var/www/the_tracy_times/wp-includes/class-simplepie.php on line 1773

    Everything works fine when I revert back to the previous version. I will leave the errors up on my site for you to see. They’re on the page at http://www.tracyandcarol.com/the_tracy_times/sports/detroit-lions/lions-feeds/.

    Thanks

    • sebaxtian dice:

      Allow write permisions in the directory ‘wp-content/plugins/lexi/cache’. Some host services do it automatically, others don’t.

  12. john dice:

    this seems like a nifty little plugin. however, i can not seem to get it to work. I just get the endless spinning ajax wheel and the feed(s) never load. checked my permissions on the cash file/folder. tried to re-install both plugins again. no loading. using short code. any suggestions?

  13. john dice:

    i don’t have anything live with the plugin right now cause of the error. i’ll post something in a new category so it wont be live. the domain is the same in general options. i did notice this javascript error. don’t know if this is helpful

    Error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText]” nsresult: “0×80040111 (NS_ERROR_NOT_AVAILABLE)” location: “JS frame :: http://radionx.com/wp-includes/js/tw-sack.js?ver=1.6.1 :: anonymous :: line 1″ data: no]

  14. john dice:

    i’ve tried it in my main browser firefox 351 os x. also on safari and opera. It works in your page in those browsers. I was able to troubleshoot the javascript error. traced it to referrer detector plugin while I was seeing if another plugin was causing the issue with lexi. thanks for your help. page coming in a bit.

    john

  15. john dice:

    i am really thankful for the time you are/have taken to try and figure this out. per your not on the test page…

    here’s the url. i’ve tried it with 3 different url’s

    http://www.radioink.com/sectionalRSS.aspx?id=24698

    it is indeed an active feed.

  16. john dice:

    the code looks like this, of course, with the brackets…

    lexi:13,http://www.radioink.com/sectionalRSS.aspx?id=24698,5

  17. john dice:

    put in a couple of more links. still no go

  18. john dice:

    i’ve gone through all the plugins and it appears its not a plugin conflict. one new thing. I’ve also just moved to a new host and thought I’d give lexi one more go. I’m now throwing this error.

    Warning: file_get_contents(http:) [function.file-get-contents]: failed to open stream: No such file or directory in /nfs/c05/xxx/xxx/xxxxx/domains/radionx.com/html/wp-includes/class-simplepie.php on line 7790

  19. ElChAcAl dice:

    Hola aqui dejo un aporte de un plugin nuevo que encontre para fidelizar los lectores de feedburner aqui les dejo la url http://wordpress.org/extend/plugins/wp-emailfeedburnerpop/

  20. Martin dice:

    Thank you for the great work. I wonder if you could help. I have the Lexi plugin installed and since installing the e-commerce plugin I am getting the following error on the front page where I have the RSS feed displayed.

    Warning: session_start() [function.session-start]: Cannot send session cache limiter – headers already sent (output started at /home/martin/www/GEME/wp-content/plugins/lexi/content.php:4) in /home/martin/www/GEME/wp-content/plugins/wp-e-commerce/merchants/paypal_certified.php on line 740

    • sebaxtian dice:

      Thanks Martin, and sorry if i’m late to answer. I’m traveling now and i’ll be in Manizales in 3 weeks. I’ll fix it as soon as I arrive at home.

      Thanks for the info.

      By the way, which e-commerce plugin do you use?

  21. sebastien | french dice:

    Hi Sebaxtian, and thx for this great plugin !
    I have a problem in wp2.8.4 :
    In my page, if i check “Use the title from the feed” i have this error message : Warning: file_get_contents(http:) [function.file-get-contents]: failed to open stream: No such file or directory in /homez.144/auxaneco/www/V2/wp-includes/class-simplepie.php on line 7790

    And if i “Use a specific title”, it’s OK but there is no title in my page.

    In the widget there is no name of feed.
    There is title of posts but no title of feed.

    Do you know where is the problem ?

  22. Lionel dice:

    Hi Sebaxtian,
    I use your Lexi plugin. It’s ok but I am limited to 17 rss. Is this normal or can we bypass this limitation?
    Thanks, Lionel

  23. Javier dice:

    Hola Sebastián; acabo de actualizar el Lexi (autoactualización del 18 de diciembre) y de repente me aparece en el widget en la página donde lo tengo instalado este mensaje: Warning: ./cache/4f6760d58f89e89a5c00a01a9a079f1c.spc is not writeable in /home/chento/vicencianos.org/web/wp-includes/class-simplepie.php on line 1776
    Antes no aparecía. Se ha actualizado el minimax también hoy. Uso Wordprefect en su última versión 2.8.6

    Saludos y gracias.

    • sebaxtian dice:

      Hola Javier. Lexi está en este preciso instante en una nueva fase de desarrollo. La situación a la que te refieres se solucionará en la siguiente versión que estoy publicando ahora mismo.

      Cualquier inquietud me avisas.

  24. Eric dice:

    Lexi apparently wasn’t reactivated after a WordPress upgrade some time ago. I just tried to re-activate it but every feed comes up blank (Loading feed, then nothing). It used to work perfectly, now it doesn’t work at all.

    No Javascript error.
    Using WordPress 2.9 and the latest Minimax/Lexi.
    Using wp-cache (but that shouldn’t matter).
    WordPress URL and blog URL are identical in General preferences.

    Any pointers?

    • sebaxtian dice:

      Hi Eric.

      Would you please send me an URL where I can see this situation?

    • Eric dice:

      It turns out the plugin never worked. It gave me that impression at the beginning, because I uploaded a working local installation onto the website, which loaded up the cache obtained locally. It looks like GoDaddy’s the culprit, and does not allow the server to connect to an external feed. The built-in WordPress RSS feed widget doesn’t work either.

    • sebaxtian dice:

      Ok Eric, but lets try to find an answer.

      First, create a lexi feed without cache. Does it work? If it works, look if you have the directory ‘wp-content/cache/lexi’, if it does not exist, create it with write permissions and try again but now with cache.

      Tell me if this helps.

    • Eric dice:

      Ok, well, I already did every conceivable test the other day, but here goes again:

      Installed and activated Minimax 0.3.
      Installed and activated Lexi 0.8.
      Noticed that the three RSS feeds are still present in Tools / Lexi, even though Lexi was completely uninstalled…
      Turned off cache for these three pre-existing feeds.
      Added Lexi widget to sidebar -> feed refreshes, then no entries shown.
      Added new feed, no cache, cleared wp-cache -> the 4 feeds refresh, no entries shown.
      Deleted all 4 feeds, removed Lexi widget, cleared wp-cache to prevent artifacts on pages.
      Added new feed, no cache, added Lexi widget -> feed refreshes, no entries shown.
      Turned off wp-cache, added new feed, no cache -> feed refreshes, no entries shown.

      All feeds used are valid and well-formed.

      Like I said, it’s just not Lexi’s fault. It looks like a proxy is needed again (see http://www.gozipline.com/46,usingcurlongodaddyhosting), which would have to be patched for the existing SimplePie code (it’s not there yet, coming up in version 1.3).

    • sebaxtian dice:

      Thanks Eric.

      Lexi uses the library in WP, so we have to wait. But I promise to make a release using proxy when WP upgrade to simplepie 1.3.

    • Eric dice:

      I uploaded an older version of class-simplepie.php (1.1.3), and it works fine (without cache) with that version. Current WordPress (2.9) uses SimplePie 1.2, with which Lexi does not work on GoDaddy shared servers. This “solution” will do for me for now.

      Thanks for your time and support!

  25. nicolas dice:

    hi cool plug in, but i want to use it to push my delicious bookmark, i i can’t show more than 10 items via the plug admin interface, i there a solution to show 50 item?

  26. Juan dice:

    Hola Sebastian. Mágnifico trabajo, felicidades.
    He usado tu plugin para mostrar los últimos temas de un foro phpbb con atom feeds en el sidebar derecho de wordpress pero al pulsar no me lleva al post del foro sino a al página web de wordpress. Alguna sugerencia??

    Esta es la web del foro:
    http://clubcastingandalucia.es/foro/index.php
    La del feed principal:
    http://clubcastingandalucia.es/foro/feed.php
    Y la de wordpress:
    http://clubcastingandalucia.es/
    Muchas gracias.

    • sebaxtian dice:

      Hola Juan.

      Lexi está ahora pasando por un proceso de desarrollo intensivo, así que algunos errores se pueden estar presentando por el paso a la nueva versión.

      Hice algunas pruebas con el feed del foro que me indicaste y funcionó sin problemas en mi página de pruebas. Es posible que debas volver a recrear el widget para la nueva versión (0.9) publicada hace unos minutos. Y no olvides que puede estar usando un caché con errores así que mientras haces las pruebas deberás indicar que no use el caché.

  27. Juan dice:

    Gracias por tu rápida respuesta. He desactivado y borrado la versión anterior y he subido e instalado la nueva, pero el sistema interpreta que sólo esta desactivada, no me da la opción de volverla a instalar, y si la activo no ocurre nada: Ni aparece la utilidad en herramientas ni el widget. Debe quedar algún resto en alguna parte de la instalación anterior, aunque no debería pues esta todo borrado y vuelto a subir por ftp.
    Muchas gracias.

  28. Tony dice:

    I updated 6 plugins this morning on my site, and something caused it to show the WSOD (White Screen Of Death).

    I renamed the Plugins folder and managed to get the site to load, it deactivated all the plugins.

    When I re-activated them, all were ok except Lexi, which shows the following error when I try to activate it:

    Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /htdocs/_delovesto/htdocs/wp-content/plugins/lexi/legacy.php on line 167

    I tried to add minimax and Lexi to another site I have which is very similar, and it gave the same error when it tried to activate the plugin.

    I hope this is something easy to fix – Lexi is a very nice plugin.

    Thanks

  29. nicolas dice:

    Hi sebastian,

    i update the plug in but :
    1/ i ‘ve nothing in the wordpress tools menu (not Lexi for configure)
    2/ i integrated the new TAG [lexi:16,http://feeds.delicious.com/v2/rss/nlaustriat?count=50,title,50] and deleted the old one [lexi]
    but nothing appears on screen (but it seems ok on the source code…

    here my page, please help,

    http://www.diplotomatic.com/bookmarks/

    NB : thanks for the RSS logo mask

    cheers!

    • sebaxtian dice:

      Hi Nicolas.

      The new aproach for lexi deletes the list feature because it can now add multiple widgets in the sidebar. Sorry with the list.

      Aparently Lexi hasn’t created the cache directory in your site. Deactivate and reactivate and look if there isn’t an error.

      If still the problem, manually create it with your ftp in wp-content/cache/lexi.

      Tell me how it goes.

    • nicolas dice:

      ok i found it’s a war with a plugin: Automatic SEO links because i will put an automatic link on the word “RSS” and this word is in my specific Feed. i delete the rules and it works.

      your works is perfect i put a 5 star in the codex…

      peace,

      nicolas.

    • sebaxtian dice:

      Great to hear it works again.

      Thanks Nicolas.

      Big regards.

  30. yoda dice:

    Sebaxtian, tu plugin es magnífico. Lo único que me gustaría saber es si hay algún modo de controlar la cantidad de texto (he visto que tú lo has hecho con los feeds de la columna derecha).

    Aparte de eso, para ser el mejor plugin del universo sólo le falta la opción de activar fecha y hora y autor (cómo los gadgets de blogspot).

    Por cierto, he visto que el plugin tiene cinco estrellas basadas en cinco votos. Me gustaría darte el sexto voto, pero no sé cómo hacerlo.

    Saludos.

    Yoda.

    • sebaxtian dice:

      Hola Yoda y gracias por mirar el plugin.

      Sobre la cantidad de texto, siento responderte que no es posible desde Lexi. El texto del feed de la columna derecha lo escribo personalmente en delicious y por eso parece que el plugin controlara la cantidad de texto. Se me ocurre que podrías intentar haciendo un mashup por Yahoo Pipes que corte el contenido de los feeds y usar el rss resultante…. es una idea.

      Sobre la fecha y autor de los feeds, fue una característica disponible en las primeras versiones y luego la deseché porque no siempre funcionaba. Pero ahora que uso simplepie para los feeds tal vez sería interesante darle una nueva oportunidad. Para mañana estará la nueva versión con esos detalles.

      Gracias por preguntar por la calificación en Wordpress. Para poder añadir tu voto deberás registrarte primero en la página de Wordpress.

      Sit vis vobiscum (Que la fuerza esté contigo)

  31. yoda dice:

    Las modificaciones funcionan a la perfección y la herramienta en sí es maravillosa para crear páginas y entradas basadas en contenido de fuentes RSS.

    Le echaré un vistazo a lo de Yahoo Pipes.

    Sit vis vobiscum.

    P.D. Me he registrado en wordpress, pero no encuentro el enlace para dar mi voto. Y la verdad es que me encantaría hacerlo, así que si tú o alguien me puede facilitar el enlace estaré encantado.

Escriba su comentario