Showing posts with label Blogger. Show all posts
Showing posts with label Blogger. Show all posts

Saturday, September 27, 2008

Google Blog


Insights from Googlers into our products, technology, and the Google culture.
http://googleblog.blogspot.com/

Google's views on government, policy and politics.
http://googlepublicpolicy.blogspot.com/

Macs inside Google.
http://googlemac.blogspot.com/

The latest news and insights from Google on security and safety on the Internet.
http://googleonlinesecurity.blogspot.com/

News about Google's Open Source projects and programs.
http://google-opensource.blogspot.com/

The latest news on Google Research.
http://googleresearch.blogspot.com/

Google news and updates especially for students.
http://googleforstudents.blogspot.com/

If it ain't broke, you're not trying hard enough.
http://googletesting.blogspot.com/

News and notes from Google's philanthropic arm.
http://blog.google.org/

Recharge a Car, Recharge the Grid, Recharge the Planet.
http://rechargeit.blogspot.com/

Sunday, July 13, 2008

How can I import Wordpress to blogger

Blogger and WordPress One had to copy and paste each post individually from a non-Blogger blog to a Blogger blog. Those days are over now since Blogger has introduced import-export facility available at the moment only through Blogger-in-Draft.
You can import posts and comments from any blogging platform which gives you ability to export your blog as an XML file. This is how to do it from Wordpress to Blogger........

EXOPRT FROM WORDPRESS


Login to your Wordpress blog (Site Admin) :
http://MYBLOG.wordpress.com/wp-admin/
Click the 'Manage' link at the top.
Click the 'Export' subtab of the Manage tab.
You can choose to export posts from a single author or from all authors.
Click 'Download Export File'.
Click Save in the popup window.
Choose a location on your disk and click Save in the explorer window.
An XML file is saved on your disk. Remember the location where it is saved.

IMPORT TO BLOGGER


Login at Blogger in Draft : http://draft.blogger.com.
Click 'Create a Blog' link on Dashboard.
Under Advanced Options, click the Import Blog Tool link.
Click 'Browse' button.
Explorer window will open.
Navigate to where you saved the XML file exported from Wordpress.
Click on the file to choose it.
Click 'Open' in the explorer window.
Type in the Word Verification letters.
Click Upload arrow at the bottom.

IMPORT TO EXISTING BLOG


Login at Blogger in Draft as before.
Click Settings link under the Blog title.
Click Import Blog link under Blog Tools on Basic subtab.
Follow same steps to upload the XML file exported from Wordpress.
Check the box next to Automatically publish all imported posts before you click Import Blog or else you will have to publish them separately afterwards.
IMPORTANT NOTE : This feature is at present offered only from Blogger in Draft but soon after all the bugs have been ironed out you will be able to do this directly from Blogger.com.

Source:betabloggerfordummies.blogspot.com

Saturday, July 12, 2008

How can add Myspace Layouts to Blogger Blogs.

myspace_layout If you have a Myspace site and want your Blogger blog to be customized with the same look you can easily put your Myspace Layout on top of your Blog Layout. See picture of Blogger blog with a Myspace Layout on it below :

This is for Blogger blogs with Layout Templates. Those blogs with Classic Template should first Upgrade to Layouts Template...............

LOAD THE MINIMA LAYOUT

The first step is to load the Minima Layout Template. This is because if your original Blogger Layout contains graphic images they will interfere with the Myspace Layouts which contain lots of graphics and prevent them from displaying properly.
To do this first BACKUP WIDGETS TEMPLATE DATA. When you change Layouts your original widgets are deleted and have to be added later after loading the new layout. You can also use this method to keep widgets and change Layouts Template.
Login at Blogger.com and click on Layout link on Dashboard. On Page Elements tab which opens click on 'Pick New Template' subtab of Template tab. Select the radio button for the Miima Template and click Save Template button at top.
The Minima Template is now loaded. Now add in the widgets code from the backup saved in the paragraph above. Paste the code in Html Page Elements.
LOAD MYSPACE LAYOUT

To choose a Myspace Layout just Google for it. Go to the sites returned in the search results and choose the Layout you like. Copy the code for the Myspace Layout which is provided below the thumbnail preview. If you already have a Myspace Layout copy the code from the About Me box after login to your Myspace site.
Login at Blogger.com and click 'Layout' link on Dashboard. On the Page Elements tab click on the 'Add Page Elements' link in the top of the left sidebar. In the popup window choose Html/Javascript Page Element. In the contents window paste the whole code which you had copied of the Myspace Layout. DO NOT ADD A TITLE. Save.
FINE TUNING LAYOUT

