Showing posts with label Blogging. Show all posts
Showing posts with label Blogging. Show all posts

Saturday, June 26, 2010

Open all anchor links in new window

I believe this post is going to be very interesting to many people who read this post. Because the first question is what is the need to open links in new window? Is it a big deal to open links in new window? What are the advantages? Why we need to implement this in our sites or blogs?

Take my blog for example.  I have write big posts some times and place more links. I want the user to see the links to be opened in new windows as they are still reading my pages. If the link opened in the same page, then it will be a problem to go and come back and start reading from the position they were. That won't give good experience. I want them to be stayed on my blog page and open all the links in new window. So that user is always on my blog page and if they wants then they can move across pages. It's not bad at all.

How many ways are there to implement this?
1. Make all links in web page open in new window.
2. Only some part of the web page links will be opened in new window.

Thursday, June 17, 2010

Read More link to blogger posts without HTML changes

This is really a very helpful post I believe. Most of the times I write long posts and explain each and every part in the solution I found. So, I really need to show only specific length of each post and add a link called Read More at the end of the post on the blog home page. So, that users get chance to see more posts and look more posts. And the loading of the main page will be faster as the content is less. So, there are lot of advantages by placing the read more link on the home page for each post.

I have tried so many solutions and didn't impress by any of them. Some of them are disturbing my HTML as after specific characters add the read more link. Another option is, strip the HTML from the post and add the read more link after specific characters, but that also removes the blog styles for P tag, div Tag or any other custom styles we have applied. Sp, to get this working either we need to change the Blog HTML or add bunch of Javascript code to do that. This is not very easy to maintain and useful. So, what to do, can't I do it? So, after a very long research and read so much I want to give better user experience to my users to read what they want on my blog. Finally came up with a nice and simple solution which do not need much HTML changes or customization.

Thursday, November 5, 2009

Add Dotnetshoutout button in all blog posts blogger blogs

This is another blog tip I want to tell you as I just added it recently to my blog. I think, you have seen my post on "how to add dotnetkicks kick it icon to all posts in blogger blog". So, by taking that as initiative created this code for DotnetShoutout and working great.

How to add it?

  • Go to edit html option of your blog, by login into your blogger blog and under layout and then Edit HTML.
  • Download full template before start editing the html code.
  • Now check the option "Expand Widget Templates".
  • Search in your browser for the keyword "data:post.body".
  • I think you found one instance as "<data:post.body/>".
  • Please add the below code exactly below the line you just found.

<a expr:href='&quot;http://dotnetshoutout.com/Submit?url=&quot; + data:post.url + &quot;&amp;title=&quot; + data:post.title' expr:id='data:widget.instanceId + &quot;_kickit&quot;' rel='nofollow' rev='vote-for'> <img alt='Shout it' expr:src='&quot;http://dotnetshoutout.com/image.axd?url=&quot; + data:post.url' style='border:0px'/></a>

  • Save the template and just view your blog now.
  • I think, you will see the Shout it icon under each blog post body. Now you can add any formatting code to make it more stylish by adding p tags, css to look good on your page and positioning.

Hope it helps!!! Do you like this post?

Wednesday, September 30, 2009

Dotnetkicks.com kick it for blogger blogspot blogs

I know most of bloggers are searching for this…. If you are writing ASP.NET related posts in your blog then you should need it to publish your posts to dotnetkicks.com. So, here is a nice tip to add kick it for your blogspot blogs.
  • Go to your blog. After you sign in, in admin section you have a tab named "layout".
  • Under layout tab select "Edit HTML".
  • Before you do any changes, please download full template.
  • Then tick the checkbox "Expand Widget Templates."
  • In your browser, press Control+F and find the keyword "data:post.body".
  • Go to that line [<data:post.body/>] and hit enter and add the below code as is.
<p><a expr:href='&quot;http://www.dotnetkicks.com/kick/?url=&quot; + data:post.url'><img alt='kick it on DotNetKicks.com' border='0' expr:src='&quot;http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=&quot; + data:post.url'/></a></p>

