Wednesday, December 26, 2012

How to Add PowerPoint to Blogger - The Definitive Guide

One of the most asked Blogger questions on forums and help sites is 'How do I add a PowerPoint presentation within Blogger?'  It surprises me that many of the answers talk about multiple conversion techniques such as to Adobe PDF or to bitmap files to embed as pictures. Also, there are multiple slide sharing sites such as Slideshare.net, Scribd.com and Docstoc.com that can be used as upload sites to host your presentation and then share publicly.

Though these options are valid, the best option is to use a Microsoft tool since the level of support for the presentation view will be the highest. This is actually a very easy option and allows you to keep your presentation in the .ppt or .pptx formats.

Using Microsoft OneDrive for PowerPoint

What you may not have realized is that Microsoft's Live products - one of which is OneDrive, allows you to upload your PowerPoint presentations, edit them in place and then embed them into any web site with a viewer. Plus, OneDrive is free cloud storage with an initial limit of 5GB which should handle most PowerPoint presentations. You can always start paying for more storage if you need it.

Setting up a Microsoft Live account with OneDrive is easy to do - if you have a Hotmail account you may already have one. Just go to the Microsoft OneDrive Signup page to start and create your account. Note the message I highlighted if you do not have a Hotmail or Live account already:
Microsoft Skydrive login page


If you didn't have an account here is the signup page:

Sign up for Microsoft Live with Blogger
Once you've created you Live account you can now access your OneDrive. Just confirm your Microsoft account and login under your ID and Password. Go directly to OneDrive with this link. You should see the OneDrive main page:

SkyDrive folders
What you are seeing here are my OneDrive folders - Documents, Pictures and Public. I've highlighted 'Public' because that is where you will be uploading your PowerPoint presentation. Go ahead and click on the Public folder which is anywhere in the entire blue box. You'll now be within that folder:

SkyDrive folders

As you can see I already have a test folder called 'PPTest' in Public - yours should look empty. Go up to the menu item called 'Create' to create your presentation folder. You don't have to do this but I like to just to keep the files organized.  When you click on 'Create' you'll see an option for 'Folder'.  Choose that and name your new folder. It will be another blue box like my PPTest folder above in the picture. Click on that blue box and you'll be within an empty folder:

SkyDrive folder ready for Blogger PowerPoint
You can see that I've circled the name of my new folder and the message that you're now ready to upload your PowerPoint presentation.

Uploading PowerPoint to OneDrive

Your next step will be to upload your PowerPoint presentation. This is a very easy step. Simply click on the 'Upload' menu item on the top bar in OneDrive. Choose the option to 'Select them from your Computer' to upload:
Navigate to PowerPoint file for Blogger

You can see that I've navigated to my 'Blogger Strategy.pptx' file on my local drive. Just click 'Open' to upload the file.  As you can see my file is now within the new folder:


Embedding Your PowerPoint Presentation in Blogger

The last step is to just find the public link to embed your presentation. Simply hover over the orange file box in the upper right and click on the little box:

Selecting a PowerPoint file for embedding
Once you've clicked on the file you'll see some new menu items appear at the top. You'll want to choose 'Embed' to add your file to your Blogger post. You'll see this dialog - choose the 'Generate' button:

You should see your presentation appear in a few seconds with the embedding link like so:

Copy SkyDrive code
Just copy the HTML code to embed that I've highlighted and paste it into your blog post by switching to the HTML view and pasting it where you would like it - like this:


That's it! You are done! The PowerPoint is now embedded in your blog posting. The best news is that you can use Microsoft's online tools to edit the presentation in place if needed.  Here is my simple example - enjoy!



Posted By my pwiki1:02 PM

Saturday, December 15, 2012

Hide the Blogger Sidebar - Quick Tip

Hide the Blogger Sidebar on a Static Page
Many times when you want a static home page you don't want to see the sidebar widgets. You probably noticed that on my test site for the Static Home Page I was able to hide the sidebar that you normally see on you layout in the blog posting page. Removing this is a simple trick and just requires some basic CSS and Blogger template code to adjust. The key to doing this is to simply use CSS to hide, or, display:none on your sidebars and then adjust the width of your page to fit your design needs.

First step is to just into your Blogger template editor and then choose the 'Edit HTML' button like this:

Edit the HTML of your Blogger template
Click the 'Proceed' button to jump into your template. You don't have to worry about 'Expand Widget Templates' here because we're only working within the CSS section. Seach for the part of your template that has the keyword ]]></b:skin> like this:


