Creating Web Site cover The other day I was reading Creating a Web Site: The Missing Manual by Matthew MacDonald to remind myself just how much I had forgotten. As I read the chapter on blogs I saw a screen shot of a blog with post summaries which showed the title of the post in the “Continue Reading” link.

I thought that it looked so much better than just “Read more…” or “Continue reading…” or the other variations I have seen and decided to try and use it in my blogs. The big question was of course, “How on earth do you do that?”

That meant that I would have to start experimenting and looking through help pages. So, here goes.

First of all, just in case you are not sure what a post summary is, a little explanation. It means putting a brief introduction to your post on the your blog’s Home page. It may just be the first few paragraphs, which is what I do here, or some prefer to put a brief summary of what you will find if you click the link to the complete article.

There are various posts and articles on the Web and you can search them in order to find the method which suits you best. I looked around and tried various methods but the best I could find was Selective Expandable Posts by Ramani. The clearest explanation of how to install  and use this is here on Amanda Fazani’s Blogger Buster.

Once you have installed it you will find “Read More……” at the end of every post summary. And, unlike many that I found the link will only appear at the end of the summary, not at the end of every complete post as happens with so many others, including the method in Blogger's own help pages.

So, how do you change the link to include the post title? Surprisingly, it is very easy. All you do is add <data:post.title/> to the link between the <a> tags.

If you used Blogger’s method use your browser’s Find tool to look for this line:

<a expr:href='data:post.url'>Read more!</a>

And if you used the method in Blogger Buster look for this line in the code you just installed:

<a expr:href='data:post.url'>Read More......</a>

If you used another method then the beginning of the link will always be the same.

Now add <data:post.title/> before the closing </a> tag and to make it read more clearly change the wording to your personal preference. It may be “Continue reading” or “Read all of” or even “Read complete”. The choice is yours.

This is what I have done in my templates:

<a expr:href='data:post.url'>Continue reading "<data:post.title/>"</a>

There are two points to note here:

  1. Leave a space between “reading” or your final word and the <data> tag to stop them running together.
  2. To make it obvious what the title is, and for the sake of good English, place quotation marks around the <data> tag.

This will give you the same link layout as you saw at the beginning of this post.

If you want find out more about the data tags for Blogger layouts you can go to this page in Blogger help.

You can find more details about the Creating a Web Site book here:

Continue reading "How to Show the Post Title in Blogger Post Summaries"

 

Bookmark and Share

As anyone who creates content on the Web will tell you the best browser to avoid is Internet Explorer. This is because Internet Explorer, even the latest IE8, has so many inbuilt faults and errors that it is a struggle to get any website or blog to work properly. The errors also produce different problems for different users.

That is why you can now see so many sites displaying a message that the site is best viewed in Firefox. I will also advise you to use Firefox, Google Chrome, Safari or Opera in order to get the best from this blog.

In Internet Explorer the only problem I have failed to overcome is that if you use the AddThis Bookmark button and click on either Email or More to open another window you may not see it. It is there, but in IE it insists on being only at the top of the page and not in the middle of the window where it should be. All you have to do is scroll up the page and it will be there at the top.

This does not happen on all computers so you may be lucky and see it pop up straight away. I have been in touch with support at AddThis and they are aware of this IE problem but so far they have not been able to get it to happen on their own computers and cannot find out why this fault occurs only on some computers or what in IE is causing it.

Technorati Tags: ,

Continue reading "Internet Explorer Users and AddThis Button"

 

Bookmark and Share

Firefox New Tab Not Working

Since the Firefox update which brings it to version 3.0.11 many users have found that the new tab command does not work. Whether you select New Tab from the File menu, right click next to a tab and select New Tab or use the New Tab button on the toolbar, nothing happens.

This is a serious nuisance as the only way to get a new tab is to middle click on a link. Unfortunately this is no good if you want to open a new tab to type in a new URL without losing the content of the previous tabs.

Fortunately, you have a choice of two simple cures.

It looks as if the cause of the problem may be the AVG Security Toolbar. So, if you open the Add-ons window (Tools>Add-ons), scroll to AVG Security Toolbar and select disable you should find that New Tab is working again when you restart Firefox.

The problem here is that you lose the toolbar and some of its security protection. However there is an alternative solution offered by the Google Toolbar. If you do not already have the Google Toolbar you can download it from the link.

Googletoolopt Once it is installed or if it already installed open the Add-ons window and scroll down to Google Toolbar for Firefox and click on options.

On the search tab of the Google Toolbar Options window, in the Web browsing tools section, select “Enable the Google new tab page.” Then click Save.

This will give you back New Tab and all normal methods of selecting a new tab will work. The new tabs will have extra features and the page will look more like the new tab pages in Opera and Safari.

Every time you open a new tab in your browser, you will be able to access your most visited sites, the last few tabs you closed and your most recently added bookmarks. There should also be small screenshots of your most visited sites.

This second cure has the advantage of retaining the AVG security features and adding more functionality to your new tab.

Continue reading "Firefox New Tab Not Working"

 

