Tải bản đầy đủ - 0 (trang)
Hack 99. Add a Search Engine to Your Home Page

Hack 99. Add a Search Engine to Your Home Page

Tải bản đầy đủ - 0trang

nameforyoursearchengineoritsdescription.Providethe

fieldsasrequested,butdonotenteranyvalueinthe"Search

enginekeywords"field.

Thenextcrucialpartofthisformistoprovideyourdomainin

the"Sitestosearch"textfield,similartowhatisshownin

Figure10-16.Withthisvalueprovided,you'veturnedthe

CustomSearchEngineintoyourownsitesearchservice.

Agreetothetermsofserviceifyou'reOKwiththem,andclick

Nexttocontinue.

Onthepagethatfollows,clicktheFinishbutton.Youwillbe

forwardedtoapagelistingyoursearchengine.Clickthelink

reading"homepage"nexttoit.Youwillfindaparameternamed

"cx"intheURLontop,whichyouwillneedtocopyforthenext

step.Forinstance,theengineIjustcreatedhasthefollowing

address:



http://www.google.com/coop/cse?cx=014956320774661537761%3Avwo8c



soI'mcopyingthevalue

"014956320774661537761%3Avwo8c4t2l7s".Thisisthe

identifierofthiscustomsearchengine.

SettinguptheCustomSearchEngine



NOTE

ACSEcanberestrictedtosearchthroughaspecificsite

(thatis,adomainorsubdomain),butyoucan'trestrict

ittosearchspecificpagesorfoldersonly.IfyourGoogle

PageCreatorsitecollectsseveralunrelatedpages,it

mightmakesensetoaddanewsiteviathe"Createa

newsite"linkonthePageCreatordashboard.Thisway,

youcanpickaseparatesubdomain.

AddaSearchBoxtoYourGooglePageCreatorHome

Page

Nowit'stimetoaddasearchboxtoyoursite.Switchoverto

GooglePageCreatorathttp://pages.google.comandclickon

yourpagetolaunchtheeditor.Selectanelementofyourpage

whereyouwanttoaddthesearchbox.I'musingarighthand

navigationbarelement.Click"edithtml"below,andtypethe

thisHTMLintothebox—replacingthecxvaluewithyourown

value,butalsoreplacingthepartinyouridentifierreading

"%3A"withasimplecolon:












value="014956320774661537761:dwyc9i7r_ag"/>







Let'sgothroughtheelementsofthisHTMLsnippet.Theform

elementsetsupawebformtoreceiveuserinput.Theaction

attributespecifieswhichsitetheformshouldbesubmittedto

(inthiscase,theCustomSearchEngineservice).Themethod

gettellsthebrowsertoattachparameterstotheURLsothat

theCustomSearchEnginewillknowwhat'sbeingsearchedfor.

Theparametersarethenprovidedinthep(paragraph)

element;aninputfieldnamedqforthequery,andahidden

inputfieldnamedcxfortheidentifierofyourcustomsearch

engine.Asubmitbuttonwithalabelofyourchoice,suchas

"Search,"isincludedaswell.

Onceyou'veenteredthenecessaryHTML,clicktheUpdate

button.Nowyoucangolivewithyourpagebyhittingthe

Publishbutton,foraresultsimilartotheonepicturedinFigure

10-17.NotethatasthissearchengineishookeduptoGoogle's

normalwebsearchindex,pagesthatyoufreshlypublishon

yoursitemaynotappearintheresultsimmediately.

Thissitenowhasasitesearchinthesidebar



Hack100.GetaTasteofBlogger's

ExperimentalFeatures

UnlockBlogger'svideoembedding,gadgetsandmore.

"Earlyadopter"iswhatthetechnologyindustrycallssomeone

whobuysnewgadgetsfirst,signsupamongthefirstdozen

peopleofeverynewwebsite,andingeneralconsiders

something"old-fashioned"afterspottingasecondpersoninthe

neighborhoodusingit.Soundscool,yousay?Well,ifyouwant

tobeanearlyadopterandyouhaveablogwithBlogger.com,

here'swhattodo:insteadofstartingyourbloggingdayat

http://blogger.com,movetohttp://draft.blogger.com.Although

thedesignisslightlydifferentthanthedefault,asshownin

Figure10-18,youwillstillbeabletoblogasnormal.Butyou

willalsobeabletodomore,becauseBloggerDraft,asit's

called,letsyouexperimentwithfeaturesnotavailableinthe

defaultBloggerversion.

Hereareacoupleofthesefeaturesasofthistime(notethat

someofthesewillberolledouttothenormalBloggerover

time,andnewonesmaybeintroducedtoBloggerDraft):

YoucanaddGoogleGadgetstoyourblog[Hack#97].Find

thisinLayouts AddaPageElement.

AddaSearchboxtoyourtemplate.FindthisinLayouts

AddaPageElement.

ToreadoutaboutthelatestfeaturesavailabletoBloggerDraft

users,checkouttheofficialDraftblogat

http://bloggerindraft.blogspot.com.



NOTE

Lookingformoreblogwidgetstoadd?Visit

http://assessmyblog.blogspot.comandclickonBlogger

Hacksontop;youwillfindwaystoaddawidget

containingthetopcommentersforyourblog,awidget



showingpopularpostsofyours,andmore.

BloggerDraft,showingthedashboardview



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Hack 99. Add a Search Engine to Your Home Page

Tải bản đầy đủ ngay(0 tr)

×