Códigos para añadir marcadores sociales a tu Blog o Sitio Códigos para añadir marcadores sociales a tu Blog o Sitio

Posted by jafrancov on Jun 15, 2010 in Tutoriales | 0 comments


Los marcadores sociales y los enlaces para compartir artículos, son probablemente una fuente de tráfico muy importante para cualquiera de los que estamos en la Web. Servicios como Stumbleupon, Delicious, Twitter, entre otros, redirigen a cientos de usuarios hacia nuestros sitios.

Pero… ¿cómo podemos invitar a nuestros lectores a que compartan nuestros enlaces? Una de las formas más sencillas es facilitándoles la vida incluyendo enlaces en alguna parte de nuestras publicaciones y que con un sencillo click pueda ser posible el compartirlo.

Por supuesto hay muchos o varios plugins que hacen esta tarea, aunque, algunos pueden llegar a requerir ciertas configuraciones más avanzadas o sencillamente no queremos tener tantos o todos los marcadores que nos ofrecen y solamente queremos algunos en específico.

Si fieres tener un control más personalizado, entonces esta es la mejor opción. Aquí encontrarás más de varios códigos escritos para WordPress, sin embargo, puedes tomar el código y en las partes del PHP, modificar la instrucción y adecuarla a tu Blog/Sitio/CMS o como tu gustes.

Solamente se manejan 3 instrucciones para que las tomes en cuenta:

  • the_permalink(); Regresa la URL del post o página en cuestión
  • the_title(); Obtiene el título del post o página
  • the_excerpt(); Obtiene un extracto del contenido del post o página

Para insertarlos, solamente tendrás que copiar el enlace que desees, si usarás un ícono para la red social quedará así:

<a href="AQUI PEGAS EL ENLACE DE LA RED SOCIAL" target="_blank">
<img src="Aquí va la URL de tu imagen" alt="" />
</a>

¿Dónde colocarlo? La mayoría de los sitios los colocamos al final del contenido, para ello en WordPress te diriges a Apariencia -> Editor, en esta parte a la derecha encontrarás una lista de los archivos de tu template, buscas el que tenga por nombre single.php, ya que lo carga, busca la línea que contenga esto:

<?php the_content(); ?>

Este código es el que nos despliega todo el contenido del post, el código de las marcadores que quieras lo colocarás después de ello, y quedará algo como lo ves al final del este post.

Sin más preámbulos aquí están:

Blinklist

http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url=<?php the_permalink(); ?>&Title=<?php the_title(); ?>

Delicious

http://delicious.com/post?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>&notes=<?php the_excerpt(); ?>

Digg

http://digg.com/submit?phase=2&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>&bodytext=<?php the_excerpt(); ?>

Diigo

http://www.diigo.com/post?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>

Dzone

http://www.dzone.com/links/add.html?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>

Facebook

http://www.facebook.com/share.php?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>

Fark

http://cgi.fark.com/cgi/fark/farkit.pl?h=<?php the_title(); ?>&u=<?php the_permalink(); ?>

Friendfeed

http://www.friendfeed.com/share?title=<?php the_title(); ?>&link=<?php the_permalink(); ?>

Google Bookmarks

http://www.google.com/bookmarks/mark?op=edit&bkmk=<?php the_permalink(); ?>&title=<?php the_title(); ?>&annotation=<?php the_excerpt(); ?>

Google Buzz

http://www.google.com/buzz/post?&url=<?php the_permalink(); ?>

Hacker News

http://news.ycombinator.com/submitlink?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>

Identi.ca

http://identi.ca/notice/new?status_textarea=<?php the_permalink(); ?>

Linked In

http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>&summary=<?php the_excerpt(); ?>

Live Favorites

https://favorites.live.com/quickadd.aspx?marklet=1&url=<?php the_permalink(); ?>&title=<?php the_title(); ?>

Mixx

http://www.mixx.com/submit?page_url=<?php the_permalink(); ?>&title=<?php the_title(); ?>

MySpace

http://www.myspace.com/Modules/PostTo/Pages/?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>

Netvibes

http://www.netvibes.com/share?title=<?php the_title(); ?>&url=<?php the_permalink(); ?>

Newsvine

http://www.newsvine.com/_tools/seed&save?u=<?php the_permalink(); ?>&h=<?php the_title(); ?>

Ping.fm

http://ping.fm/ref/?link=<?php the_permalink(); ?>&title=<?php the_title(); ?>&body=<?php the_excerpt(); ?>

Posterous

http://posterous.com/share?linkto=<?php the_permalink(); ?>&title=<?php the_title(); ?>&selection=<?php the_excerpt(); ?>

Propeller

http://www.propeller.com/submit/?url=<?php the_permalink(); ?>

Reddit

http://reddit.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>

Slashdot

http://slashdot.org/bookmark.pl?title=<?php the_title(); ?>&url=<?php the_permalink(); ?>

Sphere

http://www.sphere.com/search?q=sphereit:<?php the_permalink(); ?>&title=<?php the_title(); ?>

StumbleUpon

http://www.stumbleupon.com/submit?url=<?php the_permalink(); ?>&title=<?php the_title(); ?>

Technorati

http://technorati.com/faves?add=<?php the_permalink(); ?>

Tipd

http://tipd.com/submit.php?url=<?php the_permalink(); ?>

Tumblr

http://www.tumblr.com/share?v=3&u=<?php the_permalink(); ?>&t=<?php the_title(); ?>&s=<?php the_excerpt(); ?>

Twitter

http://twitter.com/home?status=<?php the_title(); ?> - <?php the_permalink(); ?>

Yahoo Bookmarks

http://bookmarks.yahoo.com/toolbar/savebm?u=<?php the_permalink(); ?>&t=<?php the_title(); ?>

Yahoo Buzz

http://buzz.yahoo.com/submit/?submitUrl=<?php the_permalink(); ?>&submitHeadline=<?php the_title(); ?>&submitSummary=<?php the_excerpt(); ?>&submitCategory=science&submitAssetType=text

Si hay alguno que te interese y no está, no dudes en comentarlo, lo busco y hago update, o en su caso si conoces alguno extra que creas que falta en este espacio, compártelo.

Imagen (Featured): The Logo Runner

Enjoy this Life!!

Quizá también te interese...


Leave a Reply