To fine tune the Layout switch to the Fonts and Colors subtab of Template tab. The Minima Template has dark fonts which you may need to make lighter if the Myspace Layout is dark. You can do this on this tab. Also you can adjust the background color so that it blends into the Myspace Layout. After previewing and making changes save them.
View Blog. Enjoy your Blogger blog with the Myspace Layout!!

Easy backup your blog.Easy data export and import

draft_blogger Blog Backup has always been a bit of a problem for bloggers ever since the advent of the New Blogger. In Classic Blogger it was easy by using the Httrack utility from httrack.com.
In the new Blogger data was separated from template/layouts. XML was introduced. Hence one could backup blog by saving each post via browser or by using feeds. Now with Blogger introducing import-export facilty backup has become easier..........
Here are the steps to backup your blog :
1. Login at Blogger in Draft : http://draft.blogger.com/home. Soon this feature will be out of draft (testing) phase and you will be able to login at Blogger.com to backup your blog.
2. Go to Settings---->Basic----->Blog Tools----->Click Export Blog link.
3. Click the Export Blog button.
4. In popup window click Save.
5. In explorer window you can rename the file and choose location where to save it on disk. It is saved as an XML file.
6. NOTE : You can use this file to restore the blog usng the Import Blog feature. This feature to restore blogs was not available before.

Thursday, July 10, 2008

How Can I Change Atom to RSS in Blogger

At the bottom of your blogger page you'll see a line that says something like

Subscribe to: Posts (Atom)

or
Subscribe to: Post Comments (Atom)

depending on the specific type of page you're viewing (index, permalink, search, label, etc.)

If you'd like to change this to RSS then first go to Template -> Edit HTML, check the checkbox for 'Expand Widget Templates' and find the following section
<b:includable id='feedLinksBody' var='links'>
<div class='feed-links'>
<data:feedLinksMsg/>
<b:loop values='data:links' var='f'>
<a class='feed-link' expr:href='data:f.url' expr:type='data:f.mimeType' target='_blank'><data:f.name/> (<data:f.feedType/>)</a>
</b:loop>
</div>
</b:includable>



From how it's setup it looks like there should be an option to choose which type of feed you want to use, but unfortunately they either haven't added that option yet or have no plans to do so. So we have to make some manual edits instead.





Just replace the code above with the following




<b:includable id='feedLinksBody' var='links'>
<div class='feed-links'>
<data:feedLinksMsg/>
<b:loop values='data:links' var='f'>
<a class='feed-link' expr:href='data:f.url + "?alt=rss"' type='application/rss+xml' target='_blank'><data:f.name/> (RSS)</a>
</b:loop>
</div>
</b:includable>


Tuesday, July 8, 2008

How to set Blogger Calendar Archive

Blogger Archive Calendar



This is for New Blogger using Layouts templates only (blogspot or custom domain). Classic Templates not supported.

As with any template modifications, always make a backup before preceding!

Also, feeds for posts must be enabled in your settings (Blogger>Dashboard>Settings>Site Feed> Post Feed can either be set at Full or Short). Private blogs do not have feeds, so they are not supported.

Step #1
Go to Template>Edit HTML. Leave the Expand Widget Templates box UNCHECKED (default)

This code will replace your Archive widget. Scroll down and find yours in your template.

Copy the following code, then highlight the archive widget as shown and replace it with a paste.


<b:widget id='BlogArchive1' locked='false' title='Blog Archive' type='BlogArchive'>
<b:includable id='main'>
  <b:if cond='data:title'>
    <h2><data:title/></h2>
  </b:if>
  <div class='widget-content'>
  <div id='ArchiveList'>
  <div expr:id='data:widget.instanceId + "_ArchiveList"'>
    <b:if cond='data:style == "HIERARCHY"'>
     <b:include data='data' name='interval'/>
    </b:if>
    <b:if cond='data:style == "FLAT"'>
      <b:include data='data' name='flat'/>
    </b:if>
    <b:if cond='data:style == "MENU"'>
      <b:include data='data' name='menu'/>
    </b:if>
  </div>
  </div>
  <b:include name='quickedit'/>
  </div>
</b:includable>
<b:includable id='toggle' var='interval'>
  <!-- Toggle not needed for Calendar -->
</b:includable>
<b:includable id='flat' var='data'>
<div id='bloggerCalendarList'>
  <ul>
    <b:loop values='data:data' var='i'>
      <li class='archivedate'>
        <a expr:href='data:i.url'><data:i.name/></a> (<data:i.post-count/>)
      </li>
    </b:loop>
  </ul>
</div>

<div id='blogger_calendar' style='display:none'>
<table id='bcalendar'><caption id='bcaption'>

</caption>
<!-- Table Header -->
<thead id='bcHead'></thead>
<!-- Table Footer -->