You can see the section I've highlighted in my circled region - plus, I've shown about how far down in the template you need to go to find it.
What we're going to do is add some simple template code between the ]]></b:skin> line and the <b:template-skin> line. What you want to pay attention to, however, is the type of template you have - is the sidebar on the right, left or both sides?? Now, this code will only affect your static pages and not the main blog posting page. To test this you'll need to have a static page created ahead of time. We'll come to that in a bit.

Next, copy this code below right between the circled lines above:

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<style>
.sidebar {display:none;}
#main-wrapper{width: 95%; float: none; margin: 0 auto;}
.main-inner .column-center-inner {width: 900px;margin-left: 0px;}
</style>
</b:if>
<b:if cond='data:blog.isMobile'>
<style>
.main-inner .column-center-inner {width: 100%;}
</style>
</b:if>

If you've noticed - I've highlighted two parts in this code - the width: and the margin-left:. This code right now is only setup for a right sidebar.  The pasted code should look like this:

Add CSS code to Blogger to hide the sidebar

Remember, you'll need a static page to test so your Preview button will only tell you if the pasted code works - you won't see it visually until you navigate to a static page. The key adjustments you'll want to make are now the margin-left and width values I highlighted in the code.

IMPORTANT:
1. If your blog has a right sidebar, then only adjust the width: value to your proper size.
2. If your blog has a left sidebar, then adjust the margin-left: to a negative value depending on your template - such as -200px or -300px. Then adjust your width: value.
3. If your blog has both sidebars do the same as #2 but just reduce the value for margin-left:.

Press the 'Save template' button to save and test your static pages. You'll have to do some trial and error to get the values just right. I know you could use the tempate values of content.width, etc. but many templates are different and you may find that some don't have the standard template variables so fixed values work better for me. One other note - if you noticed, the mobile template must be adjusted as well so as not to have a full fixed content width. Otherwise, it extends too far to the right on a mobile device.

That's it! You're done. All of your static pages will now have full widths across the width of your blog. Enjoy!

Posted By my pwiki7:55 AM

Sunday, December 9, 2012

Add a Slider to Blogger

APRIL 2013 UPDATE!! Serveral readers have discovered that part of this tutorial does not work for domains other than the standard Blogspot.com domains. There is a fix here, however!! If you have a custom domain you will need to follow this tutorial - but also the section called 'Addendum 1' at the bottom of this post in order for the slider to work correctly.

Life can get pretty darn busy at this time of year. I had to take some time off posting just to get my grad school work done as well as my job. There's a ton of new tutorials I have in my back pocket but just haven't had time yet to do the work. But, my paper is done for school and I'm now relaxing in a snow storming weekend.

What I didn't expect was that I would be spending hours trying to find a good image slider for Blogger that didn't run into weird problems or wasn't too complex to implement. Image sliders are very cool but are implemented in so many different ways - typically in Flash or Javascript. In this case I had to work through about four different free sliders to find one I liked or that worked right. Blogger does have a Slideshow gadget, but it doesn't have any real customizable features.

Let's get started. The Image Slider template I chose is from a company called Menucool.com and offers a free slider framework. You can view a sample of it in action by clicking on the image in the upper left of this post. The part that sold me on it was the fact that it didn't require JQuery script code in order for it to be implemented. That's good for us because it reduces the load time for your blog and is easier to install (note that easier is relative here - it is still a bit of a trick to get it setup correctly).

Uploading and Installing the Main Script

The main Javascript code for Menucool requires you to install some javascript code somewhere. Well, as you know Blogger doesn't have a place to install a file. You could extract the script and embed it into your template. But, I like to add it to Google Sites as a file then reference it. Your first step is to go to the Menucool.com Javascript Slider page. From there scroll down a bit to download the image slider code. All we want right now is the main Javascript file - click on the Download button:

Menucool javascript for Blogger image slider

The file is going to be in zip format. So, depending on your system you may need to download an unzip utility.  Once downloaded and unzipped you should see something like this:

Image slider for Blogger downloaded code

Navigate to the folder called jsImgSlider\jsImgSlider\themes\1 - this is where you will find your code file entitled js-image-slider.js:

Blogger image slider javascript file



Now, you'll need to install this file on a visit external site somewhere.

IMPORTANT UPDATE: If you have a custom domain name (not [blogname].blogspot.com) then don't upload the .js file to Google Sites (please see the Addendum 1) and jump down a few paragraphs to Adding the Nav Button!!  This next section only works for .blogspot.com domains.

