-
How to add Google adsense for search into the website
Posted on May 29th, 2010 2 comments- 1. Go to Google Adsense and sign into your account (if you don’t have it, need a google account to create one)
- 2. Click the “AdSense Setup” tab
- 3. Select AdSense for search as the product
- 4. Select your search type — for now, choose “Only sites I select”, later will modify the code allow user to choose what type of search they do
(Click pics for bigger view)
- 5. Enter the site you specify to search across
- 6. Design your search box by choosing Google Logo placement, background color, and text box size.
- 7. Choose your search results page, Ad location and style — for me, I choose “Open results within my own site”, and for the field of “Enter URL where search results will be displayed” enter “http://search.seantian.com” (a subdomain I wanna keep my search engine with)
- 8. Enter a name for search engine and click “Submit and Get Code”
- 9. You will get two code for “Search Box Code” and “Search Results Code”, paste the “Search Box Code” into the page where you’d like your search box to appear, paste “Search Box Code” and “Search Results Code” into the page where you would like your search results to appear.
- 10. Modify the “Search Box Code” in the search results page like below, allow user to choose only search within the specify website, or entire web
- The original code:
- The modified code:
12345678910<form action="http://search.seantian.com" id="cse-search-box"><div><input type="hidden" name="cx" value="partner-pub-1234567890:lpux" /><input type="hidden" name="cof" value="FORID:9" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="20" /><input type="submit" name="sa" value="Search" /></div></form><script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>123456789101112131415<form action="http://search.seantian.com" id="cse-search-box"><div><input type="hidden" name="cof" value="FORID:9" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="20" /><input type="submit" name="sa" value="Search" /><input type="radio" name="sitesearch" value="!partner-pub-1234567890:lpux" />The Web<input type="radio" name="cx"value="partner-pub-1234567890:lpux" />/**"partner-pub-1234567890:lpux" is your adsense for search ID**/seantian.com</div></form><script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>
Check out how it looks like Sean’s Search
667 views -
Farewall for Lost
Posted on May 24th, 2010 1 comment5月23日,历经6年艰苦抗战的Lost (中文名翻译为《迷失》) 终于播完了最后一集。6年的时间确实也够这些编剧们受的,据说美剧一个season和一个season间之所以相隔这么长,就是由于编剧江郎才尽,不知道怎么编下去,讨观众喜欢。更甚者,干脆先拍一集算一集,电视台一边播幕后再一边想……
以前一直不太喜欢Jack,觉得他总是太个人英雄主义,并且太情绪化,但到底是男一号,人格魅力还是蛮强,并且总能在关键的时候做关键的事情。John这个形象个人认为塑造的很好,就是太宿命论,但最后不知何故编剧突然让他改正归邪(尽管是别人用的他的身体)。Sawyer很可爱,但太傻。最欣赏的还是Sayid,因为只有他才是一个始终在默默奉献,而不求别人注意,不在乎别人眼光的人。另外,Kate还是很漂亮的,雀斑挺性感。
其实电视剧就图一乐,6年前的第一集由躺在the island上的Jack睁开眼而始,而到6年后同样是躺在the island上的Jack闭上眼而终,就我个人来看,也算是个不错的结局了。
540 views -
How to get Latitude and Longitude values of an address on Google Maps
Posted on May 6th, 2010 6 commentsBasically Google Maps do not display the latitude and longitude values for an address, but you still can use some methods to find it.
- Run a trick javascript to find it
- 1. Find an address you want to get the values for
- 2. Click the address to make it showing on the center of Google Maps
- 3. When the location you want is in the center of the map, copy and paste this code into the location bar of your browser and press enter:
javascript:void(prompt('',gApplication.getMap().getCenter()));
- Use Google Labs to find it
- 1. Go to Google Maps and login your Google account
- 2. Go to the upper-right corner and select the green icon
of Google Labs
- 3. Scroll down to the LatLng Tooltip and select it’s Enable radio button.
694 views - Run a trick javascript to find it
-
不怕人的蜂鸟
Posted on May 5th, 2010 4 comments下午和三木同志出去散步,不经意间发现一只蜂鸟骑在办公室的墙外。其实,用“趴着”倒觉得更贴切一点。
赶忙跑回办公室拿上手机,像个狗仔队记者似的各种抓拍。没想到的是,这只蜂鸟也十分配合,任凭我随意变换角度,人家依然泰然自若,偶尔睁开眼睛扫我一眼,随后即又闭目养神。直到山木同志实在看不下去,把我拽进了办公室后,蜂鸟还在那里静静的修养。也许蜂鸟累了,只是借地休息,随后还是会回到自己的世界去的。
570 views -
How to fix comments submitting problem on WordPress
Posted on May 1st, 2010 Add commentsWhen submit a comment on WordPress, if you see an error massage like “Error 404 Not Found” something, most likely need to modify the “.htaccess” file of PHP.
The “.htaccess” file is located on the root directory of your hosting. find the line like showing below:1RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]This is a function to protect your blog from spam. You can simply just comment the line, then you are all set:
1#RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
410 views






Recent Comments