<!-- Table Body -->
<tbody><tr><td id='cell1'> </td><td id='cell2'> </td><td id='cell3'> </td><td id='cell4'> </td><td id='cell5'> </td><td id='cell6'> </td><td id='cell7'> </td></tr>
<tr><td id='cell8'> </td><td id='cell9'> </td><td id='cell10'> </td><td id='cell11'> </td><td id='cell12'> </td><td id='cell13'> </td><td id='cell14'> </td></tr>
<tr><td id='cell15'> </td><td id='cell16'> </td><td id='cell17'> </td><td id='cell18'> </td><td id='cell19'> </td><td id='cell20'> </td><td id='cell21'> </td></tr>
<tr><td id='cell22'> </td><td id='cell23'> </td><td id='cell24'> </td><td id='cell25'> </td><td id='cell26'> </td><td id='cell27'> </td><td id='cell28'> </td></tr>
<tr><td id='cell29'> </td><td id='cell30'> </td><td id='cell31'> </td><td id='cell32'> </td><td id='cell33'> </td><td id='cell34'> </td><td id='cell35'> </td></tr>
<tr id='lastRow'><td id='cell36'> </td><td id='cell37'> </td></tr>
</tbody>
</table>
<table id='bcNavigation'><tr>
<td id='bcFootPrev'></td>
<td id='bcFootAll'></td>
<td id='bcFootNext'></td>
</tr></table>    

<div id='calLoadingStatus' style='display:none; text-align:center;'>
<script type='text/javascript'>bcLoadStatus();</script>
</div>
<div id='calendarDisplay'/>

</div>

<script  type='text/javascript'> initCal();</script>

</b:includable>
<b:includable id='posts' var='posts'>
<!-- posts not needed for Calendar -->
</b:includable>
<b:includable id='menu' var='data'>
  Configure your calendar archive widget - Edit archive widget - Flat List - Newest first - Choose any Month/Year Format
</b:includable>
<b:includable id='interval' var='intervalData'>
  Configure your calendar archive widget - Edit archive widget - Flat List - Newest first - Choose any Month/Year Format
</b:includable>
</b:widget>

At this point you may want to save the template. It should save without any  errors, if not then make sure you followed the above, and copy/pasted correctly.

Now, we need to copy and paste the scripts themselves. If you have an external server, you can copy the following scripts (removing the beginning /ending script tags) and save it as a file with the .js extension, then link to it from the head section. If that doesn't make any sense to you, don't worry. Just do it this way.
Find in your template the ending ]]></b:skin> tag  and the ending </head> tag. It should look something like this in your template 



I've highlighted them to show them off. But you want to copy the following code, and paste it in between these two tags. Here's what you need.

<!-- Blogger Archive Calendar -->
<script type='text/javascript'>
//<![CDATA[

var bcLoadingImage = "http://phydeauxredux.googlepages.com/loading-trans.gif";
var bcLoadingMessage = " Loading....";
var bcArchiveNavText = "View Archive";
var bcArchiveNavPrev = '&#9668;';
var bcArchiveNavNext = '&#9658;';
var headDays = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];
var headInitial = ["Su","Mo","Tu","We","Th","Fr","Sa"];

// Nothing to configure past this point ----------------------------------
var timeOffset;
var bcBlogID;
var calMonth;
var calDay = 1;
var calYear;
var startIndex;
var callmth;
var bcNav = new Array ();
var bcList = new Array ();

//Initialize Fill Array
var fill = ["","31","28","31","30","31","30","31","31","30","31","30","31"];
function openStatus(){
   document.getElementById('calLoadingStatus').style.display = 'block';
   document.getElementById('calendarDisplay').innerHTML = '';
  }
function closeStatus(){
   document.getElementById('calLoadingStatus').style.display = 'none';
  }
function bcLoadStatus(){
   cls = document.getElementById('calLoadingStatus');
   img = document.createElement('img');
   img.src = bcLoadingImage;
   img.style.verticalAlign = 'middle';
   cls.appendChild(img);
   txt = document.createTextNode(bcLoadingMessage);
   cls.appendChild(txt);
  }
