Simple Machines Community Forum

SMF Support => Español (Spanish) => Language Specific Support => Modificaciones (Mods) => Aiheen aloitti: angelgb81 - kesäkuu 03, 2009, 04:39:22 IP

Otsikko: Google Friend Connect Bar
Kirjoitti: angelgb81 - kesäkuu 03, 2009, 04:39:22 IP
Enhorabuena!

Nuevo en el foro SMF en español. Saludos a todos.

Pregunta:

¿Como puedo añadir la barra de Google Friend Connect en el header del foro SMF?

Se trata de la barra que ponen en este blog demo de Google:
http://www.ossamples.com/freestyle/

El código que da Google para generar la barra es el siguiente

<!-- Include the Google Friend Connect javascript library. -->
<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
<!-- Define the div tag where the gadget will be inserted. -->
<div id="div-xxxxxxxxxxxxxxxxxxx"></div>
<!-- Render the gadget into a div. -->
<script type="text/javascript">
var skin = {};
skin['BORDER_COLOR'] = '#cccccc';
skin['ENDCAP_BG_COLOR'] = '#e0ecff';
skin['ENDCAP_TEXT_COLOR'] = '#333333';
skin['ENDCAP_LINK_COLOR'] = '#0000cc';
skin['ALTERNATE_BG_COLOR'] = '#ffffff';
skin['CONTENT_BG_COLOR'] = '#ffffff';
skin['CONTENT_LINK_COLOR'] = '#0000cc';
skin['CONTENT_TEXT_COLOR'] = '#333333';
skin['CONTENT_SECONDARY_LINK_COLOR'] = '#7777cc';
skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#666666';
skin['CONTENT_HEADLINE_COLOR'] = '#333333';
skin['POSITION'] = 'top';
skin['DEFAULT_COMMENT_TEXT'] = '- add your comment here -';
skin['HEADER_TEXT'] = 'Comments';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderSocialBar(
{ id: 'div-xxxxxxxxxxxxxxxxxxxxxxxxxx',
   site: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
   'view-params':{"scope":"SITE","features":"video,comment","showWall":"true"}
},
  skin);
</script>


Imagino que debo ponerla en el index.template.php, pero he intentado incluirla en este archivo, de distintas formas, y comoquiera da error.

Agradecido de antemano.
Otsikko: Re: Google Friend Connect Bar
Kirjoitti: pendrakon - kesäkuu 03, 2009, 05:23:28 IP
ponlo donde quieras, pero en el codigo que pusiste aca cambia todas las comillas simples (') por (\')
Otsikko: Re: Google Friend Connect Bar
Kirjoitti: angelgb81 - kesäkuu 03, 2009, 06:01:51 IP
Gracias por responder.  Intente como dijiste, pero no salio,muy probablemente un error de mi parte.

Cambie las comillas del principio y el final. ¿O eran solo algunas? He buscado en Google y en en el foro y no encontré nada. :(

Les dejo pedazo de código nuevamente

<script type="text/javascript" src="http://www.google.com/friendconnect/script/friendconnect.js"></script>
<div id="div-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"></div>
<script type="text/javascript">
var skin = {};
skin[\'BORDER_COLOR\'] = \'#cccccc\';
skin[\'ENDCAP_BG_COLOR\'] = \'#e0ecff\';
skin[\'ENDCAP_TEXT_COLOR\'] = \'#333333\';
skin[\'ENDCAP_LINK_COLOR\'] = \'#0000cc\';
skin[\'ALTERNATE_BG_COLOR\'] = \'#ffffff\';
skin[\'CONTENT_BG_COLOR\'] = \'#ffffff\';
skin[\'CONTENT_LINK_COLOR\'] = \'#0000cc\';
skin[\'CONTENT_TEXT_COLOR\'] = \'#333333\';
skin[\'CONTENT_SECONDARY_LINK_COLOR\'] = \'#7777cc\';
skin[\'CONTENT_SECONDARY_TEXT_COLOR\'] = \'#666666\';
skin[\'CONTENT_HEADLINE_COLOR\'] = \'#333333\';
skin[\'POSITION\'] = \'top\';
skin[\'DEFAULT_COMMENT_TEXT\'] = \'- add your comment here -\';
skin[\'HEADER_TEXT\'] = \'Comments\';
google.friendconnect.container.setParentUrl(\'/\' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderSocialBar(
{ id: \'div-xxxxxxxxxxxxxxxxxxxxxxxxx\',
   site: \'xxxxxxxxxxxxxxxxxxxxxxxxxx\',
   'view-params':{"scope":"SITE","features":"video,comment","showWall":"true"}
},
  skin);
</script>


¿Están bien puestas las comillas? ¿Debo poner el código en algún lugar especifico?
Agradecido por segunda vez. :)
Otsikko: Re: Google Friend Connect Bar
Kirjoitti: angelgb81 - kesäkuu 03, 2009, 06:19:09 IP
Gracias por la ayuda amigo.

Lo he solucionado con el mod Global Headers and Footer. Solo pegue el código.

http://custom.simplemachines.org/mods/index.php?mod=351 (http://custom.simplemachines.org/mods/index.php?mod=351)