Note: expr: is the syntax for expression and it will execute by blogger code and replace the correct values before send response to browser.
  • Now, save the template and view blog for the changes.
  • I think, you are smiling now by seeing kick it icon on your blog for each post.
  • Enjoy!!!
Love to hear comments from you. Is this helpful?

Saturday, June 27, 2009

How to submit all posts to Google webmasters for better indexing all the posts in my blog?

You all know that the Blogger’s atom.xml file will burn only the top 25 results in the feed. This is the file usually we will submit to the Google webmaster tool to index our blog posts. But because it only returns top 25, Google crawler indexes only these 25 and it don’t care about the posts which are older than 25. So, there you are loosing your visitors to see those posts because they won’t be show up in the search results  because of not crawled well. So how to solve this issue? and how to submit all posts to Google webmasters?

Solution:

Before you proceed, please check the below posts once for the better understanding.

  • How to submit your blogger blog site feed to Google webmasters if you enable the option Post Feed redirection url. View here.
  • How to see all posts in the atom.xml feed instead of getting only top 25? View here.

Once you read above posts you will get complete idea of how to solve the problem.

  • Open Google webmaster site and submit the below url
  1. For submitting the top 50 blog feed results then use

   atom.xml?redirect=false&start-index=1&max-results=50

  1. For submitting from 50 to 100 results then use

         atom.xml?redirect=false&start-index=50&max-results=100

So you can submit all the posts to Google webmasters to crawl all the posts instead of only top 25. How good it is?

Bloggers feed is showing only 25 posts, how to get all?

This is the question in my mind from long time that why feed is not showing all the posts when I open atom.xml. It always get me the top 25 posts in the feed. So how to get all the posts?

Solution:

  • We need to use certain querystring parameters to solve the issue to get all the posts.
  1. start-index : Which tells to the blogger feed generator that starts from this post.
  2. max-results : Which tells to the blogger feed generator that the number of maximum results count from the start index.
  3. redirect : Which is not actually needed. If you enabled post feed redirection then only we need this. But, better to keep this always in the feed url. You can find the more information about it here.

How to use:

After the atom.xml feed url, append the below querystrng url.

?redirect=false&start-index=1&max-results=50

For testing you can browse my feed http://praveenbattula.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=50

Which will burn you the top 50 posts in the feed. Actually we get top 25 only by default, but from the solution I told you, which will return how many posts you want.

For getting top 100 results use this querystring url

?redirect=false&start-index=1&max-results=100

For getting the results between 50 to 100, use this

?redirect=false&start-index=50&max-results=100

You can give any value to the parameters start-index and max-results to get that many results…

Happy Blogging.

How to submit blogspot feed to Google webmaster where feedburner feed is enabled in blogspot blog

I enabled the option Post Feed redirection url in my blog settings. From the time I did that Google webmaster tool is started giving the error "URL not allowed". But I need to enable the post feed redirection to Feedburner instead of general atom.xml feed. So how to solve this problem? After read the Google blog documentation found some attributes how to solve this issue.

For my blog the atom/feed url is http://praveenbattula.blogspot.com/atom.xml. When I type this, it will redirect to my feedburner url http://feeds2.feedburner.com/praveenbattula. So when I submit the atom.xml in the Google webmaster it’s not taking this and gives me the error "URL not allowed" because of the redirection. So finally I understood that redirection is the problem.

If you want to use custom redirected feed like FeedBurner then you need to use the "redirect" querystring parameter to the url of your feed, which stops the redirection.

atom.xml?redirect=false

So, when I use the url http://praveenbattula.blogspot.com/atom.xml?redirect=false i always see the message "successfully crawled" in Google webmaster tool.

So except in Google webmaster tool I don’t use the redirect querystring. So, all users will see my customized feedburner feed, only webmaster crawler see my atom.xml feed. How nice it is….

Nice tip!!!!