Showing posts with label blogger tips and tricks. Show all posts
Showing posts with label blogger tips and tricks. Show all posts

Sunday, June 5, 2011

Dynamic Views in Blogger News

At the end of March, Blogger has introduced something they never offered before, something entirely new, entirely cool, and undoubtedly – promising. What I am talking about? Dynamic Views.

This new feature allows unthinkable earlier ability to present your content in several new and exciting ways. Google has introduced 5 new dynamic templates in Blogger. Now, you can view any Blogger blog as a Flipcard, Mosaic, Sidebar, Snapshot and Timeslide. No need for any additional changes for your existing template, which is just an extra way to see what you have already. Dynamic views are different versions of your blog, in some way, different ways to navigate your blog, without changing your template, using Ajax, CSS 3 and HTML 5.

What is all About?


Who can use Dynamic View?

These dynamic views will work on your blog if all of the following are true:
·         Your blog is public. Your readers don’t need to sign in to view your blog.
·         Your blog has feeds fully enabled. In the Settings | Site feed tab, you have enabled either Full or Jump Break for your Post Feed.
·         You have not disabled dynamic views. In the Setting | Formatting tab, the option for Enable Dynamic Views is set to Yes.

How to use Dynamic Views?

To try these views on your own blog, simply add “/view” to the end of the blog URL—for example, http://depressivedisorder.blogspot.com/view

Here are several screenshots in different templates:

Flipcard


Image and video hosting by TinyPic

Mosaic


Image and video hosting by TinyPic

Sidebar


Image and video hosting by TinyPic

Snapshot


Image and video hosting by TinyPic

Timeslide


Image and video hosting by TinyPic

Main Benefits

  • Infinite scrolling: read more posts without having to reload or click to a second page
  • New layouts: different views suited to different types of blogs
  • Speed: download images as you view them, not all at once in advance
  • Interactivity: there are now more ways to experience and engage with blog content
Known Limitations

·         Please note that these views do not currently support many of the features your original blog may have, including displaying advertisements.
·         The older browsers do not support the feature.

Sources and Additional Information:



Sunday, May 22, 2011

How to make links open in new windows for Blogger blog?

If you design your blogs with lots of links to other blogs and web sites, you probably like to make the links to the other blogs and web sites open in a new browser tab or window (depending upon reader preference). That helps with reader retention (for you), and increases convenience (for your readers).

Image and video hosting by TinyPic

Unfortunately, in all of the Blogger GUIs, there's no selection for "Make links open in new window". If you want all links in your blog to open in a new window, you can do this with a simple template change as described below. If you want specific links to open in a new window, you will have to manually code each link individually.

To make all links open in new window is amazingly simple. Just sign into Blogger DASHBOARD > DESIGN > EDIT HTML to open template editor

Use keyboard shortcut ctrl+F to find <head> and immediately after that, add a single line
<base target='_blank' />

so that it become

<head>
<base target='_blank' />


Save the edited template and all links in your blog will now open in new tabs or windows.

If you prefer selective links not to open in new window/tab but to open in the same window, as you have now, add the attribute target="_self" for those links you want to open in the same window/tab.

Blogger who have multiple internal links, might not find the presented solution as acceptable since they might not like the idea to open ALL links in a new window, or to edit each link manually. The target is open in the new window just external links from your blog (what happens if the user clicks on your archives, or on the title, or on comment links, or on a javascript link?)
Here is a vanilla javascript solution, that you want to paste into your template just before the end of the body (if you're old-style template), or paste into a javascript widget:

Replace XXXXXX with the appropriate URL prefix.

<!-- code for turning all non-blog links to new page links -->
<script type="text/javascript" language="javascript">
   var arr = document.getElementsByTagName("a");  //get all links in the page
   for(var i = 0; i < arr.length; i++)
   {
      if(arr[i].href.indexOf("XXXXXX.blogspot") < 0 //not links that are 'inside' blog
         && arr[i].href.indexOf("javascript:") < 0) //not javascript links
         arr[i].target = "_blank";
   } 




Wednesday, November 10, 2010

How to Highlight Author Comment in Blogspot Blog?

This trick is to give a Highlight Author Comment. This will make the blog's owner comments looks different from the visitors’ comments. It is very useful and interesting blogger hack tips. You can see the example in my blog. Here is what to do to make a "Highlight Author Comment" effect in Blogspot.

Credit for the trick goes to Trick Tips Blogger.


1. Login to blogger, then choose "Layout --> Edit HTML". Don't forget to backup your template first.
2. Check the "Expand Widget Templates" box.
3. Copy this script and put it before ]]></b:skin> or copy to your CSS area.


.comment-body-author {
background: #E6E6E6; /* Background color*/
color: #000; /* Text color*/
border-top: 1px dotted #223344;border-bottom: 1px dotted #223344;border-left: 1px dotted #223344;border-right: 1px dotted #223344;
margin:0;
padding:0 0 0 20px; /* Posotion*/
}

