老艾之家,是本人积累网站优化经验的地方,有本人测试优化的搜索引擎数据,有摘抄来的部分经典文章,着重于百度(baidu.com)与谷歌(google.cn)的搜索优化规律观察.欢迎SEO高手参与讨论.QQ:28271004
<div id=article><img height="800" alt="" width="1280" src="/down/js/images/12498880470.jpg" /></div>
<script type="text/javascript" >
//缩放图片到合适大小
function ResizeImages()
{
var myimg,oldwidth,oldheight;
var maxwidth=550;
var maxheight=880
var imgs = document.getElementById('article').getElementsByTagName('img'); //如果你定义的id不是article,请修改此处
for(i=0;i<imgs.length;i++){
myimg = imgs[i];
if(myimg.width > myimg.height)
{
if(myimg.width > maxwidth)
{
oldwidth = myimg.width;
myimg.height = myimg.height * (maxwidth/oldwidth);
myimg.width = maxwidth;
}
}else{
if(myimg.height > maxheight)
{
oldheight = myimg.height;
myimg.width = myimg.width * (maxheight/oldheight);
myimg.height = maxheight;
}
}
}
}
//缩放图片到合适大小
ResizeImages();
</script>
<script type="text/javascript" >
//缩放图片到合适大小
function ResizeImages()
{
var myimg,oldwidth,oldheight;
var maxwidth=550;
var maxheight=880
var imgs = document.getElementById('article').getElementsByTagName('img'); //如果你定义的id不是article,请修改此处
for(i=0;i<imgs.length;i++){
myimg = imgs[i];
if(myimg.width > myimg.height)
{
if(myimg.width > maxwidth)
{
oldwidth = myimg.width;
myimg.height = myimg.height * (maxwidth/oldwidth);
myimg.width = maxwidth;
}
}else{
if(myimg.height > maxheight)
{
oldheight = myimg.height;
myimg.width = myimg.width * (maxheight/oldheight);
myimg.height = maxheight;
}
}
}
}
//缩放图片到合适大小
ResizeImages();
</script>