As I noted I use Google Sites for this. I'm not going to repeat my tutorial on how to install a file in Google Sites. Just take a look at my MP3 posts on installing a file. You'll want to upload the js-image-slider.js file to your Google Site exactly like an MP3 file. Follow the steps in Add an MP3 File to Blogger - Part 1 and Part 2 of how to upload a file to Sites.

Once your file is uploaded you'll want to find the full link to it as I did in the MP3 tutorial by right-clicking the down arrow on the far right and choosing 'Copy Link Location':

Choose the javascript file from Google Sites

Save your link location in a word processor or text editor somewhere. It should look something like this:
https://sites.google.com/a/bloggertipspro.com/myfiles/mp3/js-image-slider.js?attredirects=0&d=1  Be sure to remove the '?attredirects=0&d=a' part.  You can also change the https to just http.

Add Links and CSS to Your Blogger Template

Now you're ready to install the scripts and layouts to your Blogger template. First step is to add this line you just saved to your template's HTML with the script tags added - be sure to change my URL to yours:

<script src='http://sites.google.com/a/bloggertipspro.com/myfiles/mp3/js-image-slider.js'/>

Go to the Blogger main menu and choose to Edit HTML in your Template:

Edit the Blogger template html

At the very top of the Template add your script line above like this just after your title code. Be sure to save your Template:

Code for Blogger slider image

Adding the Nav Button
Now you have the image slider code ready to be used. One part of this code requires a simple image upload to your blog - the navigation buttons. This file is called bullet.png - you can see it in the unzip file list above when we got the javascript file. Copy this file from the unzip list and add it to any post in your blog as an inserted image and save the post. Then, just go into the HTML of your Post and find the image link like this:


Copy that link code from your post and save it in a word processor or text editor. You want this for later. Go ahead and delete the image from your post. Don't worry, Blogger keeps all images even after your delete the post image.

IMPORTANT: follow the very same steps when adding your banner images as well. Add them to a post, save the post, copy their links and then delete the images. In my case I have three 900px by 120px images that I added to a post - which you can see here.  I could delete them - it wouldn't matter - but I left them for you to see.

Next step is to add the right CSS code to format your images. In my example I'm using banner images that are 900px wide by 120px tall. You can modify the CSS for any image size. The CSS code below will be setup for that size. Next step is to go into your template Customize section:

Customize a Blogger template
Once in go into the Advanced section of the customizer:

Add CSS to Blogger Template


Here is the CSS code you want to add - just ignore the code in the image above. You'll want to copy and paste this into the window on the right (you can see some of the pasted code in the image above - ignore the .post pre section). If you have code already there - just paste below it:


/* http://www.menucool.com */

#sliderFrame {position:relative;width:900px;margin: 0 auto;} /*remove the "margin:0 auto;" if you want to align the whole slider to the left side*/

#ribbon {width:111px;height:111px;position:absolute;top:-4px;left:-4px;background:url(ribbon.png) no-repeat;z-index:7;}
       
#slider {
    width:900px;height:120px;/* Make it the same size as your images */
 background:#fff url(loading.gif) no-repeat 50% 50%;
 position:relative;
 margin:0 auto;/*make the image slider center-aligned */
    box-shadow: 0px 1px 5px #999999;
}
#slider img {
 position:absolute;
 border:none;
 display:none;
}

/* the link style (if an image is wrapped in a link) */
#slider a.imgLink {
 z-index:2;
 display:none;position:absolute;
 top:0px;left:0px;border:0;padding:0;margin:0;
 width:100%;height:100%;
}

/* Caption styles */
div.mc-caption-bg, div.mc-caption-bg2 {
 position:absolute;
 width:100%;
 height:auto;
 padding:0;
 left:0px; /*if the caption needs to be aligned from right, specify by right instead of left. i.e. right:20px;*/
 bottom:0px;/*if the caption needs to be aligned from top, specify by top instead of bottom. i.e. top:150px;*/
 z-index:3;
 overflow:hidden;
 font-size: 0;
}
div.mc-caption-bg {
 background-color:black;
}
div.mc-caption {
 font: bold 14px/20px Arial;
 color:#EEE;
 z-index:4;
 padding:10px 0px;/*Adding a padding-left or padding-right here will make the caption area wider than its background. Sometimes you may need to define its width again here to keep it the same width as its background area (div.mc-caption-bg).*/
 text-align:center;
}
div.mc-caption a {
 color:#FB0;
}
div.mc-caption a:hover {
 color:#DA0;
}