4. Then find this code:
<dl id='comments-block'>
<b:loop values='data:post.comments' var='comment'>
<dt class='comment-author' expr:id='"comment-" + data:comment.id'>
<a expr:name='"comment-" + data:comment.id'/>
<b:if cond='data:comment.authorUrl'>
<a expr:href='data:comment.authorUrl' rel='nofollow'><data:comment.author/></a>
<b:else/>
<data:comment.author/>
</b:if>
said...
</dt>

<b:if cond='data:comment.author == data:post.author'>
<dd class='comment-body-author'>
<p><data:comment.body/></p>
</dd>
<b:else/>


<dd class='comment-body'>
<b:if cond='data:comment.isDeleted'>
<span class='deleted-comment'><data:comment.body/></span>
<b:else/>
<p><data:comment.body/></p>
</b:if>
</dd>

</b:if>

<dd class='comment-footer'>
<span class='comment-timestamp'>
<a expr:href='"#comment-" + data:comment.id' title='comment permalink'>
<data:comment.timestamp/>
</a>
<b:include data='comment' name='commentDeleteIcon'/>
</span>
</dd>
</b:loop>
</dl>

5. The red color text is the code that you have to add to your script. The position must be right.
6. And then save your template.


Monday, May 10, 2010

How you can post to your Blogger Blog via email?

Let’s face it: posting via email to your Blogger blog might not be the most convenient way of updating your blog. However, you can think about different situations, when this feature would be useful. For example you cannot access your Blogger account for some reason, or your favorite third party posting application has crashed, or you are on the go, and your phone does not have the data package or necessary feature to make mobile posts. Anyway, be aware that there is a simple method of doing it by sending email message.

The task can be divided in two parts:


  1. Registering you email account for posting on you blog.

By default this email posting feature is turned off on all new blogs but if you want to enable this you need to follow the instructions given below.

·         Login to blogger.com and choose the blog (if you have multiple blogs in your account) for which you want to enable email posting.

·         Click on small envelope icon beside blog's title. See image given below:

Image and video hosting by TinyPic


·         On a pop-up set a secret word of your choice. See image given below:

Image and video hosting by TinyPic

·         Now Click on the Save Button, After setting up a secret word would make an email address like this:

YourUserName.YourSecretWord.blogger.com

Keep the email address secret as this would be a public email address and anyone from anywhere is able to send an email automatically publishing it to your blog.  Keep it in safe place on your records or just remember it.

Be sure to specify whether or not you prefer your email posts to publish automatically. If this option is not checked, then your posts will be saved on your account but will not appear on your blog until you log in to Blogger.com and publish them yourself.

Alternatively, in Settings | Email you can create a Mail-to-Blogger address which you will use to send posts via email to your blog:

Image and video hosting by TinyPic



  


     2.      Publishing to your blog via email message.



  •      Create a new email from any email address.
  •      Add your secret email address of your blog in recipient's address box.
  •      Put in meaningful Subject because that would be the title of the post.
  •      Write the text in the email body and that would be the text of the post. You can also attach images in your posts by attaching the images in email as attachments.
  •      Sometimes email programs append text to the bottom of each sent message; to make sure this garbage doesn't get posted to your blog, put #end at the end of your post.

Notes:
There are two formats that emails generally use: plain text and HTML. Many email clients will have an option to switch between the two modes. Here's what happens when you use either of these formats in Mail-to-Blogger:

Plain Text: Everything is published on your blog exactly as you type it. That is, entering <strong> in your post will not make text bold. The <> brackets will be escaped and your published blog will actually display <strong> as text.

HTML: All HTML is interpreted as HTML. If you use your email client's formatting functions to make text bold, you may not see the <strong> tag, but it will be included in your post and the text will appear bold on your blog. If you want to enter code manually, you may need to use an "edit source code" mode or something similar in your email client.

Sources and Additional Information:


Tuesday, August 18, 2009

How to Make Drop-Down Labels Menu in Blogger?

If you host your blog on the Blogger (blogspot) platform, and you have significant number of labels on your sidebar, you might be looking for a suitable solution to show them, but also save the expensive space for other elements. These two tasks can be achieved by using the option of displaying your labels in a simple drop-down menu. Many bloggers already use drop-down option for long lists of labels (categories), which minimizes clutter and enables information to be displayed in the sidebar neatly.

While Blogger offers a dropdown menu option for the Archives widget, you will not be able to find an option to do the same for your labels. In this post, we will review two ways you can use to convert your regular Label list into a drop-down list.

Method 1

1. Template Backup. As usual, when you just think about making any changes to the template code, it is strongly recommended to make a complete back up of your existing template. This ensures you can easily roll back and restore your current, working template if you make any mistake.

To make a back up of your current template, go to Layout > Edit HTML in your Blogger dashboard and click the “Download Full Template” link near the top of the page. This will offer the option to save your current Blogger template as an XML file to your local computer. Be sure to save this file in a location you can easily find later.