2010-2-3 09:59
最近找点东西,深深体会到了bo-blog自带搜索的不足。无奈于bob沉迷于工口游戏及ero game不可自拔,bo-blog 3.0遥遥无期,在这青黄不接的时候我们能做什么呢?自然是发扬祖先的光荣传统,自己动手丰衣足食,拿起Google Custom Search强奸我们的blog。
===西红柿准备===
1.Google Custom Search申请入口,全中文界面,申请有困难的同学自备新华字典一本。
2.自定义搜索引擎创建成功后依次进入我的搜索引擎->控制面板->代码,点击在 Google 托管的网页上即可得到如下代码
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="~!@##@%#^%DGSDGHT$%^%^&ZS" />
<input type="text" name="q" size="25" />
<input type="submit" name="sa" value="搜索" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=zh-Hans"></script>
其中~!@##@%#^%DGSDGHT$%^%^&ZS为用户识别码,这是我们后面所唯一需要的。
3.从这里开始将要对模板下手,模板的OOXX分为两类:
通用版:适用于搜索模块待在侧边的传统模板
打开模板的elements.php文件,于某个eot;后插入如下内容:
$elements['sideblock_search']=<<<eot
<div class="panel">
<h5 onclick='showhidediv("sidebar_search");'>搜索</h5>
<div class="panel-content" id="sidebar_search" style="display: block">
<form action="http://www.google.com/cse" id="cse-search-box">
<input type="hidden" name="cx" value="用户识别码" />
<input type="text" name="q" class="search-field" style="width:120px;"/>
<input type="submit" name="sa" value="搜索" class="button"/>
</form>
</div>
</div>
eot;
其中,用户识别码处请自行替换;文本框宽度120px可根据需要自由修改。
其他类:适用于搜索框跑至header的少数捣蛋分子
For G7 v5
打开模板的elements.php文件,查找
<form method="post" action="visit.php">
进行定位,将
<form method="post" action="visit.php">
<div>
<input name="job" type="hidden" value="search"/>
<input name="searchmethod" type="hidden" value="2"/>
<input name="keyword" type="text" id="search-text" class="keyword" value="输入搜索" onfocus="this.value=''" onfocus="this.value='输入搜索';this.style.color='gray';"/>
</div>
</form>
替换为
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="用户识别码" />
<input name="q" type="text" id="search-text" class="keyword" value="输入搜索" onfocus="this.value=''" onfocus="this.value='输入搜索';this.style.color='gray';"/>
</div>
</form>
用户识别码处请自行替换
For BloggingPro
打开模板的elements.php文件,查找
<form method="post" action="visit.php">
进行定位,将
<form method="post" action="visit.php">
<input name="job" type="hidden" value="search"/>
<input name="searchmethod" type="hidden" value="2"/>
<input name="keyword" type="text" id="search-text" class="keyword"/>
<div id="buttonsearch"><input name="submit" type="image" class="search" title="Search" src="{$template['images']}/transparent.gif" alt="Search" value="Go" /></div>
</form>
替换为
<form action="http://www.google.com/cse" id="cse-search-box">
<input type="hidden" name="cx" value="用户识别码" />
<input name="q" type="text" id="search-text" class="keyword"/>
<div id="buttonsearch"><input name="sa" type="image" class="search" title="Search" src="{$template['images']}/transparent.gif" alt="Search" value="Go" /></div>
</form>
用户识别码处请自行替换
更多修改请举一反三,拿起皮鞭SM你的大脑
===西红柿准备===
1.Google Custom Search申请入口,全中文界面,申请有困难的同学自备新华字典一本。
2.自定义搜索引擎创建成功后依次进入我的搜索引擎->控制面板->代码,点击在 Google 托管的网页上即可得到如下代码
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="~!@##@%#^%DGSDGHT$%^%^&ZS" />
<input type="text" name="q" size="25" />
<input type="submit" name="sa" value="搜索" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=zh-Hans"></script>
其中~!@##@%#^%DGSDGHT$%^%^&ZS为用户识别码,这是我们后面所唯一需要的。
3.从这里开始将要对模板下手,模板的OOXX分为两类:
通用版:适用于搜索模块待在侧边的传统模板
打开模板的elements.php文件,于某个eot;后插入如下内容:
$elements['sideblock_search']=<<<eot
<div class="panel">
<h5 onclick='showhidediv("sidebar_search");'>搜索</h5>
<div class="panel-content" id="sidebar_search" style="display: block">
<form action="http://www.google.com/cse" id="cse-search-box">
<input type="hidden" name="cx" value="用户识别码" />
<input type="text" name="q" class="search-field" style="width:120px;"/>
<input type="submit" name="sa" value="搜索" class="button"/>
</form>
</div>
</div>
eot;
其中,用户识别码处请自行替换;文本框宽度120px可根据需要自由修改。
其他类:适用于搜索框跑至header的少数捣蛋分子
For G7 v5
打开模板的elements.php文件,查找
<form method="post" action="visit.php">
进行定位,将
<form method="post" action="visit.php">
<div>
<input name="job" type="hidden" value="search"/>
<input name="searchmethod" type="hidden" value="2"/>
<input name="keyword" type="text" id="search-text" class="keyword" value="输入搜索" onfocus="this.value=''" onfocus="this.value='输入搜索';this.style.color='gray';"/>
</div>
</form>
替换为
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="用户识别码" />
<input name="q" type="text" id="search-text" class="keyword" value="输入搜索" onfocus="this.value=''" onfocus="this.value='输入搜索';this.style.color='gray';"/>
</div>
</form>
用户识别码处请自行替换
For BloggingPro
打开模板的elements.php文件,查找
<form method="post" action="visit.php">
进行定位,将
<form method="post" action="visit.php">
<input name="job" type="hidden" value="search"/>
<input name="searchmethod" type="hidden" value="2"/>
<input name="keyword" type="text" id="search-text" class="keyword"/>
<div id="buttonsearch"><input name="submit" type="image" class="search" title="Search" src="{$template['images']}/transparent.gif" alt="Search" value="Go" /></div>
</form>
替换为
<form action="http://www.google.com/cse" id="cse-search-box">
<input type="hidden" name="cx" value="用户识别码" />
<input name="q" type="text" id="search-text" class="keyword"/>
<div id="buttonsearch"><input name="sa" type="image" class="search" title="Search" src="{$template['images']}/transparent.gif" alt="Search" value="Go" /></div>
</form>
用户识别码处请自行替换
更多修改请举一反三,拿起皮鞭SM你的大脑