/* ------ built-in navigation bullets wrapper ------*/
div.navBulletsWrapper  {
 top:130px; left:400px; /* Its position is relative to the #slider */
 width:150px;
 background:none;
 padding-left:20px;
 position:relative;
 z-index:5;
 cursor:pointer;
}

/* each bullet */
div.navBulletsWrapper div
{
    width:11px; height:11px;
    background:transparent url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk669u4aydgtt79bNYNPvOvrIVG0bB5J5Oc8_8g_dYGKJEbjmjTdRr_3v3UltxlDm8qCDHOPHTwhYhyphenhyphen6Hc2avfqi13gikABE10LCcplb_-d9hhXAxr6LdGCrBDvUZGJiAT1Ve2zC8PH2pd/s1600/bullet.png) no-repeat 0 0;
    float:left;overflow:hidden;vertical-align:middle;cursor:pointer;
    margin-right:11px;/* distance between each bullet*/
    _position:relative;/*IE6 hack*/
}

div.navBulletsWrapper div.active {background-position:0 -11px;}


/* --------- Others ------- */
#slider
{
 transform: translate3d(0,0,0);
    -ms-transform:translate3d(0,0,0);
    -moz-transform:translate3d(0,0,0);
    -o-transform:translate3d(0,0,0);
}


Find the part in the code near the end that references the 'div.navBulletsWrapper' and the part that says 'background:transparent url' - paste in the bullet.png image link you saved earlier to replace the one here. Once you've pasted in this CSS code be sure to hit the orange Apply to Blog button!



Ok, you're just about set. The last part is to have your images ready for the slider. So, if you're using this same tutorial - try images of my sample size first. If you want to alter the sizing - find the CSS section entitled '# slider {' in the code above. You should see the slider width and height that you can adjust for your images. Also, adjust the '#sliderFrame {' section to the width as well if you want. You may need to adjust the 'div.navBulletsWrapper {' section too to move any banner test positioning.

Place the Images in the Slider HTML

Your final steps are to go into your Blog layout section - choose the main manu Layout and Add a Gadget:


Choose a standard HTML/Javascript gadget like this:


Next, you'll want add the HTML code that will spin the banner images.  A couple of notes to change in the code below - a) be sure to copy your banner image links in, b) you can add as many images as you want - just add additional img tags, c) alter the banner text and links to what you want, d) alter the last caption to go to any link you'd like, e) add links with a href tags if you want a clickable image:

<div id="sliderFrame">
        <div id="ribbon"></div>
        <div id="slider">
            <a href="http://www.bloggertipspro.com/" target="_blank">
                <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcGy8THjGVVr0fNbXX0Ciha3vpcBNTsrwrAKy9FomGoWYo17mcQy3Cd3zkaDTL4Yw0GnybGnXgJraZ3SJz40OjAyyRS99-ijzOK5Sm5NbzUeORX68t5o4boMnEUK1IZzFLCysYjYPUHfVJ/s1600/aimage1.jpg" alt="Sliding Images for Blogger" />
            </a>
            <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyepvEEzJ3kd4EM5dcXBjTFJ9vAzHQiAQEdhKdm2BR1kfTCiVo2kSJvOS8kgEaLCIpjF0HREjFmot-hgllawyUNzJ3HVl7PCiQ8mkHK5-Y0F5HFMEZIQObc3bkoOUtRGCVUSOOOfutA_Z-/s1600/aimage2.jpg" alt="Multiple Transition Options" />
            <img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtzGgEKcW8L7GjEo4lZ51BppyPUfvD6HGBwQaNzqhrF9T1_XZK-BPfVqvgwACMGOWMetlCBqA_3q5zjkx7H6TSMSpTETq2NXLW80ze98Tu5z-qM41kKAWgtR9SWIDzKfofFiqpVPENQFPg/s1600/aimage3.jpg" alt="Full Instructions at BloggerTipsPro.com" />

        </div>
        <div id="htmlcaption" style="display: ;">
            <em>HTML</em> caption. Link to <a href="http://www.google.com/">Google</a>.
        </div>
 </div>


You can see my image links above where I pasted them in. Go ahead and save your gadget code and position it where you want. I've placed my example near the top - but, you can be creative and add the code where you'd like:

Image slider HTML layout