2. Ensure you have a “Labels” widget in your Blogger template. If you do not have a Labels widget activated in your template, go to Layout>Page Elements and add a Labels widget using the “Add a Gadget” link above your sidebar. Definitely, your posts should be labeled as well to transfer the related content to the activated widget.

3. Go to Layout > Edit HTML in your Blogger dashboard. This time, DO NOT check the "Expand Widget Templates" checkbox!

4. Search for the following code (note that the name of the label in your template might be slightly different):
<b:widget id='Label1' locked='false' title='Labels' type='Label'>

5. Replace the above code, with this:
<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>
<br/>

<select onchange='location=this.options[this.selectedIndex].value;' style='width:200px'>
<option>Labels</option>
<b:loop values='data:labels' var='label'>
<option expr:value='data:label.url'><data:label.name/>
</option>
</b:loop>
</select>

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

6. Modifying the Widget. To alter the phrase “Choose a label to view” which is visible when the drop down menu is contracted, you will need to go to the Layout>Edit HTML page of your Blogger dashboard and check the “Expand widget templates” box. Then search for this phrase in your template code. Simply alter the wording of this phrase to something more suitable for your blog, being careful not to alter any of the surrounding code.

To clarify, here is the line of code where adjustments will be made. The text which can be altered is highlighted in red:
<select onchange='location=this.options[this.selectedIndex].value;'>
<option>Choose a Label to View</option>
<b:loop values='data:labels' var='label'>



Method 2
As you understand, the first steps of the code modification will be similar to the method 1, so I will skip the introduction, which you need to backup the template first before doing any modifications.

3. Go to Layout > Edit HTML in your Blogger dashboard. This time, CHECK the "Expand Widget Templates" checkbox!

4. Now look for the following code in your template

<b:widget id='Label1' locked='false' title='Labels' type='Label'>
<b:includable id='main'>
<b:if cond='data:title'>
<h2><data:title/></h2>
</b:if>
<div class='widget-content'>

 <ul>
   <b:loop values='data:labels' var='label'>
     <li>
       <b:if cond='data:blog.url == data:label.url'>
         <data:label.name/>
       <b:else/>
         <a expr:href='data:label.url'><data:label.name/></a>
       </b:if>
       (<data:label.count/>)
     </li>
   </b:loop>
   </ul>


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

5.
Note that you need to replace only the part of the displayed code IN BLUE. All the remaining text is provided for easy reference. So, replace the text IN BLUE with the text IN RED below:

<br />
<select onchange='location=this.options[this.selectedIndex].value;'>
<option>Select a label</option>
<b:loop values='data:labels' var='label'>
   <option expr:value='data:label.url'><data:label.name/>
      (<data:label.count/>)
   </option>
</b:loop>
</select>


No matter, which method you choose, at the end of the performed modification save the template and back it up with a new name. Do not overwrite the backup file you created at the beginning, since you want to try the option for some time and decide you do not see any problems or performance drawbacks.


Sources and Additional Information:

Friday, August 7, 2009

Numbering your Comments in the Blogger Blog

I am trying to keep my blogs in the simple informational style. That means, I am looking for interesting information on the Web and I am sharing with you. In most cases, it is a one-directional process, and I do not get a lot of comments. However, if you blog in more communicational and controversial manner, amount of comments you receive could be huge. If that is the case, the comments numbering might be an excellent idea.

Possible Advantages:
* It is a nice way of differencing/identifying each comment (it’s a great feature for giveaway posts!).
* It allows you to get the permalink of each comment, and this may work for future references (e.g.: “You should read this comment [URL goes here], I found it very interesting.”)
* Indispensible for design purposes.

Possible disadvantages and limitations:
* If your comments are paginated, the counter will reset in each comment page. In Blogger, comments are paginated if they surpass the 200.
* The process requires code modification in several places, so that is not recommended for the beginner bloggers.

Results:

Image and video hosting by TinyPic


Steps involved in implementing this trick
1. Login to your Blogger Dashboard
2. Go to Template >Edit HTML
3. Choose to expand your Widget templates.
4. Find this line of Code
<dl id='comments-block'>
and replace it with
<dl id='comments-block'>
<script type='text/javascript'>var CommentsCounter=0;</script>
5. Now find this line of code
<dt expr:class='&quot;comment-author &quot; + data:comment.authorClass' expr:id='data:comment.anchorName'>
and replace it with
<dt expr:class='&quot;comment-author &quot; + data:comment.authorClass' expr:id='data:comment.anchorName' style='clear: both;'>
6. Now find this line of code
<data:commentPostedByMsg/>
and replace it with
<data:commentPostedByMsg/>
<span class='numberingcomments' style='float: right; font-size: 20px;'>
<a rel='nofollow' expr:href='data:comment.url' title='Comment Link' style='text-decoration:none'>
<script type='text/javascript'>
CommentsCounter=CommentsCounter+1;
document.write(CommentsCounter);
</script>
</a>
</span>

So you should have it working in just 3 replacement steps. If everything went well, you should now have a numbered commenting system on your blog.




Sources and Additional Information: