Displaying articles with tag

Mephisto Previous Next Post Plugin

Posted by willywg, Tue Apr 10 12:52:00 UTC 2007

Desde que mudé mi blog a Mephisto, alguna de las cosas que extrañaba de WordPress era el poder mostrar un hipervínculo al post anterior y posterior del post actual, tal y como lo usa Kubrick, tema por defecto de WordPress.

Ya que era un detalle que no quería dejar por alto en mi blog, decidí crear un plugin para Mephisto que haga esta tarea, lo he llamado Mephisto Previous Next Post Plugin, puede ser descargado desde este enlace

Usarlo es muy sencillo, luego de haber reiniciado tu blog, debes colocar el siguiente código Liquid en el template que muestra los post individuales:

{{ article | previous_next_post }}

Eso es todo, el plugin detectará el post anterior y siguiente, y generará un marcado tal como:

<div class="prev_next"><div class="prev" align="left">&laquo <a href="/2007/3/20/ruby-on-rails-en-el-developer-day">Ruby on Rails en el Developer Day</a></div><div class="next" align="right"><a href="/2007/3/26/mephisto-share-it-plugin">Mephisto Share It Plugin</a> &raquo;</div></div>

Pudes aplicarles los estilos que creas conveniente editando la hoja de estilos de tu template.

Puedes ver un ejemplo del plugin en funcionamiento al pie de este post.

0 comments | Clasificado en: Programación Proyectos Ruby on Rails Tecnología | Tags:
#

Mephisto Share It Plugin

Posted by willywg, Sun Mar 25 19:11:00 UTC 2007

[Ir a la documentación en Español]

What is this?

Mephisto Share It is a plugin that provides an unobtrusive way for your visitors to add your post to various social bookmarking sites.

Installation

  1. Download the plugin archive from http://www.willywg.com/assets/2007/3/25/mephisto_share_it.rar
  2. Unrar the file mephisto_share_it.rar and put the 'mephisto_share_it' folder into your vendor/plugins/ directory. Afterward, you should have a folder structure like this: vendor/plugins/mephisto_share_it/(a bunch of files).
  3. Finally restart your application of mephisto.

Using

1. Personalizing. Open the mephisto_share_it.rb file in your vendor/plugins/mephisto_share_it/lib/ directory and change this data:

  HOST = 'http://www.willywg.com' #A. Change it for your  website
  #B. Activate the markers to use assigning them the true value and disable them with false
  #International Bookmarks 
  DELICIOUS = true
  DIGG = true
  TECHNORATI = true
  GOOGLE_BOOKMARKS = true
  YAHOO_MY_WEB = true
  MAGNOLIA = true
  #Hispanic Bookmarks
  MENEAME = false
  FLOREAME = false
  ENCHILAME = false
  WEBEAME = false

2. Drawing. Do this in your layout (for default values):

{{ article | share_it }}

This will generate:

Share It: »<a href="http://del.icio.us/post?url=http://www.willywg.com/2007/3/25/your_post&amp;title=YourPost" target="_blank">del.icio.us</a> »<a href="http://digg.com/submit?phase=2&amp;url=http://www.willywg.com/2007/3/25/your_post&amp;title=YourPost" target="_blank">Digg</a> »<a href="http://www.technorati.com/faves?add=http://www.willywg.com/2007/3/25/your_post" target="_blank">Technorati</a> »<a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http://www.willywg.com/2007/3/25/your_post&amp;title=YourPost" target="_blank">Google Bookmarks</a> »<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.willywg.com/2007/3/25/your_post&amp;t=YourPost" target="_blank">Yahoo My Web</a> »<a href="http://ma.gnolia.com/bookmarklet/add?url=http://www.willywg.com/2007/3/25/your_post&amp;title=YourPost" target="_blank">Ma.gnolia</a>

Or use:

{{ article | share_it: 'Share this post','' }}

This will generate:

Share this post <a href="http://del.icio.us/post?url=http://www.willywg.com/2007/3/21/hola&amp;title=Hola" target="_blank">del.icio.us</a> <a href="http://digg.com/submit?phase=2&amp;url=http://www.willywg.com/2007/3/21/hola&amp;title=Hola" target="_blank">Digg</a> <a href="http://www.technorati.com/faves?add=http://www.willywg.com/2007/3/21/hola" target="_blank">Technorati</a> <a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http://www.willywg.com/2007/3/21/hola&amp;title=Hola" target="_blank">Google Bookmarks</a> <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.willywg.com/2007/3/21/hola&amp;t=Hola" target="_blank">Yahoo My Web</a> <a href="http://ma.gnolia.com/bookmarklet/add?url=http://www.willywg.com/2007/3/21/hola&amp;title=Hola" target="_blank">Ma.gnolia</a>

3. If you want to use the bookmarkers separately you can make it in the following way:

{{ article | link_to_delicious }}
or
{{ article | link_to_delicious: 'Bookmark this with del.icio.us' }}

Same way with link_to_digg, link_to_technorati, link_to_google_bookmarks, link_to_yahoo_my_web, link_to_magnolia, link_to_meneame, link_to_floreame, link_to_enchilame and link_to_webeame

Adding a bookmarker

This is simple

1. Add a bookmarker with the true value:

MY_BOOKMARKER = true

2. Create a function:

def link_to_my_bookmarker(article, text = nil)
    url = 'http://my-bookmarker.com/post?' #the url of the bookmarker site
    url += "url=#{HOST}#{article['url']}&title=#{article['title']}" #the values by get
    content_tag :a, text || 'My Bookmarker', :href => url, :target => '_blank' #the tag A generated with the Bookmarker name 
end

3. Adds the following line in the share_it function:

links += pre + link_to_my_bookmarker(article) + ' ' if MY_BOOKMARKER

[Go to English documentation]

¿Qué es?

Mephisto Share It es un plugin que permite que tus visitantes agreguen tus mensajes publicados (posts) a los marcadores de noticias más conocidos.

Instalación

  1. Descárgate el plugin desde http://www.willywg.com/assets/2007/3/25/mephisto_share_it.rar
  2. Descomprime el archivo mephisto_share_it.rar y copia la carpeta 'mephisto_share_it' en la ruta vendor/plugins/ quedando de la siguiente manera: vendor/plugins/mephisto_share_it/.
  3. Finalmente reinicia tu aplicación de mephisto.

Uso

1. Personalizando. Abre el archivo mephisto_share_it.rb localizado en el directorio vendor/plugins/mephisto_share_it/lib/ y edita los siguientes datos:

  HOST = 'http://www.willywg.com' #A. Cámbialo por tu website
  #B. Activa los marcadores que usarás asignándoles el valor true y desactívalos con false
  #Marcadores Internacionales
  DELICIOUS = true
  DIGG = true
  TECHNORATI = true
  GOOGLE_BOOKMARKS = true
  YAHOO_MY_WEB = true
  MAGNOLIA = true
  #Marcadores Hispanos
  MENEAME = false
  FLOREAME = false
  ENCHILAME = false
  WEBEAME = false

2. Mostrando. Agrega este código en tu diseño (para valores por defecto):

{{ article | share_it }}

Esto generará:

Share It: »<a href="http://del.icio.us/post?url=http://www.willywg.com/2007/3/25/your_post&amp;title=YourPost" target="_blank">del.icio.us</a> »<a href="http://digg.com/submit?phase=2&amp;url=http://www.willywg.com/2007/3/25/your_post&amp;title=YourPost" target="_blank">Digg</a> »<a href="http://www.technorati.com/faves?add=http://www.willywg.com/2007/3/25/your_post" target="_blank">Technorati</a> »<a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http://www.willywg.com/2007/3/25/your_post&amp;title=YourPost" target="_blank">Google Bookmarks</a> »<a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.willywg.com/2007/3/25/your_post&amp;t=YourPost" target="_blank">Yahoo My Web</a> »<a href="http://ma.gnolia.com/bookmarklet/add?url=http://www.willywg.com/2007/3/25/your_post&amp;title=YourPost" target="_blank">Ma.gnolia</a>

O usa:

{{ article | share_it: 'Compártelo: ','' }}

Esto generará:

Compártelo: <a href="http://del.icio.us/post?url=http://www.willywg.com/2007/3/21/hola&amp;title=Hola" target="_blank">del.icio.us</a> <a href="http://digg.com/submit?phase=2&amp;url=http://www.willywg.com/2007/3/21/hola&amp;title=Hola" target="_blank">Digg</a> <a href="http://www.technorati.com/faves?add=http://www.willywg.com/2007/3/21/hola" target="_blank">Technorati</a> <a href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http://www.willywg.com/2007/3/21/hola&amp;title=Hola" target="_blank">Google Bookmarks</a> <a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http://www.willywg.com/2007/3/21/hola&amp;t=Hola" target="_blank">Yahoo My Web</a> <a href="http://ma.gnolia.com/bookmarklet/add?url=http://www.willywg.com/2007/3/21/hola&amp;title=Hola" target="_blank">Ma.gnolia</a>

3. Si deseas usar los marcadores de manera separada puedes hacerlo de la siguiente manera:

{{ article | link_to_delicious }}
or
{{ article | link_to_delicious: 'Márcalo con del.icio.us' }}

Puedes hacerlo de la misma manera con link_to_digg, link_to_technorati, link_to_google_bookmarks, link_to_yahoo_my_web, link_to_magnolia, link_to_meneame, link_to_floreame, link_to_enchilame y link_to_webeame

Agregando un marcador

Es muy simple hacelo:

1. Agrega un nombre de marcador y asígnale un valor true:

MI_MARCADOR = true

2. Crea la función que llame al marcador:

def link_to_mi_marcador(article, text = nil)
    url = 'http://mi-marcador.com/post?' #La dirección web del marcador
    url += "url=#{HOST}#{article['url']}&title=#{article['title']}" #Los valores pasados por el método get
    content_tag :a, text || 'Mi marcador', :href => url, :target => '_blank' #La etiqueta que generará el marcador
end

3. Agrega la siguiente línea de código en la función share_it:

links += pre + link_to_mi_marcador(article) + ' ' if MI_MARCADOR

0 comments | Clasificado en: Programación Proyectos Ruby on Rails | Tags:
#

Floréame Plugin para WordPress

Posted by willywg, Fri Sep 22 06:43:00 UTC 2006

1. Sobre Floréame.

Es un clon de menéame y al igual que él te permite enviar una historia que será revisada por todos y será promovida, o no, a la página principal. Cuando un usuario envía una noticia ésta queda en la cola de pendientes hasta que reúne los votos suficientes para ser promovida a la página principal. La diferencia con menéame es que floréame solo acepta noticias escritas por peruanos o de no peruanos pero que escriban sobre Perú. Mayores detalles en: http://www.floreame.net/faq-es.php

2. Sobre el plugin.

Floréame Plugin es un plugin para WordPress que te permite enviar un post para su publicación en Floréame o votar por alguno ya publicado desde la misma bitácora de origen, es decir desde tu propia bitácora, incluso mostrando el número de votos actuales del post.

3. Licencia.

Copyright (c) 2006 by William Wong Garay (email: willy@tiperu.com)

Este programa es software libre. Puede redistribuirlo y/o modificarlo bajo los términos de la Licencia Pública General de GNU según es publicada por la Free Software Foundation, bien de la versión 2 de dicha Licencia o bien de cualquier versión posterior.

Este programa se distribuye con la esperanza de que sea útil, pero SIN NINGUNA GARANTÍA, incluso sin la garantía MERCANTIL implícita o sin garantizar la CONVENIENCIA PARA UN PROPÓSITO PARTICULAR. Véase la Licencia Pública General de GNU para más detalles.

Debería haber recibido una copia de la Licencia Pública General junto con este programa. Si no ha sido así, escriba a la Free Software Foundation, Inc., en 675 Mass Ave, Cambridge, MA 02139, EEUU.

3. Fuente.

Descargate el código fuente desde este enlace: http://willy.tiperu.com/descargas/floreame.zip

4. Instalación.
  • Descomprime el fichero floreame.zip en la carpeta que desees. Aparecerá una carpeta llamada floreame a la cual debes ingresar, esta contiene los ficheros a subir a tu hosting.
  • Sube el fichero "floreame.php" y la carpeta interna "floreame" en el directorio de plugins de tu blog en WordPress. Debe ser algo parecido a miblog/wp-content/plugins
  • Dirigete al panel de administración de WordPress, ingresa a la pestaña de "Plugins", y activa "Floréame Plugin".
  • Eso sería todo. Para confirmar la correcta instalación ingresa a tu blog. Debajo de cada uno de tus post aparecerá el logo de floréame con un enlace que te envía a "florear" tu noticia, si esta no ha sido enviada previamente, o con el número de votos que tiene tu noticia en floreame.net, si es que ya habías enviado tu noticia.Puedes ver el plugin trabajando en mi weblog personal http://willy.tiperu.com, recuerda que aparece debajo de cada artículo.
Más información sobre el plugin en http://willy.tiperu.com/index.php/plugin-wordpress-floreame/ (este post)

Enviar cualquier comentario sobre el plugin a travez de mi blog (este blog) o al e-mail: willywg@gmail.com

Para enterarse de los avances en el proyecto Floréame ingresar al weblog http://floreame.perublog.net

No se olviden de "florear" sus noticias en http://www.floreame.net.

0 comments | Clasificado en: Programación Tecnología | Tags:
#