function callArchive(mth,yr,nav){
// Check for Leap Years
  if (((yr % 4 == 0) && (yr % 100 != 0)) || (yr % 400 == 0)) {
      fill[2] = '29';
   }
  else {
      fill[2] = '28';
   }
   calMonth = mth;
   calYear = yr;
   if(mth.charAt(0) == 0){
      calMonth = mth.substring(1);
      }
   callmth = mth;
   bcNavAll = document.getElementById('bcFootAll');
   bcNavPrev = document.getElementById('bcFootPrev');
   bcNavNext = document.getElementById('bcFootNext');
   bcSelect = document.getElementById('bcSelection');
   a = document.createElement('a');
   at = document.createTextNode(bcArchiveNavText);
   a.href = bcNav[nav];
   a.appendChild(at);
   bcNavAll.innerHTML = '';
   bcNavAll.appendChild(a);
   bcNavPrev.innerHTML = '';
   bcNavNext.innerHTML = '';
   if(nav <  bcNav.length -1){
      a = document.createElement('a');
      a.innerHTML = bcArchiveNavPrev;
      bcp = parseInt(nav,10) + 1;
      a.href = bcNav[bcp];
      a.title = 'Previous Archive';
      prevSplit = bcList[bcp].split(',');
      a.onclick = function(){bcSelect.options[bcp].selected = true;openStatus();callArchive(prevSplit[0],prevSplit[1],prevSplit[2]);return false;};
      bcNavPrev.appendChild(a);
      }
   if(nav > 0){
      a = document.createElement('a');
      a.innerHTML = bcArchiveNavNext;
      bcn = parseInt(nav,10) - 1;
      a.href = bcNav[bcn];
      a.title = 'Next Archive';
      nextSplit = bcList[bcn].split(',');
      a.onclick = function(){bcSelect.options[bcn].selected = true;openStatus();callArchive(nextSplit[0],nextSplit[1],nextSplit[2]);return false;};
      bcNavNext.appendChild(a);
     }
   script = document.createElement('script');
   script.src = 'http://www.blogger.com/feeds/'+bcBlogId+'/posts/summary?published-max='+calYear+'-'+callmth+'-'+fill[calMonth]+'T23%3A59%3A59'+timeOffset+'&published-min='+calYear+'-'+callmth+'-01T00%3A00%3A00'+timeOffset+'&max-results=100&orderby=published&alt=json-in-script&callback=cReadArchive';
   document.getElementsByTagName('head')[0].appendChild(script);
}