2010-2-3 09:58
外汇 有效 ¥17.83 - ¥26.74
美容 有效 ¥5.45 - ¥6.81
印刷 有效 ¥2.11 - ¥3.09
广告 有效 ¥0.54 - ¥0.94
性病 有效 ¥0.68 - ¥1.13
成人用品 有效 ¥0.56 - ¥0.93
鲜花 有效 ¥4.12 - ¥5.18
健康 有效 ¥0.50 - ¥0.98
彩票 有效 ¥0.22 - ¥0.39
杀毒 有效 ¥0.65 - ¥0.68
游戏 有效 ¥0.52 - ¥0.90
乙肝 有效 ¥3.79 - ¥5.68
女人 有效 ¥0.22 - ¥0.40
婚庆 有效 ¥1.84 - ¥2.63
建材 有效 ¥0.71 - ¥1.19
汽车 有效 ¥0.60 - ¥1.00
电子 有效 ¥0.28 - ¥0.53
电脑 有效 ¥1.03 - ¥1.71
健康 有效 ¥0.50 - ¥0.98
外贸 有效 ¥0.67 - ¥1.26
学习 有效 ¥0.32 - ¥0.43
投资 有效 ¥0.93 - ¥1.84
教育 有效 ¥0.50 - ¥0.65
服务器 有效 ¥0.51 - ¥0.96
虚拟主机 有效 ¥5.66 - ¥7.67
电影 有效 ¥0.32 - ¥0.40
域名 有效 ¥4.39 - ¥6.59
美容 有效 ¥5.45 - ¥6.81
印刷 有效 ¥2.11 - ¥3.09
广告 有效 ¥0.54 - ¥0.94
性病 有效 ¥0.68 - ¥1.13
成人用品 有效 ¥0.56 - ¥0.93
鲜花 有效 ¥4.12 - ¥5.18
健康 有效 ¥0.50 - ¥0.98
彩票 有效 ¥0.22 - ¥0.39
杀毒 有效 ¥0.65 - ¥0.68
游戏 有效 ¥0.52 - ¥0.90
乙肝 有效 ¥3.79 - ¥5.68
女人 有效 ¥0.22 - ¥0.40
婚庆 有效 ¥1.84 - ¥2.63
建材 有效 ¥0.71 - ¥1.19
汽车 有效 ¥0.60 - ¥1.00
电子 有效 ¥0.28 - ¥0.53
电脑 有效 ¥1.03 - ¥1.71
健康 有效 ¥0.50 - ¥0.98
外贸 有效 ¥0.67 - ¥1.26
学习 有效 ¥0.32 - ¥0.43
投资 有效 ¥0.93 - ¥1.84
教育 有效 ¥0.50 - ¥0.65
服务器 有效 ¥0.51 - ¥0.96
虚拟主机 有效 ¥5.66 - ¥7.67
电影 有效 ¥0.32 - ¥0.40
域名 有效 ¥4.39 - ¥6.59

2010-2-3 09:50
<style type="text/css">
img {width:expression(this.width>600?"580px":this.width+"px");}
</style>
</head>
<body>
图片宽度大于600像素都强制显示为580像素宽<br><br>
<div>
<img src="http://d.lanrentuku.com/lanren/wallpaper/wallpaper-0013.jpg" />
</div>

2010-1-13 09:17
据国外媒体报道,谷歌日前表示正在评估自己在中国商业运营的可行性,并可能完全退出中国市场。谷歌透露,他们遭受了据信来自中国大陆的重大网络袭击。
谷歌首席法律顾问大卫-多姆德(DavidDrummond)周二在博客文章中表达了上述想法。博文中称,去年12月中旬,他们侦测到一次来自中国、针对公司基础架构的高技术、有针对性的攻击,这次攻击导致其知识产权被盗。这些攻击和攻击所暴露出的监视行为,以及过去一年试图进一步限制网络言论自由的行动,促使谷歌决定对中国业务运营的可行性进行评估。
多姆德同时称,谷歌已经决定,不愿意继续对谷歌中国网站的搜索结果进行审查,未来几周,谷歌将与中国政府就在法律框架下如何运营一个不过滤搜索结果的引擎网站进行讨论;这可能意味着谷歌将要关闭中国网站,并可能撤销在中国的办事处。




