2009年4月1日星期三

让Blogger也能用上网页版Google FriendConnect,不仅仅是跟踪者哦……

尽人皆知,谷歌Google把blogger的跟踪者插件和谷歌GoogleFriendConnect整合在了一起,但是不是人人都知道的是,谷歌GoogleFriendConnect的功能远远不是显示一个跟踪者那么简单,而是带有一连串的功能。目前比较常见和重要的是评论交流功能。而这些功能目前已经不能添加到blogger了,因为blogger目前仅仅支持跟踪者功能。

不信你打开谷歌GoogleFriendConnect的主页http://www.google.com/friendconnect/试试看添加blogger的博客看看能否成功。可恶的谷歌,以前可以添加,现在整合了居然不让大家添加了。作为blogger用户,如果仅仅只能使用跟踪者功能,是不是很令人懊恼呢?

幸亏在谷歌禁止blogger们自己添加谷歌GoogleFriendConnect的插件之前,我已经申请了两个博客的谷歌GoogleFriendConnect,并且通过了!

这就让我有机会发现绕过谷歌限制,给blogger添加谷歌GoogleFriendConnect的办法。

其实很简单就是如我现在GG派上的谷歌GoogleFriendConnect插件——最下方的活动社交工具条,通过在谷歌GoogleFriendConnect申请得出的代码如下:

<!-- 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-1238558478261"></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'] = 'bottom';
skin['DEFAULT_COMMENT_TEXT'] = '- \u586b\u5199\u60a8\u7684\u8bc4\u8bba -';
skin['HEADER_TEXT'] = '\u8bc4\u8bba\uff1a';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderSocialBar(
{ id: 'div-1238558478261',
site: '08016764894283659330',
'view-params':{"scope":"SITE","allowAnonymousPost":"true","features":"video,comment","showWall":"true"}
},
skin);
</script>


注意上面的加粗字符“div-1238556828499”和“site: '08016764894283659330',”的数字部分,如果你在blogger上添加跟踪者插件,也能得到相应的两个数字,把上面三个代码的对应数字替换成你的blogger博客页面元素插件跟踪者代码里的数字即可。(怎么得到跟踪者页面元素的数字?你先把跟踪者这个页面元素加上,然后打开你的博客,利用浏览器看你博客的源代码,搜索div-找到第一个代码,再搜索site: '即可找到第二个代码。 怎么,你还有困难不知道如何添加跟踪者页面元素? 大妈,您不会用鼠标是不是还要我手把手教啊?)

原来上面加黑部分的两个数字就是你申请网页版谷歌GoogleFriendConnect最重要的两个标识代码。只要有这两个代码,你的blogger就可以使用网页版谷歌GoogleFriendConnect的所有功能了。

下面给出几个常见的代码给大家自己替换使用。上面第一个给出的代码是谷歌社交工具栏在下方,如我的GG派和Q小报:

再给出谷歌社交工具栏在上方的代码:

<!-- 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-1238558525905"></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'] = '- \u586b\u5199\u60a8\u7684\u8bc4\u8bba -';
skin['HEADER_TEXT'] = '\u8bc4\u8bba\uff1a';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderSocialBar(
{ id: 'div-1238558525905',
site: '08016764894283659330',
'view-params':{"scope":"SITE","allowAnonymousPost":"true","features":"video,comment","showWall":"true"}
},
skin);
</script>


可伸缩的评论栏:
<!-- 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-1238558605801" style="width:282px;border:1px solid #cccccc;"></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['DEFAULT_COMMENT_TEXT'] = '- \u586b\u5199\u60a8\u7684\u8bc4\u8bba -';
skin['HEADER_TEXT'] = '\u8bc4\u8bba\uff1a';
skin['POSTS_PER_PAGE'] = '5';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderWallGadget(
{ id: 'div-1238558605801',
site: '08016764894283659330',
'view-params':{"disableMinMax":"false","scope":"SITE","allowAnonymousPost":"true","features":"video,comment","startMaximized":"true"}
},
skin);
</script>


可以给星级的评分意见栏:

<!-- 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-1238558686430" style="width:282px;border:1px solid #cccccc;"></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['DEFAULT_COMMENT_TEXT'] = '- \u7559\u4e0b\u60a8\u7684\u610f\u89c1 -';
skin['HEADER_TEXT'] = '\u8bc4\u661f\u7b49\u7ea7\uff1a';
skin['POSTS_PER_PAGE'] = '5';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderReviewGadget(
{ id: 'div-1238558686430',
site: '08016764894283659330',
'view-params':{"disableMinMax":"false","scope":"SITE","allowAnonymousPost":"true","startMaximized":"true"}
},
skin);
</script>



以上给出的代码仅仅是为了方便没有申请到网页版Google FriendConnect的朋友使用。申请到的直接到网页版Google FriendConnect那里申请定制代码替换即可。

4 评论:

linfavourite 说...

反正都没用就对了。仅仅放一个让人家跟踪而已

真佛宗華德同修會 说...

欢迎浏览我的网站

http://tbsmymiri.blogspot.com

Ocean Ban 说...

你的代码code模块十分的不错,我也会偶尔插些代码,能不能把你的这个模块给我一份啊,我翻遍了你的文章没有找到相关内容,如果方便的话麻烦发给我一份代码:oceanban+ggquan@gmail.com 谢谢了。

Ocean Ban 说...

再问下博主有没有全部文章列表代码,我绑定的域名在不用代理的情况下,全部文章列表排版很糟糕。
http://blog.kban.info/

发表评论: ☆欢迎灌水☆言论自由☆交流快乐☆