如何修改Text Link Ads代码

| | Comments (5) | TrackBacks (0)
有网友问到如何修改Text Link Ads,以符合Google对链接买卖的要求,也就是避免PageRank的传递。
这里用PHP代码为例,通常从Text Link Ads后台取得的代码中有这么一段:
if ( is_array($arr_xml) ) {
		echo "\n<ul>\n";
		for ($i = 0; $i < count($arr_xml['URL']); $i++) {
			if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;
			echo "<li>".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>\n";
		}
		echo "</ul>";
	}
修改成下面这个样子:
 if ( is_array($arr_xml) ) {
echo "<div>";
echo "\n<ul>\n";
for ($i = 0; $i < count($arr_xml['URL']); $i++) {
if( isset($arr_xml['PostID'][$i]) && $arr_xml['PostID'][$i] > 0 ) continue;
echo "<li>".$arr_xml['BeforeText'][$i]." <a href=\"".$arr_xml['URL'][$i]."\" rel=\"nofollow\">".$arr_xml['Text'][$i]."</a> ".$arr_xml['AfterText'][$i]."</li>\n";
}
echo "</ul>";
echo "</div>";
}
这样修改之后,就既可以通过买卖链接来获得收入,同时也满足Google及其他搜索引擎对于链接权值传递的要求。

作者: David Yin
原载: SEO 网站优化推广
版权所有。转载时必须以链接形式注明作者和及本声明。

Categories

,

Add this post to Delicious. Add this post to Furl. Add this post Yahoo My Web. Add this post Google Bookmarks. Add this post Blinklist. Add this post Blogmarks. Add this post Technorati. Add this post Digg. Add this post Windows Live. Add this post Netscape. Add this post Newsvine. Add this post ma.gnolia. Add this post Tailrank.

相关的文章

0 TrackBacks

Listed below are links to blogs that reference this entry: 如何修改Text Link Ads代码.

TrackBack URL for this entry: http://seo.g2soft.net/mt-cgi/mt-tb-trackback.cgi/1987

5 Comments

刀河 said:

注册了一个,好多疑问,比如:You must disable or remove your current Text Link Ads plugin before enabling this one! (wpplugin)

刀河 said:

好像现在是用插件,不是用代码了,很奇怪

David Yin Author Profile Page said:

To 刀河:
我是直接用PHP代码的,插件可控性太差。

刀河 said:

只是我在后台找不到代码,只有wp插件这一链接

footprinter said:

我和刀河遇上了同样的问题,选择插件后没有办法转换成手控,很难办.

Leave a comment

订阅SEO 网站优化推广



小玩意儿

View blog authority
Add to Technorati Favorites

Listed on BlogShares


Marketing & SEO Blogs - Blog Top Sites


My blog is worth $68,309.34.
How much is your blog worth?