function cReadArchive(root){
// Check for Leap Years
  if (((calYear % 4 == 0) && (calYear % 100 != 0)) || (calYear % 400 == 0)) {
      fill[2] = '29';
   }
  else {
      fill[2] = '28';
   }
    closeStatus();
    document.getElementById('lastRow').style.display = 'none';
    calDis = document.getElementById('calendarDisplay');
    var feed = root.feed;
    var total = feed.openSearch$totalResults.$t;
    var entries = feed.entry || [];
    var fillDate = new Array();
    var fillTitles = new Array();
    fillTitles.length = 32;
    var ul = document.createElement('ul');
    ul.id = 'calendarUl';
    for (var i = 0; i < feed.entry.length; ++i) {
      var entry = feed.entry[i];
      var link = entry.link[0].href;
      var title = entry.title.$t;
      var author = entry.author[0].name.$t;
      var date = entry.published.$t;
      var summary = entry.summary.$t;
      isPublished = date.split('T')[0].split('-')[2];
      if(isPublished.charAt(0) == '0'){
         isPublished = isPublished.substring(1);
         }
      fillDate.push(isPublished);
      if (fillTitles[isPublished]){
          fillTitles[isPublished] = fillTitles[isPublished] + ' | ' + title;
          }
      else {
          fillTitles[isPublished] = title;
          }
      li = document.createElement('li');
      li.style.listType = 'none';
      li.innerHTML = '<a href="'+link+'">'+title+'</a>';
      ul.appendChild(li);

      }
   calDis.appendChild(ul);
   var val1 = parseInt(calDay, 10)
   var valxx = parseInt(calMonth, 10);
   var val2 = valxx - 1;
   var val3 = parseInt(calYear, 10);
   var firstCalDay = new Date(val3,val2,1);
   var val0 = firstCalDay.getDay();
   startIndex = val0 + 1;
  var dayCount = 1;
  for (x =1; x < 38; x++){
      var cell = document.getElementById('cell'+x);
      if( x < startIndex){
          cell.innerHTML = ' ';
          cell.className = 'firstCell';
         }
      if( x >= startIndex){
          cell.innerHTML = dayCount;
          cell.className = 'filledCell';
          for(p = 0; p < fillDate.length; p++){
              if(dayCount == fillDate[p]){
                  if(fillDate[p].length == 1){
                     fillURL = '0'+fillDate[p];
                     }
                  else {
                     fillURL = fillDate[p];
                     }
                  cell.className = 'highlightCell';
                  cell.innerHTML = '<a href="/search?updated-max='+calYear+'-'+callmth+'-'+fillURL+'T23%3A59%3A59'+timeOffset+'&updated-min='+calYear+'-'+callmth+'-'+fillURL+'T00%3A00%3A00'+timeOffset+'" title="'+fillTitles[fillDate[p]].replace(/"/g,'\'')+'">'+dayCount+'</a>';
                 }
              }
          if( dayCount > fill[valxx]){
             cell.innerHTML = ' ';
             cell.className = 'emptyCell';  
             }
          dayCount++;  
         }
      }
    visTotal = parseInt(startIndex) + parseInt(fill[valxx]) -1;
    if(visTotal >35){
        document.getElementById('lastRow').style.display = '';
       }
  }

function initCal(){
   document.getElementById('blogger_calendar').style.display = 'block';
   var bcInit = document.getElementById('bloggerCalendarList').getElementsByTagName('a');
   var bcCount = document.getElementById('bloggerCalendarList').getElementsByTagName('li');
   document.getElementById('bloggerCalendarList').style.display = 'none';
   calHead = document.getElementById('bcHead');
   tr = document.createElement('tr');
   for(t = 0; t < 7; t++){
       th = document.createElement('th');
       th.abbr = headDays[t];
       scope = 'col';
       th.title = headDays[t];
       th.innerHTML = headInitial[t];
       tr.appendChild(th);
      }
   calHead.appendChild(tr);
  for (x = 0; x <bcInit.length;x++){
     var stripYear= bcInit[x].href.split('_')[0].split('/')[3];
     var stripMonth = bcInit[x].href.split('_')[1];
     bcList.push(stripMonth + ','+ stripYear + ',' + x);
     bcNav.push(bcInit[x].href);
     }
  var sel = document.createElement('select');
  sel.id = 'bcSelection';
  sel.onchange = function(){var cSend = this.options[this.selectedIndex].value.split(',');openStatus();callArchive(cSend[0],cSend[1],cSend[2]);};
  q = 0;
  for (r = 0; r <bcList.length; r++){
       var selText = bcInit[r].innerHTML;
       var selCount = bcCount[r].innerHTML.split('> (')[1];
       var selValue = bcList[r];
       sel.options[q] = new Option(selText + ' ('+selCount,selValue);
       q++
       }                    
   document.getElementById('bcaption').appendChild(sel);
   var m = bcList[0].split(',')[0];
   var y = bcList[0].split(',')[1];
   callArchive(m,y,'0');
}

function timezoneSet(root){
   var feed = root.feed;
   var updated = feed.updated.$t;
   var id = feed.id.$t;
   bcBlogId = id.split('blog-')[1];
   upLength = updated.length;
   if(updated.charAt(upLength-1) == "Z"){timeOffset = "+00:00";}
   else {timeOffset = updated.substring(upLength-6,upLength);}
   timeOffset = encodeURIComponent(timeOffset);
}

//]]>
</script>
<script src='/feeds/posts/summary?max-results=0&amp;alt=json-in-script&amp;callback=timezoneSet'></script>
<!-- End Blogger Archive Calendar -->

As of May 4 2007 the scripts will autodetect your timezone settings. Nothing here has to be changed, but there are a few things that some people may want to configure (especially non-English blogs) but for now the defaults will do.  If you want to change some things (especially if you have a non-English blog) then check out the full list at the Blogger Archive Calendar Settings Page

Now save your template. It should save without errors, if not recheck your steps above. One more thing needs to be configured in your Archive Widget. Goto the Page Elements page, find your Archive Widget, and click to edit it. You'll see a screen like this 



The title can be anything you want. The style MUST be Flat List as show. Options should NOT have Show Oldest Posts firsts checked. Archive Frequency MUST be Monthly. The Date Format can be anything you want. The calendar will accept whatever you decide here.

Save the widget. Then try it out. Go view your blog and if everything is correct you should have the calendar working now.

If you've made it this far, and it's working you'll note that without any style associated with it the calendar is a bit plain. But we've got some of that covered as well. Admire your work so far. Make sure it seems to function.

To style the calendar, you can add some CSS entries. I've made up a few default styles to choose from. If you are knowledgeable in CSS than you can use the base ones to come up with your own. Or you can pick from what I've already whipped up ( I may add a few more as time goes by). All the styles I currently have are on their own page, with instructions on how to use. Check it out at Blogger Archive Calendar Styles


Source:http://phydeauxredux.googlepages.com/Blogger-Archive-Calendar.html
Step 1
Step 2

How to set background music in blogs and websites

Play Background music in blogs and websites

background_music Background music in blogs and websites is not appreciated by many viewers since it disturbs attention, gathers unwanted attention and wastes bandwidth. However there are many methods to do this and many websites catering to this demand......

The first requirement is to have your music file ready and upload it to a freehost like Googlepages. If you can't create an account at Googlepages create a group at Google Groups and this gives you 100 MB free space for files. Next upload your file to the freehost and copy down its link or URL.


The simplest solution is to use the embed tag to put the file in your page. Login to Dashboard and go to Layouts. This opens the Page Elements tab in which click on Add Page Element in the sidebar. Choose the Html/Javascript option and paste this code under contents :


<EMBED src="LINK OF SOUND FILE AT FREE HOST" autostart=true loop=false volume=100 hidden=true><NOEMBED><BGSOUND src="NAME OF FILE"></NOEMBED>


Replace the CAPS in above code and Save.

When you put autostart=true then the file will start playing as soon as the page is loaded.
You can put "FALSE" instead of "TRUE" so the person visiting your page will have to click on the play button for it to start. Loop=true makes the file to play again and again. Use this for small files like birdsongs which can continuously play in the background.

Major Update for google's Blogger

Major Update for Google's Blogger

It's raining with features in the experimental version of Blogger, available at http://draft.blogger.com. To try these new features, it's a good idea to visit Draft Blogger and temporarily enable "Make Blogger in Draft my default dashboard" at the top of the page.
Probably the most important new feature is the inline commenting system, that lets you post comments without opening a new page. This year, I tried using a pop-up window for the comment form, but it's still inconvenient to post comments. The new option, which can be added in the Draft Blogger by going to Settings > Comments > Comment Form Placement, uses an iframe to display a textarea and a list of authentication options:

<iframe allowtransparency="true" id="comment-editor" src="http://www.blogger.com/comment-iframe.g?blogID=BLOGID&postID=POSTID" scrolling="auto" width="100%" frameborder="0" height="275"></iframe>

I added the inline comment form to the template, so you can try it. For now, you can't preview the comment before posting it and I haven't figured out how to add the option to delete your comment.
Another extremely useful new feature lets you import and export your posts and comments. "Now you can export all of your posts and comments into a single, Atom-formatted XML file for easy backup. You can then import the posts back into Blogger, either into an existing blog or into a new one." The option is available in the Draft Blogger by going to Settings > Basic. Please note that the exported XML file can be quite large: for example, this blog's entire archive has 10.2 MB.

Blogger has a new post editor that borrows a lot of new tricks from Google Page Creator. You can move the images inside a post and dynamically choose between different sizes of the image. The new editor is smart enough to no longer replace newlines with <br> tags when you add tables, lists, styles, scripts and objects. There's also an improved preview option that uses your template to style your content. Unfortunately, the new editor lacks many features currently available: auto-save, spell checking, video upload and the toolbar for editing HTML.

Blogs that use the new layouts can add star ratings to get feedback from readers, but I'm not sure if this is a useful feature. There's also an option that integrates Blogger with Google Webmaster Central: you can automatically add all your Blogger blogs with a single click.
This is one of the biggest updates to Blogger and many of the new features are long overdue. If everything goes well, all these features will soon be available in the standard Blogger interface.

Tuesday, July 1, 2008

How to create Blogger Tag Cloud / Label Cloud


Here is the code and setup information to use the Label Cloud in New Blogger.
First you obviously have to have a blog on New Blogger, and you MUST be using the layouts templates,
(this isn't available for classic templates, or FTP published blogs ) and you must have some posts labeled already. (There needs to be at least ONE label with more than ONE entry or the scripts hit a bug - so have at least one label with more than one entry before starting).


Make sure you backup your template before making any changes!

Log into Blogger and go to your layouts section. On the 'Page Elements' setup page
make sure you have a label widget already installed where you want it (it can be moved around
later). Then go to the Edit HTML settings and leave the widgets NOT exapanded. It will make
things easier to deal with.


Now the code comes in 3 parts. A section for the stylesheet, a configurations section,
and then the actual widget itself.

The first part to put in is the stylesheet section. The following code needs to be copied
and inserted into your stylesheet, which in the layouts is marked out by the <b:skin> tags.
Easiest thing to do is find the closing skin tag

]]></b:skin>