That's it - be sure to save your layout!  Your rotating slider images are ready. If you go back to the Menucool.com site you can find more ways to adjust the slider properties and do some more creative things. Enjoy - here's the link again to my sample blog: http://statichomepage.blogspot.com

Addendum 1- Fixing the Javascript for Custom Domains

Apparently, Google Sites wraps the Javascript code above in HTML if your domain is not  .blogspot.com but a custom one just like BloggerTipsPro.com. Rather than added an external link, all you need to do is to copy the Javascript code directly into an HTML widget. Just add a new HTML widget anywhere on your layout. Then, open the file 'js-image-slider.js' in a text editor and copy the code into the HTML widget surrounded by the script tags like this:

<script type='text/javascript'>
var sliderOptions=
{
 sliderId: "slider",
 effect: "series1",
 effectRandom: false,
 pauseTime: 2600,
 transitionTime: 500,
 slices: 12,...lots of code here......getElement:function(){return K(j.sliderId)}}}
</script>

You can see how I pasted the code here:


Go ahead and save your gadget code and you should be good to go!

Addendum 2- Allowing Your Slider Only on the Home Page

This part is a bit tricky and you'll have to be sure to backup your template in case of errors. There was a question in the comments about how to limit your slider only to the home page. Now, if you have a Static Home Page like my tutorials before then what I'll show you is the way to do it. However, if you want to show the slider only on the Blog Posting main page you'll have to change a couple of things.

The key to doing this is to add code to your template that will only show the HTML widget above when a certain page type and page name loads. This isn't a great idea because now you'll have that page name embedded in your code - REMEMBER THIS - if you ever change the page name you'll have to go back into the template and change the code!!!

You'll need to find the HTML widget in your Template by expanding it and searching for it. Here is how I found my code in the Blogger Static Home Page template and example for this:

Hide the image slider within your Blogger template
As you can see I found the widget and added these two lines:

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
<b:if cond='data:blog.pageTitle == &quot;Blogger Static Home Page: Home Page&quot;'>

These lines are checking to see if the page is first,a static page, then, trying to compare the page title. In this case, if the page is of type static_page and the title is 'Blogger Static Home Page: Home Page' then show the slider - otherwise, ignore it. Remember to add the two </b:if> statements at the end. Your page types (pageType variable which can have the values 'item', 'archive', 'static_page' or 'index') and Titles will vary - take care to work through this.

Posted By my pwiki4:47 PM

Sunday, September 30, 2012

Add a Background to a Blogger Post

Sometimes spicing up your Blogger posts with image manipulation can be a good thing. Images are a core part of the blogging experience and having some simple tools can make a bland post look great. I wanted to quickly show how you can add a simple near-transparent background to a single Blogger post.

Free Online Image Tool

Adding a background image is really quite simple. Some have tried using many of the CSS transparency tricks to do this but that typically runs into problems with different browsers and versions. The best way is to just find an image, scale it to the right size and then lighten it up for the illusion of a transparency.

Ok, I happened to stumble into a free online tool called LunaPic that allows you to either capture an image online or upload an image while giving you basic image editing features. You could certainly use another, more sophisticated tool but I thought this gives the basic user the functions needed.

There are really only two things you'll want to do with your image editing tool - scale the image down to close to your blog post window size and lighten or brighten the image so it looks washed out - or, gives it a transparency feel.

So, I'll first apologize for the LunaPic interface - it really is pretty bad. However, I'm going to add a background to this post for the example. First, go to the free LunaPic Editor. Here's the main screen - choose the 'Browse...' button to find an image from your disk:

Edit Images for Blogger Posts

I've chosen a 3MB image from my digital camera. Once you pick the image you'll need to select the 'Upload Now!' button and it should show up on the LunaPic screen like this:

Add a Background Image to Blogger Posts

You can see that I circled the 'Edit' menu item above. Choose the 'Resize Image' option if your image is really large. In my cse this image is 4000x3000 pixels - much too large:

Edit Blogger Images

I decided to scale the image down to 700x525 just so I don't use a bunch of Google storage but also to fit on the post a bit better. Be sure to keep your aspect ratio right. In my case my original was 4 by 3. So, if I set the width to 700 then multiply by 3/4 to get the height. Otherwise just eyeball it.  Enter the values and press the 'Resize Image' button like this:


Next step is to lighten up the image as much as you can so that it looks very transparent. Hover over the 'Adjust' menu item and select 'Brightness' like this:


