BackLinks的安装方法 For Sablog2.0

该日志由 samool 发表于 2008-07-21 9:18 PM

今天偶注册了BackLinks,在安装代码的时候遇到问题,由于Sablog采用模板方式,不能直接插入BackLinks的代码,必须换一种方法才行,经过本人研究测试后,得到如下方法,先共享给需要帮助的朋友。

什么是BackLinks?

打开modules\article.php 在倒数第二行添加下面代码,将密钥代码 换成你的密钥,在BlackLink网站上获取代码的地方可以看到钥。

//BlackLink链接代码

// The following variable defines whether links are opened in a new window
// (1 = Yes, 0 = No)
$OpenInNewWindow = "1";

// ********************************************************************
// Please DO NOT modify anything below
// ********************************************************************

$BLKey = "密钥代码";

$BLQueryString  = "LinkUrl=".urlencode((($_SERVER['HTTPS']=='on')?'https://':'http://').$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);
$BLQueryString .= "&Key=" .urlencode($BLKey);
$BLQueryString .= "&OpenInNewWindow=" .urlencode($OpenInNewWindow);


if(intval(get_cfg_var('allow_url_fopen')) && function_exists('file')) {
    if($BLcontent = @file("http://www.backlinks.com/engine.php?".$BLQueryString)) 
        $BLcode = @join('', $BLcontent);
}
else {
    $BLcode = "It appears that your web host has disabled all functions for handling remote pages and as a result the BackLinks software will not function on your web page. Please contact your web host for more information.";
}

现在链接代码已经生成了,现在将链接变量代码输出来,打开templates\default\normal.php文件,在合适的地方添加下面代码就OK了。

<h2>赞助商链接<h2>
    <ul>
     $BLcode
    </ul>

代码修改好后,到BackLinks后台把广告位激活一下,点“My Link Pages”,看到网址后面红色字体是“Inactive”,表示还未激活,点一下“Validate Web Page”检测一下代码,看到最后“Congratulations! It appears that your web page is configured correctly! ”,就OK了,再看一下网址那里就显示的是绿色的“active”,表示已经激活,等着别人来买你的链接吧。

什么是BackLinks?

最后提一下,应该Sablog采用的是UTF-8网页编码,所以在修改文件的时候,建议使用DreamWave或者使用EditPlus修改,不能使用记事本打开修改,切记。。切记。。

 傻猫网络日志标签:    backlinks, sablog2 tiffany jewelry
网摘: Yahoo Baidu Google Bolaa 365Key Yesky Wozhai POCO ViVi YouNote Hexun Del.icio.us Yeeyoo igooi I2Key Cn3 Bytemen Furl Blinklist Blogmarks Technorati 分享到饭否
相关文章: (最多只显示10条记)
cnbeta山寨版博客完成!! (浏览:404, 评论:6)
PJBlog3 如何安装BackLinks (浏览:8190, 评论:0)
Z-Blog 如何安装BackLinks (浏览:7584, 评论:5)
Sablog2.0蓝风风格下载 (浏览:9575, 评论:13)
同花顺风格下载 For Sablog2.0 (浏览:9189, 评论:3)
Sax2.0-20080806注入漏洞解决方案 (浏览:6592, 评论:1)
换个新主题,换种心情 (浏览:6573, 评论:6)
偶移植的第一款Sablog-x 2.0风格 (浏览:7704, 评论:7)
如何将Sablog-x 1.6升级到Sablog-x 2.0 (浏览:8885, 评论:12)
BackLinks的安装方法 For Sablog1.6 (浏览:5647, 评论:23)
» 我要发表评论 你的参与是我最大的动力!    访客评论: (8条记录)
  1. 1 samool :
    2008-08-20 10:53 AM   引用此文发表评论
    我顶哦,已经有3个生意了,哈哈,9刀/月,舒服.
  2. 2 怪鸟 :
    2008-08-20 11:50 AM   引用此文发表评论
    引用 samool 说过的话:
    我顶哦,已经有3个生意了,哈哈,9刀/月,舒服.

    我也有一个了,呵```
  3. 3 samool :
    2008-08-20 1:20 PM   引用此文发表评论
    恭喜,恭喜..
  4. 4 陌路阑珊 :
    2008-08-20 7:49 PM   引用此文发表评论
    总觉得收美元不太靠谱,呵呵
  5. 5 陌路阑珊 :
    2008-08-20 7:51 PM   引用此文发表评论
    个人原创博客,申请个链接吧
    石油博客 www.blogpetro.com
    已经做好贵站的
Total:812Next ›
 
发表评论:( 注意:为了防止广告评论,本站链接已经启用nofollow)

    

(单击图片换张图片)