and place the code right BEFORE that.
Here it is, copy and paste without modification right now. I'll explain what can be tweaked
later.



/* Label Cloud Styles
----------------------------------------------- */
#labelCloud {text-align:center;font-family:arial,sans-serif;}
#labelCloud .label-cloud li{display:inline;background-image:none !important;padding:0 5px;margin:0;vertical-align:baseline !important;border:0 !important;}
#labelCloud ul{list-style-type:none;margin:0 auto;padding:0;}
#labelCloud a img{border:0;display:inline;margin:0 0 0 3px;padding:0}
#labelCloud a{text-decoration:none}
#labelCloud a:hover{text-decoration:underline}
#labelCloud li a{}
#labelCloud .label-cloud {}
#labelCloud .label-count {padding-left:0.2em;font-size:9px;color:#000}
#labelCloud .label-cloud li:before{content:"" !important}




This next section is the configuration section for the Cloud. It also goes in the head
of the template, but outside of the stylesheet part. Easiest thing to do again is to find
the closing stylesheet tag

]]></b:skin>

But this time place the code right AFTER that line, but BEFORE the </head> tag. Here it is.


<script type='text/javascript'>
// Label Cloud User Variables
var cloudMin = 1;
var maxFontSize = 20;
var maxColor = [0,0,255];
var minFontSize = 10;
var minColor = [0,0,0];
var lcShowCount = false;
</script>



