Duplicar opción "me gusta esto" de facebook

  • Autor Autor alemaster
  • Fecha de inicio Fecha de inicio
A

alemaster

Curioso
¡Usuario con pocos negocios! ¡Utiliza siempre saldo de Forobeta!
Hola amigos de VBHispano, actualmente uso vbulletin 4.0.4, incluí la opción "me gusta esto" mediante opciones de vbulletin y anda perfecto...pero me gustaría que se duplique esta opción al final de la noticia o posteo también, es esto posible???, en que plantilla??. Y también me gustaría agregar un "tweet this" o algo similar, al lado del "me gusta esto" tanto al inicio como al final de la noticia...

Muchas gracias, un gran saludo

Alejandro, Punta Arenas, Chile
 
Hola Alejandro,

Busca en la plantilla SHOWTHREAD:

Insertar CODE, HTML o PHP:
        <vb:if condition="$show['fb_likebutton']">
            {vb:raw fblikebutton}
        </vb:if>
Reemplázalo por:

Insertar CODE, HTML o PHP:
<div>
        <vb:if condition="$show['fb_likebutton']">
            {vb:raw fblikebutton}
        </vb:if>
</div>
<div style="float: right; margin-right: 2px">
<script type="text/javascript">
var twtTitle  = document.title;
var twtUrl    = location.href;
var maxLength = 140 - (twtUrl.length + 1);
if (twtTitle.length > maxLength) {
twtTitle = twtTitle.substr(0, (maxLength - 3))+'...';
}
var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl);
document.write('<a href="'+twtLink+'" target="_blank"'+'><img src="images/tweetthis.gif"  border="0" alt="Tweet This!" /'+'><'+'/a>');
</script>
</div>
Busca en la plantilla SHOWTHREAD:

Insertar CODE, HTML o PHP:
                <div class="separator"></div>
Agrega debajo:

Insertar CODE, HTML o PHP:
<div id="pagetitle" class="pagetitle">
<div>
        <vb:if condition="$show['fb_likebutton']">
            {vb:raw fblikebutton}
        </vb:if>
</div>
<div style="float: right; margin-right: 2px">
<script type="text/javascript">
var twtTitle  = document.title;
var twtUrl    = location.href;
var maxLength = 140 - (twtUrl.length + 1);
if (twtTitle.length > maxLength) {
twtTitle = twtTitle.substr(0, (maxLength - 3))+'...';
}
var twtLink = 'http://twitter.com/home?status='+encodeURIComponent(twtTitle + ' ' + twtUrl);
document.write('<a href="'+twtLink+'" target="_blank"'+'><img src="images/tweetthis.gif"  border="0" alt="Tweet This!" /'+'><'+'/a>');
</script>
</div>
</div>
<br />
Sube vía FTP la imagen adjunta al directorio images de tu foro. Reemplázala por la que desees.

Saludos.
 
Andrés, primero que todo muchas gracias por tu tiempo y tu genial respuesta, soy nuevo en esto, y cada respuesta que he recibido en este foro ha sido espectacular. Me funcionó perfecto en el foro 😀. Quiero hacer exactamente lo mismo con las noticias que publico en la pagina principal, debo usar estos mismos códigos?, en que plantilla debo hacerlo?....... muchas gracias nuevamente Andrés.
 
Para duplicar el botón de Facebook en los artículos, edita la plantilla vbcms_content_article_page y busca esto:

{vb:raw comment_block}

Agrega por encima:

Insertar CODE, HTML o PHP:
		<div class="fullwidth">
						<vb:if condition="$show['fb_likebutton']">
							{vb:raw fblikebutton}
						</vb:if>
		</div>

Si deseas colocar el botón del Twitter, la edición es similar a la de la plantilla showthread.

Saludos.
 
Atrás
Arriba