Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-05-12 14:29:36

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,482
Bitbucket GitHub

Integrating Google Friend Connect code (FIXED)

Hi.
I’m working on a site build that includes various social interaction aspects, including Google Friend Connect – in this instance I want to display the Friend Connect box in a sidebar.

I’ve got the Google standard-issue code as a misc form, called via txp:output_form, inside a div. The div frame renders correctly, but the contents don’t appear. Presumably there’s something I need to reformat in the above code to make it work – I’m just at a loss as to what that might be :( If anyone has any ideas what I need to do, I’d be very grateful.

Thanks in advance.

Pete

Code from Google Friend Connect:

<!-- 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-1396573772591202953" style="width:298px;border:1px solid #cccccc;"></div>
<!-- Render the gadget into a div. -->
<script type="text/javascript">
var skin = {};
skin['FONT_FAMILY'] = 'sans-serif';
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['NUMBER_ROWS'] = '4';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderMembersGadget(
 { id: 'div-1396573772591202953',
   site: '05720018216447727124' },
  skin);
</script>

Last edited by gaekwad (2010-05-12 17:07:01)

Offline

#2 2010-05-12 15:37:14

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Integrating Google Friend Connect code (FIXED)

Hi Pete – Could you post a tag trace ?

Last edited by JanDW (2010-05-12 15:37:38)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#3 2010-05-12 16:16:27

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,254
Website

Re: Integrating Google Friend Connect code (FIXED)

Does this show in the source of your page? If so check for javascript errors using firebug or some other javascript debugger.


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#4 2010-05-12 16:40:03

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,482
Bitbucket GitHub

Re: Integrating Google Friend Connect code (FIXED)

Hi MattD – yes, it appears verbatim in the source, which makes it that much more frustrating :)

Offline

#5 2010-05-12 16:53:47

JanDW
Plugin Author
From: Providence, RI, USA
Registered: 2008-07-18
Posts: 327
Website

Re: Integrating Google Friend Connect code (FIXED)

Firebug says:

Failed to load source for: http://www.google.com/friendconnect/script/friendconnect.js

However, that url exists… and your tag seems valid too… I don’t see the problem.

Last edited by JanDW (2010-05-12 16:54:33)


TXPDream – A Textpattern Tag Library for Adobe Dreamweaver. (updated for 4.2.0) | jdw_if_ajax – Only serve certain parts of a page when requested with AJAX

Offline

#6 2010-05-12 17:02:49

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,482
Bitbucket GitHub

Re: Integrating Google Friend Connect code (FIXED)

Fixed it – needed some code prepending, there’s a conflict between GFC and prototype.js – code below:

<script>
window.JSON = {
 parse: function(st){
   return st.evalJSON();
 },
 stringify: function(obj){
   return Object.toJSON(obj);
 }
};
</script>

Offline

Board footer

Powered by FluxBB