All of these settings can be changed but I'll explain them in a moment. The defaults will work for now.


Now the widget itself. Scroll down and find the label widget in your sidebar. It should look
something like this.


<b:widget id='Label1' locked='false' title='Labels' type='Label'/>


Copy the following code (from beginning widget tag to ending widget tag) and replace
the line above with it.



<b:widget id='Label1' locked='false' title='Label Cloud' type='Label'>
<b:includable id='main'>
  <b:if cond='data:title'>
    <h2><data:title/></h2>
  </b:if>

  <div class='widget-content'>
  <div id='labelCloud'/>
<script type='text/javascript'>

// Don't change anything past this point -----------------
// Cloud function s() ripped from del.icio.us
function s(a,b,i,x){
      if(a&gt;b){
          var m=(a-b)/Math.log(x),v=a-Math.floor(Math.log(i)*m)
             }
      else{
          var m=(b-a)/Math.log(x),v=Math.floor(Math.log(i)*m+a)
          }
      return v
   }


var c=[];
var labelCount = new Array();  
var ts = new Object;
<b:loop values='data:labels' var='label'>
var theName = &quot;<data:label.name/>&quot;;
ts[theName] = <data:label.count/>;
</b:loop>

for (t in ts){
     if (!labelCount[ts[t]]){
           labelCount[ts[t]] = new Array(ts[t])
           }
        }
var ta=cloudMin-1;
tz = labelCount.length - cloudMin;
lc2 = document.getElementById('labelCloud');
ul = document.createElement('ul');
ul.className = 'label-cloud';
for(var t in ts){
    if(ts[t] &lt; cloudMin){
       continue;
       }
    for (var i=0;3 &gt; i;i++) {
             c[i]=s(minColor[i],maxColor[i],ts[t]-ta,tz)
              }      
         var fs = s(minFontSize,maxFontSize,ts[t]-ta,tz);
         li = document.createElement('li');
         li.style.fontSize = fs+'px';
         li.style.lineHeight = '1';
         a = document.createElement('a');
         a.title = ts[t]+' Posts in '+t;
         a.style.color = 'rgb('+c[0]+','+c[1]+','+c[2]+')';
         a.href = '/search/label/'+encodeURIComponent(t);
         if (lcShowCount){
             span = document.createElement('span');
             span.innerHTML = '('+ts[t]+') ';
             span.className = 'label-count';
             a.appendChild(document.createTextNode(t));
             li.appendChild(a);
             li.appendChild(span);
             }
          else {
             a.appendChild(document.createTextNode(t));
             li.appendChild(a);
             }
         ul.appendChild(li);
         abnk = document.createTextNode(' ');
         ul.appendChild(abnk);
    }
  lc2.appendChild(ul);    
</script>

<noscript>
    <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>
</noscript>
    <b:include name='quickedit'/>
  </div>

</b:includable>
</b:widget>


Now if all has gone well, and you have posts already labeled, then if you preview the
blog you should see some form of the Cloud appearing. If it doesn't appear, then something
went wrong. You should probably back out and try it again from the start.

Update : I've found 2 things to check for first if the label cloud isn't showing.  First make sure that at least one of your labels has more than one entry. A bug in the script causes it to fail when all the labels have only one entry.(As soon as any label has more than one entry, then it should be ok from then on) Also, make sure that none of your labels contain quote marks " .  Apostrophes or single ticks ' are ok. ------

Most likely the cloud with it's default settings won't be what you ultimately want. But all
the colors and sizes are configurable to match your tastes. If the cloud is appearing in preview
then you can go about changing some of the variables so they suit.


The settings in the Variables section will be where you make most of your adjustments. Here I'll
explain what each setting does.

var cloudMin= 1;

This setting you can use to limit the number of labels shown (for example if you have a lot of labels). Leave the setting at 1 to show ALL labels.  If you enter in a higher number, then only labels that have at least that number of entries will appear in the cloud.

var maxFontSize = 20;
var maxColor = [0,0,255];
var minFontSize = 10;
var minColor = [0,0,0];
var lcShowCount = false;

The lines for
    maxFontSize
    maxColor
do what you may think they do. The first one sets the size (in pixels) of the label with the
most amount entries. The maxColor sets the color of that entry (in RGB format). Similiar with
the next two
   minFontSize
   minColor
Just these are for the label with the least amount of entries. Again the size is in pixels,
the color is in RGB format. Any labels between the two will get their color/sizes based on
how many labels they are, and where their entry count falls, giving the much desired cloud
effect.