Bookmark and Share

Today I was asked an intriguing question about styling the Blog Archive list by a fellow fan of this Blogging Pro template.

I have a request/question… Is it possible to get the year/count on the same line as the arrow symbol?
e.g. > MAY (3) or > 2009 (5).

I hope you understand what I am trying to say.

This was an interesting diversion after frantically rescuing this blog’s looks from some sort of server error which stopped the background graphics loading. So I had a look and it turns out that it is possible. However, although it works in the latest version of all the browsers (I checked it in Firefox 3, Internet Explorer 8, Opera 9, Opera 10, Safari 4, Google Chrome 2, Avant 11  and Flock 2) it stubbornly refuses to work in Internet Explorer 7. I will keep trying for IE7 but so far it has resisted all attempts.

Update: It now works in IE 7 as detailed below.

I have done it all through CSS as I discovered that the styling for the pointers is not in the templates but is generated by Blogger’s server. So by altering it and adding it to the template it overrides the generated style.

All you need to do is add the following styles to the head of the template. Make sure that you place them between the opening <b:skin><![CDATA[/* and closing ]]></b:skin> marks. The best way in the Blogging Pro template is to use the browser’s search/find (CTRL+F) to look for .Blogarchive. This will take you to the existing archive style.

#ArchiveList .toggle{cursor: pointer; font-family: Arial,sans-serif; display:inline; border-bottom:none; float:left}
#ArchiveList a.toggle, #ArchiveList a.toggle:link, #ArchiveList a.toggle:visited, #ArchiveList a.toggle:hover{color: inherit; text-decoration: none;display:inline; float:left; margin:3px 0 -3px 0; padding:1px 3px 1px 0}
#ArchiveList a.toggle, #ArchiveList a.toggle:link, #ArchiveList a.toggle:visited, #ArchiveList a.toggle:hover{color: inherit; text-decoration: none;display:inline; float:left; margin:3px 0 -3px 0; padding:1px 3px 1px 0}
#ArchiveList a.toggle, #ArchiveList a.toggle:link, #ArchiveList a.toggle:visited, #ArchiveList a.toggle:hover{color: inherit; text-decoration: none;display:inline; float:left;}

You can adjust the gap between the pointer and the date by changing the number in red.

After hours of fiddling I have found that to ensure that it works in Internet Explorer 7 also add the following two lines along with the code above:

.BlogArchive #ArchiveList ul li{margin:0; padding:0; text-indent:0; display:inline}
.BlogArchive #ArchiveList ul.posts li{display:block; margin:0; padding-left:0; text-indent:0}

If you want the indent for the posts, which I think helps to make the dates stand out a little better, then change margin;0; marked in red, in the line above, to margin-left:15px;. and look for the following code which is already part of the template:

.BlogArchive #ArchiveList ul li.archivedate{margin:0pt; padding:0px; text-indent:0px}

Then change the item marked in red to margin-left:15px;.

There is only one slight IE7 puzzle: why does it insist on slightly increasing the gap above the months once you have clicked on the month? It displays perfectly in all the browsers listed above and if I come close to finding a solution in IE7 it breaks the display in all the other browsers.

Be warned that this is aimed at the archive display style used in this template. To use it in another template or in any template with a standard indented archive list will require some tinkering with the code. Also, for it to work you will need to have removed all indentations from the layout. The previous two articles should be read first:

I have installed it in this template for the time being to show that it can be done. So far I have not decided whether to keep it for the long term or not.

Continue reading "Moving the Pointer In a Blogger Archive List"

 

Bookmark and Share

We all know how annoying it can be sometimes to have to scroll all the way back to the top of a page after reading a long blog post and a long list of useful comments. Just being able to click a link to take us straight back to the top is much easier.

Top of Page linkSome blogs have added them to the bottom of sidebars, some have added them to footers if they have them. The easiest way to add the link is to place it so that it appears at the bottom of each page just above the standard Blogger navigation links to Newer Posts, Home and Older Posts.

It is simply a case of adding a link back to the header to the template code:

<p><a href='#header'>Top of Page</a></p>

Before you do, download the full template to keep it safe in case of problems then expand the widgets so that you can find the following section of code:

</b:loop>
   <data:adEnd/>
</div>

<!-- navigation -->
<b:include name='nextprev'/>

<!-- feed links -->
<b:include name='feedLinks'/>

To find this use your browser’s search/find (CTRL+F) to look for nextprev. The one you want is the second one as shown above. (The first is the includable which is used to make nextprev work.) Then add the link as shown in red.

</b:loop>
   <data:adEnd/>
</div>

<p><a href='#header'>Top of Page</a></p>

<!-- navigation -->
<b:include name='nextprev'/>

<!-- feed links -->
<b:include name='feedLinks'/>

Click Preview to make sure that all is well and if so Save the template.

You may have to make one or two tweaks to achieve the correct layout. For instance in the illustration above, which is taken from the WP Premium Red template there was no space above or below the link. Surrounding the paragraph with breaks brought about the above layout.

<data:adEnd/>
  </div><br/><br/>
<p><a href='#header'>Top of Page</a></p><br/><br/>
  <!-- navigation -->
  <b:include name='nextprev'/>

Adding a class and styles could have been used instead, but this was much easier and requires less code.

Occasionally, as in the template used for this blog, '#header' may not take you quite to the top. This is because something, such as a navigation bar has been added above the header. The solution is to use '#header-wrapper' instead:

<p><a href='#header-wrapper'>Top of Page</a></p>

That takes you right to the top of the page and includes the navigation, which is probably what your reader was trying to reach in the first place.

You can, of course change the wording of the link as you wish. For instance Jump to Top, Return to Top or just Top will do as long as it is clear to your reader.

If you prefer to add the link to the sidebar or footer the format is basically the same and the format and styling are up to you as long as it is right for your blog design.

Continue reading "Add a Top of Page Link to Blogger Templates"

 

Bookmark and Share

Add a Gadget Blogger has now taken the Google search gadget out of draft and added it to the list of gadgets you can add to your blog sidebars. This means you can use Add a Gadget to add  and configure it instead of having to set it up in Google Custom Search, then copy the code into an HTML/JavaScript gadget to insert it the blog.

Configure Search BoxIn the Configure Search Box window you can choose whether you want your readers to be able to search just your blog, the whole Web, pages you have linked to or the sites in your Blog Roll and link lists. Or, perhaps, all of them.

The choice is yours, as is the title. You may want to change it from the default “Search This Blog” to whatever best suits your requirements.

Clicking on “Save” when you have made your choices will add the gadget using your blog’s style and colours. So you will no longer need to bother about styling it to match the blog.

Now, in case you are wondering why the search choices are listed under tabs it is because the search results will open in tabs in your blog and will be styled to suit the look and feel of your blog. You can see an example here on Google’s Ajax APIs Blog.

Configure Search Warning A word of caution. If you have not made your blog public so that it can be indexed by search engines you will be given a warning notice. If you continue and click save, the gadget will be added but may not appear in your sidebar until you go to Setting>Basic and change the selection next to “Let search engines find your blog” to Yes.

Once installed you will have a custom search engine which, because it uses the Ajax Search APIs, will be constantly updated as you change or update your link lists and Blog Roll. And, best of all, the results will be inline and closely integrated with your blog.

The only gripe I have is that you cannot do this for AdSense for Search. So you will still have to configure AdSense for Search yourself and copy the code to the HTML/JavaScript gadget. Let’s hope that Blogger introduces an AdSense version soon.

Technorati Tags: ,,

Continue reading "Google Search Gadget for Blogger"

 

Bookmark and Share

This article is specifically for those who use the Blogging Pro template on Blogger but may be of interest to others. Since initially writing this I have also found that the error also shows in Google’s Chrome browser. I have therefore amended the article.

There is a display problem with the header search box when the template is viewed in Apple’s Safari browser on a Windows PC or in Google’s Chrome browser. I do not have access to a Mac so I have been unable to check the Mac version of Safari.

Broken Safari Search The search form legend, in black, should not show as it  should be hidden by a large negative text indent in the CSS. It is then replaced by the more attractive white heading in the background image. Both Safari and Chrome, however,  ignore the text indent and display it as shown in the screen shot.

Fortunately the cure for this is quite easy. Go to Edit HTML and download the template then expand the widget templates. Next locate the following section of code by entering 'searchform' in your browser’s search/find box (CTRL+F).

<b:widget id='HTML35' locked='true' title='Search' type='HTML'>
<b:includable id='main'>
<div class='Search'>
<fieldset>

    <form expr:action='data:blog.homepageUrl + &quot;search&quot;' id='searchform' method='get' name='searchform'>
    <b:if cond='data:title'><legend><data:title/></legend></b:if>   
        <div id='search'>
            <input class='keyword' id='s' name='q' type='text'/>
            <div id='buttonsearch'><input alt='Search' class='search' name='submit' src='http://i254.photobucket.com/albums/hh92/eblogtemplates/
bloggingpro/transparent.gif' title='Search' type='image'/>
     </div>
            <data:content/>
        </div>   
    </form>
  </fieldset>   
</div>
  <div class='SearchCorner'/>
    </b:includable>
</b:widget>

Delete the line highlighted in red. This will get rid of the black “Search”. If you preview the change you will see that the search box is now up too high. So look in the head of the template for this section of the CSS:

/*\ IE/Win min height hack */ * html .Search{height:100px}/* */ 

.Search{width:375px; background:url(http://i254.photobucket.com/albums/hh92/eblogtemplates/bloggingpro
/SearchBkg.png) no-repeat left top; min-height:100px; position:absolute; top:0px; right:0px}
.Search  fieldset{border:none; padding:0px; margin:0px}
.Search  legend{text-indent:-35000px; margin:0; padding:0}
.Search  form{padding:33px 33px 0px 33px; margin:0px 0px 0px 0px}
.Search  input{color:#6db6ff; font-size:14px; font-family:'Arial'; letter-spacing:-1px; font-weight:bold}

Find the line shown in green and change the first 33px to 47px so that it looks like this:

.Search  form{padding:47px 33px 0px 33px; margin:0px 0px 0px 0px}

This will move the search box back to its correct position. You can save the template now and the black “Search” will be gone in Safari  and Chrome browsers.

If you look at the line above the green highlighted line you will see the style definition which gives the  search legend its negative text indent to hide it. This is now redundant so you can delete it if you wish or just comment it out like this:

/* .Search  legend{text-indent:-35000px; margin:0; padding:0} */

If you just leave it it doesn’t matter as the browser will ignore it anyway.

Finally there is the matter of the search button which is slightly low in Safari 3. This also happens in Internet Explorer 7 because both of these browsers are not fully standards compliant. Using a hack to fix it in Safari is likely to cause problems in Opera and Google Chrome and will probably affect more of your readers, so it is best left alone. The good news is that the alignment is perfect in Google Chrome, Safari 4 (currently in beta) and Internet Explorer 8.

Update 18 June, 2009: Safari 4 has now been released and it is very different to the beta version. Unfortunately they have reintroduced the search button misalignment. One of these days they may get it right.

Continue reading "Blogging Pro Search Box Display Error in Safari and Chrome"

 

Bookmark and Share

This is a slightly belated answer to one of my readers who wants to add a Popular Posts widget just as I have in the footer of this blog.

Update: I changed the title to Popular Posts 30-05-2009.

If you scroll to the footer you will only see the Most Commented widget  and not Popular Posts. This is because they are the same thing. They work by counting the number of comments your posts receive then listing them with the most popular at the top. What you call it is up to you, but I have also seen them called Favourite Posts, Best Posts and several other names. But Most Commented and Popular Posts are what most people look for and understand.

I was reading Making Money Online 101 which is a WordPress blog using the original version of this Blogging Pro template. When I reached the bottom and saw the Most Commented column I decided that I would like it on my blog. So I went in search of the right widget.

I found the code  below on Blogger Widgets. This allowed me to display the post names without a count. If you prefer to show the count there are two variations. The first displays the count like this:

Title of post (24)
Title of post (22)

and so on.

The second displays it like this:

Title of post (24 comments)
Title of post (21 comments)

and so on.

<script type="text/javascript">
function pipeCallback(obj) {
document.write('<ol style="text-transform: capitalize;">');
var i;
for (i = 0; i < obj.count ; i++)
{
var href = "'" + obj.value.items[i].link + "'";
var item = "<li>" + "<a href=" + href + ">" + obj.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write('</ol>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&_id=1a1c6e4e6d4f148e3650fda46910e15f&url=http%3A%2F%2Fanshuldudeja.blogspot.com&num=10" type="text/javascript"></script>
<noscript><a href="http://anshuldudeja.blogspot.com" target="_blank">Blogger Hacks</a></noscript>

To add this to your blog go to Layout>Page Elements and use Add a Gadget to open the HTML/JavaScript and paste the code then enter your URL in place of the red placeholder. DO NOT enter the http:// part of the URL, just www.yourblog.com or yourblog.blogspot.com.

You can choose how many titles you want to display by changing the number in blue just after the URL.

The id number in green determines how the display will look.

  • 1a1c6e4e6d4f148e3650fda46910e15f     will display it with no count.
  • a7d3195528df5e96181a3d2712266226   will display with a count (23)
  • 1cf38ae68efbe859c4ba1ee239cec099     will display like this (23 comments)

In the title field you can enter either Most Commented or Popular Posts, or whatever you prefer to call it.

Then click save and adjust the position of your new widget in the sidebar or wherever you want to place it.

Now a word of caution: you may find that the new widget does not display as you expected. This is due to the fact that most of the widgets which produce lists in your template use unordered lists <ul> as they simply add the latest to the top of the list. Most Commented / Popular Posts has to be an ordered list <ol> as they put the most popular at the top and then work down in order.

All of the templates I have looked at  so far do not contain styling for ordered lists as none of them were supplied with any widget that produced them. Therefore the browser uses its built in default styling for ordered lists. To get the display to match your unordered lists you may have to edit or add to your style sheet.

I will write an article on styling lists very soon.

The rest of this article is specific to adding the Most Commented list to the footer of this Blogging Pro template. But first a short list of some other sites with articles on adding Most Commented:

Adding Most Commented to Blogging Pro Footer

First of all this is very similar to The Blank Configure Feed Problem so, if you have not yet read it, it is worth looking at now.

In Layout>Page Elements use Add a Gadget for the footer to open the HTML/JavaScript window and paste and edit your code as above. Then  click Save.

Switch to Edit HTML, download the full template for safety’s sake, then expand the widget templates. Scroll to near the bottom of the code and look for this section of code which should be in the FooterBG div:

<b:widget id='HTML8' locked='false' title='Most Commented' type='HTML'>
<b:includable id='main'>
  <!-- only display title if it's non-empty -->
  <b:if cond='data:title != &quot;&quot;'>
    <h2 class='title'><data:title/></h2>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>

  <b:include name='quickedit'/>
</b:includable>
</b:widget>

In the first line id may have a different number after HTML depending on how many other HTML widgets you are using. Also, the title will be whatever you decided on when you filled in the Title box before saving the widget. If you used a different JavaScript code to the one I used you may find a few slight differences but it should be essentially the same.

Highlight everything shown and then cut and paste it into a text file for safe keeping.

Now scroll up a little way until you find the following code section:

</b:widget>
</b:section>


    <h3>Recommended Money Makers</h3>
   <ul>
<li><a href="https://chitika.com/mm_overview.php?refid=eblogtemplates" title="Link to Chitika eMiniMalls">Chitika eMiniMalls</a></li>
<li><a href="http://www.widgetbucks.com/home.page?referrer=10252004" title="WidgetBucks">WidgetBucks</a></li>
<li><a href="http://www.text-link-ads.com/?ref=2164" title="Link to Text Link Ads">Text Link Ads</a></li>
<li><a href="http://www.shoppingads.com/refer_b2ca9b956a2a7e7bbfc0" title="Link to AuctionAds">AuctionAds</a></li>
<li><a href="http://affiliate-program.amazon.com/gp/associates/join?tag=blogtemplates-20" title="Link to Amazon Associates">Amazon Associates</a></li>
<li><script type="text/javascript">&lt;!--
google_ad_client = &quot;pub-6044026340890176&quot;;
/* Text link AdSense Blogging Pro Footer */
google_ad_slot = &quot;1440529407&quot;;
google_ad_output = &quot;textlink&quot;;
google_ad_format = &quot;ref_text&quot;;
google_cpa_choice = &quot;&quot;; // on file
//--&gt;
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></li>
    </ul>
</div>

</div>
</div>

<div class='FooterBG'>
    <div class='Footer'>

Highlight all the code highlighted above then do not delete it but cut it, paste it into a text file and save it in case you decide to restore it someday.

Now go to the text file where you saved the widget code and copy it. Open up a space between the </b:widget> and </b:section> immediately above the code highlighted above and paste your widget code there so that it looks like this:

</b:widget>
<b:widget id='HTML8' locked='false' title='Most Commented' type='HTML'>
<b:includable id='main'>
<div class='MostCommented'>
  <!-- only display title if it's non-empty -->
  <b:if cond='data:title != &quot;&quot;'>
    <h3 class='title'><data:title/></h3>
  </b:if>
  <div class='widget-content'>
    <data:content/>
  </div>

  <b:include name='quickedit'/>
  </div>
</b:includable>
</b:widget>
</b:section> 
</div>
</div>
<div class='FooterBG'>
    <div class='Footer'>

It will now be directly below your Recent Comments code. Finally add the two lines in red and remember to change both <h2>s to <h3> as highlighted.

Click Preview just to check there are no errors then if all is well save the template.

Now a slight adjustment to the CSS to get rid of the margin on the left of the Most Commented / Popular Posts list.

Look for the following styles in the head section of the template:

/* Extra Footer */
.ExtraBG{width:100%; float:left; background:#039; padding:25px 0px}
.Extra{width:900px; position:relative; clear:left; margin:0 auto}
.Extra h3{padding:0px 0px 10px 0px; margin:0px 0px 10px 0px; color:#fff; font-size:17px; letter-spacing:-1px; border-bottom:dashed 1px #2658ad}
.Extra ul, .Extra ol{padding:0px; margin:0px}

Add the code in red to the CSS, not forgetting the comma and that will close the margin to match Recent Posts and Recent Comments.

A final word. As you know it is not possible to have more than five feed items showing when you use Blogger’s feed widget. At first I thought that I would have to limit Most Commented to five items as well. Then I noticed that most of the entries in Recent Comments take two lines. So, leaving the default number of feeds at ten in Most Commented will not result in a list that is much longer than the other two.

I hope that it works well for you.

Technorati Tags: ,,,

Continue reading "Showing Most Commented or Popular Posts in Blogger"

 

Bookmark and Share

Someone who uses this blog template has tried to put Google AdSense For Search into the search box at the head of this template and come seriously unstuck. So this article is to try to provide an answer to the question posed in the comments section of eBlog Templates.

Paul Antczak
thank,,,
but how to replace google seach in the search box???
i dnt knw abt xml or rss code
teach me T_T…. huhuhu

Google search

Obviously this will be mostly of interest to those of you who use Blogging Pro, but parts may be useful for other bloggers.

I have set up a a test blog to work on it and show how the search box looks but I have not yet added anything else to the template on that site.

When I first looked at this I found that the answer was quite straightforward and it looked quite good in Firefox, which is my main browser. Then I tried it in Internet Explorer 8, and it broke the layout. IE 7 did the same by adding five more characters to the search input box. I have not been able to test it in IE versions earlier than 7 as I do not have access to them.

I chose the default 31 characters and the fit in Firefox was perfect. IE decided to up the number to 36 which immediately dropped the search button below the input box and broke out of the light blue box. So compromises had to be made and it ended up looking a little better in IE, which is what most of your readers will probably be using anyway.

For everyone the usual warning is to save your template first to protect against disasters. Go to Layout>EditHTML and click Download Full Template.

1: Fixing the Broken Search

This section is specific to the commenter with the broken search problem so, if you don’t have this problem you can skip to section 2.

Broken search From looking at the blog source it looks as if the AdSense code has been added in the wrong place and is causing this problem. I obviously can’t see your original template but I suspect that you have done this and added the code I have marked in red.

<b:widget id='HTML35' locked='true' title='Search' type='HTML'>
<b:includable id='main'>
<div class='Search'>
<fieldset>

    <form expr:action='data:blog.homepageUrl + &quot;search&quot;' id='searchform' method='get' name='searchform'>
        <b:if cond='data:title'><legend><data:title/></legend></b:if>
        <div id='search'>
            <input class='keyword' id='s' name='q' type='text'/>
            <div id='buttonsearch'><input alt='Search' class='search' name='submit' src='dhttp://i254.photobucket.com/albums/hh92/eblogtemplates/bloggingpro/transparent.gif' title='Search' type='image'/>
     </div>
            <data:content/>
        </div>   
    </form>
  </fieldset>   
</div>
  <div class='SearchCorner'/>

<form action="http://www.google.co.uk/cse" id="cse-search-box" target="_blank">
  <div>
    <input type="hidden" name="cx" value="partner-pub-4xxxxxxxxxxxxx3:nx**xxx**xa" />
    <input type="hidden" name="ie" value="UTF-8" />
    <input type="text" name="q" size="35" />
    <input type="submit" name="sa" value="Search" />
  </div>
</form>

<script type="text/javascript" src="http://www.google.co.uk/coop/cse/brand?form=cse-search-box&amp;lang=en"></script>

    </b:includable>
</b:widget>
</b:section>
  </div><!-- header-wrapper -->

Before you do anything you need to delete all of the code in red so that you are back to the original search widget, like this:

<b:widget id='HTML35' locked='true' title='Search' type='HTML'>
<b:includable id='main'>
<div class='Search'>
<fieldset>

    <form expr:action='data:blog.homepageUrl + &quot;search&quot;' id='searchform' method='get' name='searchform'>
        <b:if cond='data:title'><legend><data:title/></legend></b:if>
        <div id='search'>
            <input class='keyword' id='s' name='q' type='text'/>
            <div id='buttonsearch'><input alt='Search' class='search' name='submit' src='http://i254.photobucket.com/albums/hh92/eblogtemplates/bloggingpro/transparent.gif' title='Search' type='image'/>
     </div>
            <data:content/>
        </div>   
    </form>
  </fieldset>   
</div>
  <div class='SearchCorner'/>
    </b:includable>
</b:widget>
</b:section>
  </div><!-- header-wrapper -->

Before saving, click preview to make sure there are no error messages. If there are check the above code again and when everything is alright go on to the next section.

2: Decision Time

First of all you have to decide if you want to keep the built in blog search or replace it with Google’s AdSense for Search.

If you want to replace the built in search then go on to section 3.

This article was designed to show how to place Google’s search box in the header instead of the original search. You cannot put both in the space provided in the header as it is a graphic and cannot expand. It was trying to do that which caused the original disaster and led to the first call for help.

If you want both, the best bet is to keep the original search where it is and place your Google search code into one of the sidebars by using Add a Gadget to add an HTML/JavaScript widget. You can call it something like “Search The Web”.

When you log in to your AdSense account you may have to experiment a little to see which settings work best for you.

Another alternative is to place the Google search in the header and move the original site search to the sidebar. That is outside the scope of this article.

3: Get the AdSense Code

AdSense setup Once you have logged in to your AdSense account select the AdSense Setup tab and then select AdSense for search.

On the next page you have several choices to make. The important ones are the “Site Language”,  the “Country or territory for Google domain” and “Your site encoding”.

The first two are entirely your choice but as for the site encoding I suggest that you scroll to the bottom of the list and select Unicode (UTF-8) as this is the encoding used by Blogger as you will see from the first line of the template.

Entire web The “Search Type” selection is up to you but The entire web is probably better than limiting your readers to a few sites unless this is better for you.

“Keywords,” “Safe Search” and “Custom channel” are up to you.

Select watermarked On the next page, in “Look and Feel” it is important that you choose the top selection with the watermark as none of the others will fit into the search box in the header.

If you decided on placing it in a sidebar then the style is your choice.

In “Text Box Length” choose 35 characters then proceed to the next page.

Open results In “Opening of search results page” the choice is yours again depending on your setup but my favourite is to open the  results in a new window as it does not drive the reader away from your blog. Once they have finished their search and closed the window they are back with you.

If you have another site you would like to take your readers to then remember to enter the URL.

I suggest that you do not make any changes to the palette and just leave the default Seaside selected. That is what has been used for the test blog. You can always come back later and edit your choices.

On the final page you submit your choices and then copy the code from the window. Save the code in a text file so that you always come back to it again if necessary.

4: Placing the Code

Now you need to go back to Edit HTML and, with Expand Widget Templates selected find the search widget as below:

<b:widget id='HTML35' locked='true' title='Search' type='HTML'>
<b:includable id='main'>
<div class='Search'>
<fieldset>

    <form expr:action='data:blog.homepageUrl + &quot;search&quot;' id='searchform' method='get' name='searchform'>
        <b:if cond='data:title'><legend><data:title/></legend></b:if>
        <div id='search'>
            <input class='keyword' id='s' name='q' type='text'/>
            <div id='buttonsearch'><input alt='Search' class='search' name='submit' src='http://i254.photobucket.com/albums/hh92/eblogtemplates/bloggingpro/transparent.gif'title='Search' type='image'/>
     </div>
            <data:content/>
        </div>   
    </form>
  </fieldset>
     
</div>
  <div class='SearchCorner'/>
    </b:includable>
</b:widget>
</b:section>
  </div><!-- header-wrapper –> 

Delete the entire fieldset, shown in red. In case you want to revert to the site search it is a good idea to cut the code and paste it into a suitably titled text file for safekeeping.

Copy the Google code from wherever you saved it and paste it as shown in blue. Don’t copy this code as it is for my account and I have blanked the personal identifiers.

<b:widget id='HTML35' locked='true' title='Search' type='HTML'>
<b:includable id='main'>
<div class='Search'>
<div class='GoogleSearch'>
<form action='http://www.google.co.uk/cse' id='cse-search-box' target='_blank'>
  <div>
    <input name='cx' type='hidden' value='partner-pub-4**************3:nxxxxxxxxxa'/>
    <input name='ie' type='hidden' value='UTF-8'/>
    <input name='q' size='35' type='text'/>
    <input name='sa' type='submit' value='Search'/>
  </div>
</form>

<script src='http://www.google.co.uk/coop/cse/brand?form=cse-search-box&amp;lang=en' type='text/javascript'/>
</div>   
</div>
  <div class='SearchCorner'/>
    </b:includable>
</b:widget>
</b:section>
  </div><!-- header-wrapper --> 

Finally for the widget code add the two lines shown in red to create a new class for some extra CSS.

5: And Finally a Little Style

Enter .SearchCorner in your browser’s search/find to locate the following section of the style sheet in the template head, and enter the code in red as shown.

.Search  input.keyword{border:none; background:#fff url(http://i254.photobucket.com/albums/hh92/eblogtemplates/bloggingpro/SearchKeyword.png) no-repeat; padding:4px 0px 5px 8px; width:291px; border:none}

.GoogleSearch{margin:0; padding:15px 0 0 0; text-align:center}

.SearchCorner{position:absolute; background:#fff url(http://i254.photobucket.com/albums/hh92/eblogtemplates/bloggingpro/SearchBkgNone.png) no-repeat; width:9px; height:8px; margin:0px; top:34px; right:-9px}

Last of all; scroll up a few lines until you find this line:

.Search  input{color:#6db6ff; font-size:14px; font-family:'Arial'; letter-spacing:-1px; font-weight:bold}

And change the font-size to 13px as shown in red.

.Search  input{color:#6db6ff; font-size:13px; font-family:'Arial'; letter-spacing:-1px; font-weight:bold}

If you do not change the font size it will break the display in Internet Explorer.

Use preview to check that all is working as expected and if everything works save the template.

I hope that this has been useful and that it solves the problem for the original commenter.

Technorati Tags: ,,,

Continue reading "Using AdSense For Search In Blogging Pro Template"

 

Bookmark and Share

Blogger is constantly improving the way that it works in order to give us a better service. This is great and it means that users can get the best performance out of their Blogger blogs. Unfortunately it does cause problems for those of us who choose to make our blogs a little more individual by using third party templates.

Some of these problems include the inability to save the template once it is uploaded because the dreaded and totally unfathomable BX error window pops up and leaves a message that no one can understand.

Sometimes the template starts to save and you confirm that you want to replace the widgets in the list. Then along comes the message:

The new widget id "Recent-Posts-Widget2" is invalid for type: Feed
or
The new widget id "ads2" is invalid for type: HTML
or
The new widget id "search" is invalid for type: HTML

and nothing seems to solve this.

So, let’s look at a cure.

The Invalid For Type Error

First, the invalid for type error. This is caused because template designers like to give their widgets ids which tell you exactly what they are. This used to work and it was a good idea as it told you exactly what the next section of code was for. In the recent past I successfully uploaded a template with ids of this sort. I would not be able to upload this template again without correcting the widget ids.

Before you attempt to upload a new template it is best to open the XML template in a good text editor, preferably with a search function. Search for widget id and check that the widget id matches the type every time.

<b:widget id='Profile1' locked='false' title='About Me' type='Profile'>
or
<b:widget id='Feed2' locked='false' title='Recent Comments' type='Feed'>
or
<b:widget id='HTML11' locked='true' title='Search' type='HTML'>

If it does not match then change it and if there is more than one of a type add a number, with no gap between the id and number. Remember to give each id of the same type a unique number or Blogger will give you another error message that you cannot have two of the type with the same number.

If you successfully uploaded the template before you changed the ids then as you get each "invalid for type" error message you can just use your browsers search/find function to look for the incorrect id and change it to match the type, click save and confirm if asked and hope that no more errors pop up.

I successfully uploaded the Daya Earth template to a test blog after correcting the widget ids in a text editor. I changed nothing else in the template.

Look below for more information on Recent Posts and Recent Comment widgets.

The Dreaded BX Error

If you get the dreaded BX error window you may be able to fix this by opening your template code and increasing the widget id number by one (1) for every id. This has worked quite successfully in the past.

Rather than repeat everything that has already been very well explained by Amanda Fazani I suggest that you read this post on Blogger Buster.

Some people have done this and found that this has not worked. If increasing the numbers again still does not work then a drastic course of action is required.

First make sure that you have downloaded your original template and saved it so that if all else fails you can restore it. Go to Layout>Choose New Template and choose a simple template such as Minima and click Save Template. Then go Layouts>Page Elements and delete every gadget you can by clicking on Edit, then Remove, in the window which opens.

The upload really should work now. If not then try clearing your browsers cache to get rid of any saved pages which may be popping up. Better still close your browser and use CCleaner, which is both free and excellent. After cleaning open up your Dashboard and try uploading again.

If none of the drastic action works then try a nice cup of tea or find a brick wall and beat your head on it.

If you have concerns about losing some of your favourite widgets when changing templates then have a look at another of Amanda Fazani’s articles on transferring your widgets.

Recent Posts and Recent Comments Widgets.

The nice people at Blogger have changed the way that their feeds work. Because of this the Recent Comments and Recent Posts widgets included in most third party templates do not work. We cannot blame the template designers for this as their widgets worked perfectly when they designed the templates.

I had one template (this one in fact) which immediately threw up the Blank Configure Feed Problem as soon as I tried to configure my feeds. This article, which is quite specific to this template, is still the most popular article on the blog as so many have had this problem.

If you have successfully uploaded your new template you will find that the Recent Comments and Recent Posts do not show as they are awaiting your feed URLs. But when you click on Edit for each of the widgets you will get the blank window as shown in The Blank Configure Feed Problem.

There is nothing you can do, not even delete it, as apart from the Help button there is nothing else there.

Add Feed What you need to do is use the Add a Gadget from the appropriate column to add a feed widget for each of the feeds. One for Recent Posts and another for Recent comments.

For Recent Posts enter the following URL, remembering to replace YOURBLOGNAME with your blog’s name.

http://YOURBLOGNAME.blogspot.com/feeds/posts/default

Feed URL

Click Continue then replace whatever pops up in the Title box with Recent Posts.

Recent Posts

Save it then position it where you want it to show then do exactly the same to add your Recent Comments widget. This time the URL must be:

http://YOURBLOGNAME.blogspot.com/feeds/comments/default

As for the original feeds: They are still there but not working. You can only get rid of them by looking for them in the HTML and deleting them. The code for the new feeds is much more compact than the old code so the old code will look like this:

<b:widget id='Feed1' locked='false' title='Recent Posts' type='Feed'>
<b:includable id='main'>
        <b:if cond='data:title'><h2><data:title/></h2></b:if>
        <div class='widget-content'>
            <ul class='comments' expr:id='data:widget.instanceId + &quot;_feedItemListDisplay&quot;'>
                <b:loop values='data:feedData.items' var='i'>
                    <li>
                        <span class='item-title'>
                            <a expr:href='data:i.alternate.href'>
                                <data:i.title/>
                            </a>
                        </span>
                        <b:if cond='data:showItemDate'>
                            <b:if cond='data:i.str_published != &quot;&quot;'>
                                <span class='item-date'>
                                    &#160;-&#160;<data:i.str_published/>
                                </span>
                            </b:if>
                        </b:if>
                        <b:if cond='data:showItemAuthor'>
                            <b:if cond='data:i.author != &quot;&quot;'>
                                <span class='item-author'>
                                    &#160;-&#160;<data:i.author/>
                                </span>
                            </b:if>
                        </b:if>
                    </li>
                </b:loop>
            </ul>
        </div>
    </b:includable>
</b:widget>

Make sure that you remove everything from the opening b:widget tag to the closing /b:widget tag including both tags. The above is for the original Recent Posts, the Recent Comments will look very similar.

Handy tip 1: If, in Layout>Page Elements you place your new widgets directly above each of the old widgets you can use your browser’s search/find to look for recent. You will find the new compact code first and the code to be removed will be directly below it.

Handy tip 2: If you know that your template has the old code delete it in your text editor before uploading the template.

I hope that this post has helped you to overcome your uploading problems.

Continue reading "Fixing Problems Uploading Templates to Blogger"

 

Bookmark and Share

Top of Page

Delivered by FeedBurner


Search Amazon UK

Search Amazon USA


Recent Posts

Recent Comments

Popular Posts