冲动是魔鬼!!!
« »

在Blog中添加反向链接工具

        实现这个功能,需要借助IcerocketIcerocket是个将重点转向Blog搜索领域的搜索引擎)的Link Tracker服务。

        有2种方法实现,原文如下:

1. Server installed version of Link Tracker

This version requires your server to be able handle PHP script which you need to place on the blog server. 3 steps to complete:

  1. Insert this code into HEAD section of all HTML pages of your blog(这里对应的是header.php):
    <script language=javascript src="http://blogs.icerocket.com/cit.js" mce_src="http://blogs.icerocket.com/cit.js"></script>

  2. Place PHP script called “cit_client.php” on the server in the ROOT where your blog is placed! This script should be on the same domain as the whole blog. You can download zipped script here.”cit_client.php” is a script which should be placed on the server where your blog exists. Actually this script connects to our server and get a link with number of linking posts. We have to use it because IE and Mozilla security rules do not permit to load HTML content from external domain by default.
  3. Warning: This step is essential for this version of Link Tracker.
  4. After each post insert span tag with id="blogcitation" and attribute link="PERMANENT_LINK_TO_YOUR_POST". (在wordpress主题的index.php以及single.php文件的相关位置添加,非绝对,如现在使用的unnamed主题在index.php和single.php中就无法添加,都是调用的theloop.php来实现,则添加到theloop.php的相关位置即可)EXAMPLE:
    <span id="blogcitation" link="PERMANENT_LINK_TO_YOUR_POST"><a href="http://blogs.icerocket.com/search?q=PERMANENT_LINK_TO_YOUR_POST" mce_href="http://blogs.icerocket.com/search?q=PERMANENT_LINK_TO_YOUR_POST">Linking Posts</a></span>

    e.g.
    <span id="blogcitation" link="http://someblog.com/123123/"><a href="http://blogs.icerocket.com/search?q=http://someblog.com/123123/" mce_href="http://blogs.icerocket.com/search?q=http://someblog.com/123123/">Linking Posts</a></span>

Note: You can check an example of page which includes this code here. Just click on the link and examine source of the page.

2. IFrame based version of Link Tracker

This way does not require you to install any script on the server hosting your blog. You just need to insert some JavaScript code to the header of pages (also you might customize look&feel of links returned from our server via changing some parameters inside JavaScript code).

  1. Insert this code into HEAD section of all HTML pages of your blog:

日志信息 »

该日志于2007-05-23 10:22由 aRu 发表在WordPress分类下, 你可以发表评论。除了可以将这个日志以保留源地址及作者的情况下引用到你的网站或博客,还可以通过RSS 2.0订阅这个日志的所有评论。

没有评论

发表评论 »

返回顶部