From my experimenting, there are many factors that make up a pleasant looking cloud. From
color/size choice, to the number of actual labels, to how well dispersed the entries are amoung
the labels. 3 Labels don't make a good cloud as there isn't much to work with. You just have
to experiment around to see what looks good with your setup.

IMPORTANT, when change the color settings, Keep them in the format supplied. In between the [] and
the numbers separated by commas. The default colors are BLUE for the max and BLACK for the min.
You can select any valid RGB color combination. If you don't know what RGB colors are, don't
worry. It's just a way of defining a color. You can use many charts on the Internet to
get the correct RGB value for the color you want to try. Here's one that is fairly good.

RGB Color Code Chart

Remember, if you get the 3 sets of numbers to enter them in correctly. Inside the [ ] separated by
commas.

Also experiment with different font sizes. Again it depends on how many entries, how dispersed
they are, and how much room for the cloud is available as to what looks good.

The last variable there is

  lcShowCount

This can either be false (default) or true. All this does is turn off/on the post count displayed
next to the label. Usually in a 'traditional' cloud the count isn't used. But if you go to a
'flat' listing then it's sometimes useful to turn it on.

Now to the CSS section. Most people won't need to tweak these much, and it's not necessary to
understand what all those entries are for. Most are just to make sure that other styling
elements from the rest of your page don't inherit in and ruin the cloud. But there are a few
that you may want to change to suit.
The first line

     #labelCloud {text-align:center;font-family:arial,sans-serif;}

You could change the fonts used in the cloud here if you wanted.
Also, the text-align statement can also be changed. I have it set to center by default but you
could use

text-align:justify;
text-align:right;
text-align:left;

If those suit better.

The next line

     #labelCloud  .label-cloud li{display:inline;background-image:none !important;padding:0 5px;margin:0;vertical-align:baseline !important;border:0 !important;}

Well don't worry about most of it unless you are a hardcore CSS'er. The only one of real
importance is the first entry

display:inline;

You can change that to

display:block;

To get the 'Flat' (each entry on it's own separate line) listing of the weighted entries.
Usually if that is set to block you would probably want to change the sort frequency from
alphabetical to frequency. You do that by editing the widget from the Page Elements tab in
Blogger.

And the last bit I'll mention is the line

     #labelCloud .label-count

If you set the lcShowCount variable to true to show the post counts, you could change the
color/size of those numbered entries with that line.

Monday, June 30, 2008

Changing the Blogger Title Tag

This widget will change the Blogger's title tag to help amplify relevant keywords to your blog which improve the search engine ranking of your blog.

How does it work?

By default, your Blogger's title on the top left displays your blog title, and if it's in the items page, it'll include your post title as well.
e.g. Widget-based XML: Changing the Blogger Title Tag

By default, Blogger templates come with a 'smart' tag that automatically puts the title of your blog in the title tag if you are on the main page and on article pages it uses the format: BlogTitle: Article Title.
I wanted to change my blog's title tag so that is puts the title of my post first followed by the name of my blog. Here is the code if you want to do the same:
<title>
<MainOrArchivePage><$BlogTitle$></MainOrArchivePage>
<ItemPage><Blogger><$BlogItemTitle$></Blogger> - <$BlogTitle$></ItemPage>
</title>
Use the above code in place of: <title><$BlogPageTitle$></title>



It works the same way for labels and archives pages.

Installation

Find the following codes, near the top of your template:

<title><data:blog.pageTitle/></title>



Replace with the following code:




<!-- Start Widget-based: Changing the Blogger Title Tag -->
<b:if cond='data:blog.pageType == "item"'>
<b:section id='titleTag'>
<b:widget id='Blog2' locked='false' title='Blog Posts' type='Blog'>
<b:includable id='comments' var='post'/>
<b:includable id='postQuickEdit' var='post'/>
<b:includable id='main' var='top'><title><b:loop values='data:posts' var='post'><b:include data='post' name='post'/></b:loop> ~ <data:blog.title/></title></b:includable>
<b:includable id='backlinkDeleteIcon' var='backlink'/>
<b:includable id='feedLinksBody' var='links'/>
<b:includable id='backlinks' var='post'/>
<b:includable id='status-message'/>
<b:includable id='feedLinks'/>
<b:includable id='nextprev'/>
<b:includable id='commentDeleteIcon' var='comment'/>
<b:includable id='post' var='post'><data:post.title/></b:includable>
</b:widget>
</b:section>
<b:else/>
<title><data:blog.pageTitle/></title>
</b:if>
<!-- End Widget-based: Changing the Blogger Title Tag -->



The trick is rather simple for the older Blogger version, but it's nearly impossible with Blogger beta without risking a little XHTML validation. This widget works well but it's only limited to items page. Meaning it'll go back to Blogger default in index, labels and archives pages.

Recent Posts

Template by - Abdul Munir | Daya Earth Blogger Template