You'll want to make the image fairly light so that your text doesn't get muddled in the image when you post. Use the slider bar to the right to lighten it. Once set, select the 'Set Brightness' button to save your change. Once done you can now save your image back to your computer by scrolling down to the bottom of it like this:


Note that you can also Undo any changes in your history as well. Go ahead and save the image back under a new name by selecting the 'Save To: Your Computer' option. You're now ready to add the image to your post.

Adding an Image Background to a Blogger Post

The next trick is to upload your modified image to Blogger so that it is saved for the background. Google will keep the image in storage so don't worry about losing it. You'll just want to upload the image directly to your post using the Blogger post editor Image button:


Simply select the image you just saved from LunaPic using the image 'Browse' button and uploading it like so:



Once you've uploaded the image, Blogger will have the URL of it buried within your HTML of the post. You're going to want to copy the URL location of that image. You'll want to first find that URL within your post so you can copy it for later. Since you just added it - it should be at the very end of the HTML like this:


You can see that I added my LunaPic image to this very post in the HTML. I've shown you what specifically to copy to use later as the backgroud. Be sure to copy it now and paste it into a word processor or notepad. Once copied, go ahead and go back to the 'Compose' view of your post and delete the image from within the post itself that you just added. Don't worry! It is still out on Blogger's storage.

Now that you have your image uploaded you'll need to add this div tag to the second line of your blog posting's HTML. Note that I added some padding so that your text is slightly indented from the image:

<div style="background: url(&quot;your-full-blogger-image-url-here.jpg&quot;); 
padding: 5px;">
Copy this line and paste it just after the post's first <div> tag that should look pretty close to this when viewing your post in the editor. Select the 'HTML' button in the upper left and add your line. Be sure to replace 'your-full-blogger-image-url-here' with the URL you copied earlier:

<div dir="ltr" style="text-align: left;" trbidi="on">

<div style="background: url(&quot;your-full-blogger-image-url-here.jpg&quot;);
padding: 5px;">
Your blog's Post text here....

Be sure to add a </div> end tag to the very bottom of your full post in the HTML to have the tags balance:
</div>

Once you've done that be sure Blogger isn't complaining about your tags and take a look with the 'Preview' button to see if all looks good.

That's it! You're done. A couple of notes to point out. First, the background image will not span through the title of the post and may have a margin depending on your template. You could try to add this deep within the template itself and create so type of CSS style tag to flag certain posts. This would be very difficult.

Enjoy!

Posted By my pwiki5:13 PM

Saturday, August 18, 2012

Create a Permalink for Blogger Posts - Finally but Not Quite

Filled under:

John Morgan (Creative Commons)
Probably one of the most requested features in Google Blogger over the last five to ten years has been the addition of custom permalinks for your blog posts. This feature is very important to many bloggers who specifically want to improve their search engine optimization based on the URL of a blog post. But, I'm jumping ahead of myself.

So, just what is a permalink? A permalink is really a fixed URL that points to a specific web page on a web site. For example, if you have noticed on Amazon the URL can be very long with a mix of the product ID and other parameters like so:
http://www.amazon.com/gp/product/B0051VVOB2/ref=as_li_tf_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B0051VVOB2&linkCode=as2&tag=theastralreal-20

Can you tell what product it is? As you can see from the example above the product ID, my affiliate ID and the other category references are all in the URL. When this is indexed by Google or Yahoo, the URL may not indicate just what the searched product entered is as well as be short enough for someone to remember it well. A permalink fixes this problem by allowing a user and search friendly permanent link to something - in this case it could contain the full product name for example:
http://www.amazon.com/products/kindle-fire-7-inch-tablet

By using a permalink like this you can see how a website can point to something with a meaningful, search engine friendly link and also have the ability to reclassify the product number, or, in the case of a news site - the article number.

Now, when I first heard that Blogger was adding permalinks to posts I was pretty excited. However, my excitement was dimmed a bit to discover you can only modify the final part of the post URL - such that you can't remove the date within the custom URL. For example, if I wanted a post to be timeless and more generic - rather than having a link like this:
http://www.bloggertipspro.com/2012/02/blogging-strategy-basics.html

I was hoping for something like this with the date removed:
http://www.bloggertipspro.com/plink/blogging-strategy-basics.html

Also, you can't go back and modify existing posts with new permalinks. Nevertheless, it is a start and you can adjust your URL such that the link for the post is search engine friendly.

Setting the Custom Permalink in Blogger

Modifying your permalink in your posts is very simple. Just create a new Post from the Blogger main menu. If you look on the far right side where the 'Post Settings' are you'll see that 'Permalink' has now been added as a setting:

