Iframes were once popular to hide content from the Search Spiders, a form of Blackhat SEO. Now that these spiders can see through iframes, I don't recommend using them for that purpose; it could get your site banned. However, they can be useful for displaying other sites in your webpages for various purposed. The basic code is:
<iframe src="URL" width="200" height="200">
Sorry, there was a problem loading this site. Maybe we typed the URL wrong or you can get a new browser <a href="http://www.opera.com">Here</a></iframe>
This iframe displayed fireburst.webs.com in a width and height of 500. It was simple to create. iFrames can be very useful for a webmaster, as long as you don't use them for hiding content.
Showing posts with label firefox. Show all posts
Showing posts with label firefox. Show all posts
Wednesday, December 26, 2012
Saturday, November 3, 2012
Make a Firefox search Add-on for a GCSE
Adding an search engine to Firefox is the only disadvantage to Firefox. You have to install an add-on. Compare that to Opera, where you can right click the search field. To make things worse, search add-ons are in XML. I could go on and on, but I will put my dialog at the end and you may read it if you like.
TO make this search addon your GCSE will have to follow this tutorial:http://sethsdiscoveries.blogspot.com/2012/10/two-page-more-customizable-gcse-for.html
Open notepad and enter this code:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>
Seth's Tutorials
</ShortName>
<Description>
Search for code and PC tutorials by Seth Sevenyoln</Description>
<InputEncoding>
UTF-8
</InputEncoding>
<OutputEncoding>
UTF-8
</OutputEncoding>
<AdultContent>
false
</AdultContent>
<Image height="16" width="16" type="image/x-icon">
http://sethsdiscoveries.blogspot.com/favicon.ico</Image>
<Url type="text/html" template="http://sethsdiscoveries.blogspot.com/p/search-results.html?q={searchTerms}"/>
<SearchForm>
http://sethsdiscoveries.blogspot.com
</SearchForm>
</OpenSearchDescription>
Seth's Tutorials is the name of the add-on and the name of the search engine displayed in the search box. Search for code and PC tutorials by Seth Sevenyoln is the description which is displayed in the search results of Mozilla add-ons directory. http://sethsdiscoveries.blogspot.com/favicon.ico is the URL of the icon and no it doesn't work for me either. http://sethsdiscoveries.blogspot.com/p/search-results.html?q= is the URL where results are displayed. For example, if you wanted to search fireburst.webs.com the URL would be fireburst.webs.com/searchresults.htm?q=. A way to find this out is to search for "n" and take the "n" out of the URL. http://sethsdiscoveries.blogspot.com is the URL of your homepage. Mine looked like this:
Then save it as "searchname.xml" To save it as an xml file you will need to put the filename in quotations. Mine looked like this:
Open Firefox and navigate to addons.mozilla.org. Log in or sign up with a developers account(free). Follow the steps and submit your addon. You're finished. You can download the add-on for my blog here
TO make this search addon your GCSE will have to follow this tutorial:http://sethsdiscoveries.blogspot.com/2012/10/two-page-more-customizable-gcse-for.html
Open notepad and enter this code:
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>
Seth's Tutorials
</ShortName>
<Description>
Search for code and PC tutorials by Seth Sevenyoln</Description>
<InputEncoding>
UTF-8
</InputEncoding>
<OutputEncoding>
UTF-8
</OutputEncoding>
<AdultContent>
false
</AdultContent>
<Image height="16" width="16" type="image/x-icon">
http://sethsdiscoveries.blogspot.com/favicon.ico</Image>
<Url type="text/html" template="http://sethsdiscoveries.blogspot.com/p/search-results.html?q={searchTerms}"/>
<SearchForm>
http://sethsdiscoveries.blogspot.com
</SearchForm>
</OpenSearchDescription>
Seth's Tutorials is the name of the add-on and the name of the search engine displayed in the search box. Search for code and PC tutorials by Seth Sevenyoln is the description which is displayed in the search results of Mozilla add-ons directory. http://sethsdiscoveries.blogspot.com/favicon.ico is the URL of the icon and no it doesn't work for me either. http://sethsdiscoveries.blogspot.com/p/search-results.html?q= is the URL where results are displayed. For example, if you wanted to search fireburst.webs.com the URL would be fireburst.webs.com/searchresults.htm?q=. A way to find this out is to search for "n" and take the "n" out of the URL. http://sethsdiscoveries.blogspot.com is the URL of your homepage. Mine looked like this:
Then save it as "searchname.xml" To save it as an xml file you will need to put the filename in quotations. Mine looked like this:
Open Firefox and navigate to addons.mozilla.org. Log in or sign up with a developers account(free). Follow the steps and submit your addon. You're finished. You can download the add-on for my blog here
Monday, October 29, 2012
Make Google Custom Search results open in same tab
One of the problems I had with GCSE on my blog was that it always opened links in a new window or tab. This wasn't very convenient, but I only had to change a little code in the results code.
Before Modification:
<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = '010940491106818468665:ak7ru-numse';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only></gcse:searchresults-only>
After Modification (when the results open in same tab):
<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = '010940491106818468665:ak7ru-numse';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only linktarget="_parent"></gcse:searchresults-only>
I replaced <gcse:searchresults-only> with <gcse:searchresults-only linktarget="_parent">.
Before Modification:
<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = '010940491106818468665:ak7ru-numse';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only></gcse:searchresults-only>
After Modification (when the results open in same tab):
<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = '010940491106818468665:ak7ru-numse';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only linktarget="_parent"></gcse:searchresults-only>
I replaced <gcse:searchresults-only> with <gcse:searchresults-only linktarget="_parent">.
Sunday, October 28, 2012
Two page, more customizable GCSE for Blogger
Google Custom Search is a powerful tool to search websites. You can get a Blog search from the layout and gadgets section of Blogger.The downside of this is that it isn't that customizable. This will show you how to add your own GCSE to Blogger and have a separate page for results. It's simple.
Log into Blogger, and select "pages" of the blog you want to add search too. Make sure its set to "don't show pages." Then create a new page and name it "search" or "search results." When the editor comes up click publish and go back to page list. Click "view" and copy the URL. The page section should look like the image at left. Go to Google Custom Search and click "make new search engine."
Click save. Now go to layout, and click "add gadget." Paste the code for the search box there, click save and you're set!
Log into Blogger, and select "pages" of the blog you want to add search too. Make sure its set to "don't show pages." Then create a new page and name it "search" or "search results." When the editor comes up click publish and go back to page list. Click "view" and copy the URL. The page section should look like the image at left. Go to Google Custom Search and click "make new search engine."
In "name" enter any thing, and in "sites" enter the URL of your blog. Make sure you select the free option and that you agree to the terms of use. Click next, choose a style, which you can customize. Then click next. DO NOT COPY THE CODE. Go to the sites tab and exclude the URL of your search results page.
Then go to "look and feel" and select the "two page" option.
Then click "save and get code." In the box where it tells you to specify the URL where the search results are to appear, enter the URL of "search" or "search results."
Copy the code. Go to blogger, then go to "pages" of the blog you are adding search to, and click edit. When you get the code you will have to remove some of it for cross browser compatibility so it will work with Firefox and Opera. This is the search results code. The text highlighted in red you must remove:
<!-- Put the following javascript before the closing </head> tag. -->
<script>
(function() {
var cx = 'Your Search Engines ID:ak7ru-numse';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only></gcse:searchresults-only>
<script>
(function() {
var cx = 'Your Search Engines ID:ak7ru-numse';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Place this tag where you want the search results to render -->
<gcse:searchresults-only></gcse:searchresults-only>
CLick HTML in the post editor and paste the code there. It should look like this:
Click save. Now go to layout, and click "add gadget." Paste the code for the search box there, click save and you're set!
Subscribe to:
Posts (Atom)