Home > Diary, Technology > Google Friend Connect

Google Friend Connect

好了.我也来挂个Google Friend Connect.
Google的这个东西刚刚出来的时候我就一直想装一个.但是一直舍不得.觉得又个博客添加了一个负担.打开又要变慢了.但是今天还是忍不住装了.新出的的东西还是要玩一玩.不管加入的人多不多.挡不住尝鲜的诱惑.

我做了些简单的所谓优化.但估计也不会有很多的用.毕竟边侧栏已经安排到了后面打开.但我还是把Google的那些js放在了foot里面.现在foot里的js可就多了.哈哈 :grin:

我的做法是.比如一下是我的GFC的全部代码:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<!-- 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-1229516163279" style="width:292px;"></div><!--只将这部分放入sidebar-->
<!-- Render the gadget into a div. -->
<script type="text/javascript">
var skin = {};
skin['HEIGHT'] = '385';
skin['BORDER_COLOR'] = '#F7F7F7';
skin['ENDCAP_BG_COLOR'] = '#F7F7F7';
skin['ENDCAP_TEXT_COLOR'] = '#555555';
skin['ENDCAP_LINK_COLOR'] = '#2970A6';
skin['ALTERNATE_BG_COLOR'] = '#ffffff';
skin['CONTENT_BG_COLOR'] = '#ffffff';
skin['CONTENT_LINK_COLOR'] = '#2970A6';
skin['CONTENT_TEXT_COLOR'] = '#555555';
skin['CONTENT_SECONDARY_LINK_COLOR'] = '#008800';
skin['CONTENT_SECONDARY_TEXT_COLOR'] = '#555555';
skin['CONTENT_HEADLINE_COLOR'] = '#555555';
google.friendconnect.container.setParentUrl('/' /* location of rpc_relay.html and canvas.html */);
google.friendconnect.container.renderMembersGadget(
 { id: 'div-1229516163279',
   site: '06413786557367912034'},
  skin);
</script>

那我只需要将其中的div部分放入sidebar.并只在首页显示.用

1
2
3
<?php if (is_home()) : ?>
你的代码
<?php endif; ?>

包起来footer部分和sidebar做同样的处理.以减少页面重复的加载.
最后,欢迎大家加入. :grin:

  1. xiaorsz Dec 17th, 2008 @ 21:54 | #1

    发现我抢的沙发真多哈!
    哈哈!我还没加这东西,感觉没多大用,可能是我还没感觉到!!

  2. yinheli Dec 17th, 2008 @ 22:00 | #2

    @xiaorsz
    到我这里抢沙发当然没有感觉了…mg12的博客.Shawn的博客.还有你的.人气比较旺.吃一点点就没了沙发的.抢起来,那才叫爽.哈哈

  3. kerby Dec 18th, 2008 @ 00:08 | #3

    你真是把优化发挥到了极致,,小心走火入魔哈—–

    :grin:

  4. hamo Dec 18th, 2008 @ 08:40 | #4

    发现抢不到沙发

  5. Johnny Dec 18th, 2008 @ 10:01 | #5

    看起来不错。这东东确实拖慢了加载速度

  6. yinheli Dec 18th, 2008 @ 11:02 | #6

    手机留言测试

  7. yinheli Dec 18th, 2008 @ 12:25 | #7

    @hamo
    很容易. :grin:
    @Johnny
    先放着吧.玩玩

  8. 飞雪网 Dec 18th, 2008 @ 12:31 | #8

    为什么我的广告为不能通过呢。。。郁闷。。

  9. yinheli Dec 18th, 2008 @ 12:47 | #9

    @飞雪网
    不知道.我也没有去看.我的广告就是自己偶尔点击一下.

  10. 菠菜 Dec 18th, 2008 @ 14:51 | #10

    据说在IE下的bug修复了,还没来得及搞上去。

  11. yinheli Dec 18th, 2008 @ 15:25 | #11

    @菠菜
    IE下有bug?我还不知道呢 :idea:

  12. Shawn Dec 18th, 2008 @ 15:29 | #12

    我觉得 GFC 就是 Mybloglog 的翻版,实在是没什么用处。。。

  13. 大学生乱弹琴 Dec 18th, 2008 @ 16:25 | #13

    准备这次pr更新后再添加~

  14. Utopia Dec 18th, 2008 @ 17:37 | #14

    原创教程呀,学习中……

  15. yinheli Dec 18th, 2008 @ 19:02 | #15

    @Shawn
    我相信Google会比它搞得好.我也就是玩玩.腻了就撤了它.最近发现你在评论里都不加自己的链接了.
    @大学生乱弹琴
    PR要更新了吗?我的是新域名.估计还是0. :mad:
    @Utopia
    我火星了.刚刚一搜索有人已经写过了.而且更详细.

  16. JoBru Dec 18th, 2008 @ 21:07 | #16

    不错,很多人都在玩这个~

  17. yinheli Dec 19th, 2008 @ 00:13 | #17

    @JoBru
    所以我也玩一下. :grin:

  18. Lorz Dec 19th, 2008 @ 18:41 | #18

    @Shawn ICQ 和 QQ 您用哪个?

  19. yinheli Dec 19th, 2008 @ 18:44 | #19

    貌似用Gtalk

  20. ×黑星星 Jan 15th, 2009 @ 17:17 | #20

    很多人都在玩了,所以我就不玩了——我玩别人的 :D

Submitting Comment, Give me a second...

Leave a comment

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">
Trackbacks & Pingbacks ( 0 )
  1. No trackbacks yet.