add a permalink to Blogger

All you need to do at this point is select the 'Custom URL' button as I did for this post above and enter the user friendly link text you want at this point. You can only enter text, numbers and hyphens. When you save your Post your new custom permalink will be the post URL. That's it.

If you're not up to speed on SEO for blogging there's plenty of material out there to help you. Just search for 'how to make blog post URLs search engine friendly'.

Posted By my pwiki12:20 PM

Wednesday, July 25, 2012

Add MP3 Files to Blogger - Part 3 - Embedding Audio Players

Brandon Zierer (Creative Commons)
In Part 1 and Part 2 of Adding MP3 Files to Blogger we walked through creating a free storage location for the MP3 files and uploading them to be visible publicly. The next step is finding the right embedded player to best work with Blogger.

One thing you need to be concerned with is cross-domain scripting security with this configuration. Since Blogger is attempting to call the MP3 files on a Google Sites domain you'll find that many companies or browser defaults will not allow this configuration. For example, this domain is bloggertipspro.com and the MP3 sample is located at sites.google.com (or google.com). Many security configurations don't like this since external domains can be untrusted from the original domain.

Until Google allows files uploaded directly to Blogger you'll have to live with this limitation. In these examples you may or may not see or hear the audio samples depending on where you are accessing this web page.

NOTE: Dec 2014 - There seems to be a significant amount of variation and change in Google, HTML5 and cross-browser components working with each other. Please keep coming back to this page for more info.

Option 1 - Embedding a Google Gadget in Blogger


I did some searching online and found the following Google gadget player called niftyPlayer. The key to using niftyPlayer is to link to the gadget site and then to your same Google Sites MP3 gmodules page as you did with your files in Part 2.

As you can see I've added the script for niftyPlayer - there are formatting options within the script parameters. You can set the background color, the border. To do that just set these values -

up_wmode=opaque
up_bgcolor=%23RRGGBB (where RRGGBB is your background color)
To turn off the border set border=%23ffffff%7C0px%2C0px+....

Once you've set the parameters, place this code in your post as HTML where you want it:


<div>
<script src="//www.gmodules.com/ig/ifr?url=http://hosting.gmodules.com/ig/gadgets/file/101762205312958577209/nplayer17_0.xml&up_file=http://sites.google.com/a/bloggertipspro.com/mediafiles/mp3/Future%20Gladiator.mp3?attredirects%3D0&up_wmode=transparent&up_bgcolor=%23ffffff&up_as=0&synd=open&w=365&h=37&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js"></script>
</div>

This seems to work in all browsers (IE, Firefox, Chrome). NOTE: this does not work on iOS devices such as iPhones and iPads due to not having Flash. I would suggest offering two players if you need iOS. Hopefully, your security settings should allow this to be visible here:


Option 2 - Using an IFrame of a Google Site Widget

With Google Sites users were allowed to create widgets for various functions. Fortunately, an industrious person developed this iframe plug-in. This is one of the few options that works better with browser security because the frame is a window within a window - find and insert the Dewplayer on your Sites page, then copy and past the code from your Google Sites page to your Blogger page (seems to work in all browsers that support Flash - again, no support for Apple devices with iOS):


<iframe title="Dewplayer Flash Reader Play a MP3 File. Simple version" width="230" height="30" scrolling="no" frameborder="0" id="958235194" name="958235194" allowtransparency="true" class="igm" src="//lebieajorgsoma1tjb9gqldu4ngb3234-a-sites-opensocial.googleusercontent.com/gadgets/ifr?url=https://googledrive.com/host/0B4yfJJJSNrfubzJEUkxIYm1PcHM/dewplayer.xml&container=enterprise&view=default&lang=en&country=ALL&sanitize=0&v=558cf4fc6b61d019&up_CCOL=%23d1dae3&up_START=No&up_MP3=http://sites.google.com/a/bloggertipspro.com/mediafiles/mp3/Future%20Gladiator.mp3&up_LOOP=No&libs=core:flash&mid=141&parent=https://sites.google.com/a/bloggertipspro.com/media/home#st=e%3DAIHE3cAiWoy4d7IhHEfvRZwjlcKQV5pwEXh0KyP5rC%252FmQISxcVPCcsfmQs2BN%252BGECw0pVEqCkjNuqwBXovF%252FCL05RgFIvlIZM%252FW4%252FQdQQPI4%252BRLeXlK8p8GXCNJIZHfzrYVLv0XiOL8e%26c%3Denterprise&rpctoken=2892288207985648625"></iframe>



