Open search results in the same window
By default CSE gadget opens the results in new window (link target="_blank"). To change links open in the same window (target="_top"), edit your CSE search gadget code and find line:
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);After that add line (double click to select for copying):
customSearchControl.setLinkTarget(google.search.Search.LINK_TARGET_TOP);
Set thumbnail for a post
Automatic thumbnails were introduced to CSE a little while ago. For some posts you may want to define the thumbnail manually. For example, I have some posts with picture slideshow, and automatic thumbnailing does not find the slideshow pictures, but I can specify the thumbnail manually instead. The easiest way is to use "meta thumbnail" in the post text. Edit post as html and add following code (double click to select for copying):
<meta name="thumbnail" content="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXUeVkaYpaU1R84h6lkvJuZTaCDcGScznbuJ1WFpDeyWrpmLD2Q3ODHGciDjwogIfvV_BXwS7TGCo3myvGUhsDAexe5gLanMi73A5zcZbYqd2jpom4N9gzvkQ04MMA6j-4_T41GddVrbc/s288/leskenlehti.jpg" />Use your own image url in content. I use the "s288" size from Picasa web albums, that should not be too big or too small. You can specify the meta in body text (post text), even if the documentation says it must be in head section, reference: Custom Help Search forums.
No thumbnail for a post (or a page)
Edit post (or page) text in html, add this code to text (double click to select for copying):
<!-- <PageMap><DataObject type="thumbnail" /></PageMap> -->Be careful not to use the Compose tab – if you switch from html to Compose mode and back to html, the html comments (and so also the PageMap) are gone.
No thumbnail for archive pages
You can set a page to have no thumbnail using a PageMap. For example, to remove thumbnails from archive pages, open template html, find line <b:include data='blog' name='all-head-content'/> and put this code before it (double click to select for copying):
<b:if cond='data:blog.pageType == "archive"'> <!-- <PageMap><DataObject type="thumbnail" /></PageMap> --> </b:if>
Excluding pages from CSE search results
These exclusions are made in CSE control panel. Select Sites, Excluded sites, click Add sites. For most times the selection "Exclude just this specific page or URL pattern I have entered" is best.
To exclude all archive pages, use pattern: *.blogspot.com/*_archive.html
To exclude a static page, use url of the page.
To exclude all static pages, for whatever reason, use pattern: *.blogspot.com/p/*.html
Click on a single comment to hide/show its text
4 comments:
Why don't you try http://getwebsitesearch.com/ which is an alternative to Google CSE?
@snikolaev Thanks. For me free CSE is sufficient, I don't wish to pay for this functionality, and I already have CSE nicely installed on my blogs. But for those, who you need more features than the free version of CSE offers, that might be an alternative worth checking.
he he he he
Another Blogger Tips for Stylish Blogger
:D
Hello MS-potilas, thanks very much for the useful post. You said, "Be careful not to use the Compose tab – if you switch from html to Compose mode and back to html, the html comments (and so also the PageMap) are gone." If I switch to Compose accidentally, do I put the meta tag back in html mode and everything is OK?
See the hack to make the 'Post a Comment' link bigger.
Post a Comment