Option 3 - Wait for HTML5 Compatible Browsers (note: works in Blogspot domains but not in custom domains)

HTML5 was developed with multimedia in mind. All of the newer browsers have the new <audio> tag that will allow you to play media without a Flash player. However, this is still cross-domain scripting which will be blocked for custom domain names on some operating systems or devices (for example, I cannot get this player to work on the iPad for my custom domain bloggertipspro.com - but, in my test blog templatedebug.blogspot.com it works fine on everything.

Nevertheless, if you are using Blogger blogs with the standard [blogname].blogspot.com the HTML5 player works great on all devices including iPhones and iPads if you followed my instructions in Parts 1 and 2:


<audio controls="" src="http://sites.google.com/a/bloggertipspro.com/mediafiles/mp3/Future%20Gladiator.mp3">
Your browser does not support this audio
</audio>

Posted By my pwiki7:42 PM

Sunday, July 15, 2012

Add Pinterest Button to Blogger Posts

Pinterest logoNov/Dec - 2012: The Pinterest button is acting up again. If you have trouble there is a code fix now within this post - you might find some issues since the Pinterest code doesn't work well.
As you probably know, Pinterest is sweeping the world right now as yet another social networking site. It's novel approach allowing users to share interests by 'pinning' images onto grouped boards seems to have captured people's attention.

You may have noticed that I've added the Pinterest button to my posts. For this site, Pinterest probably doesn't apply very well since it is focused on 'how to' content rather than more design, or image-centric activities (feel free to Pin-it anyway, if you'd like!). But, if your site is focused on hobbies, travel, photography, design, etc., then Pinterest is the social site you should be connecting to.

Adding a Pinterest button to your Blogger posts is relatively simple - however, it is a direct template customization that could cause you some issues. As always be sure to backup your template before making these changes (check out my post if you don't remember how - How to Backup Your Blogger Template).

Oddly, the Pinterest Goodies section that allows you to create buttons is very static for sites. They have you enter your site and image URLs directly to make a button. This might be fine for a static page or site, but as bloggers we want each post to be linkable to Pinterest.

Fortunately, some creative souls out there were able to modify the Pinterest scripts in a way that allows the buttons to be connected to each post. In this example I wanted the button to fit with the standard, out-of-the-box Blogger social media buttons at the bottom of each post. (My guess is that Google will add a Pinterest button within a year or two so this tutorial will just be a bridge for now.)

Adding the Pinterest Pin it Button to Your Posts

The first step is to jump to the Blogger Main Menu for your blog and choose the 'Template' and 'Edit HTML' option:


Next, you'll see the standard warning to see if you wish to continue:

Blogger template editor
Go ahead and press the 'Proceed' button. The key for the next step is to search for this specific string:

<b:includable id='threaded_comment_js' var='post'>

This Blogger template includable is located just after the template code that has the standard buttons for social sharing you see at the bottom of each post. Here is the visual view of the searched line:



What you need to do is copy and paste the following code just before the search line and the </b:includeable> statement above:

This code fix/change was updated Dec 2012:

<br />
<div class='sharebutton'><a href='javascript:void((function(){var%20e=document.createElement(&apos;script&apos;);e.setAttribute(&apos;type&apos;,&apos;text/javascript&apos;);e.setAttribute(&apos;charset&apos;,&apos;UTF-8&apos;);e.setAttribute(&apos;src&apos;,&apos;http://assets.pinterest.com/js/pinmarklet.js?r=&apos;+Math.random()*99999999);document.body.appendChild(e)})());'><img alt='Pin It!' height='21' src='http://assets.pinterest.com/images/PinExt.png' width='43'/> </a>
</div>

Here is a visual of what the pasted code looks like:

Pinterest javascript code in Blogger



Be sure to do a 'Preview' first to make sure there were no copy-paste errors. I modified the sizings so it will appear right next to the standard buttons on the left side.  'Save' your template as usual.

That's it! Here is the result:


If you read this article earlier you probably saw that I had the Pinterest button aligned with the Blogger buttons. However, Internet Explorer was giving me fits so I moved it down underneath which works better for both browsers.

You can play with the size and position values or move the button by pasting the code before the standard buttons if you want or even at the top of the Post. Again, I expect Google to add this button in the near future but, for now, use this simple template code. Enjoy!!

Posted By my pwiki1:03 PM