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

Monday, September 29, 2008

How to install new templates without losing widgets?

It's frustrating to install a new template on your blog if you lose all your widgets. Here's how to avoid this problem and keep your old widgets on the blog when you install new templates. Don't worry, there's no coding involve. You just have to know where to copy and paste codes in your old template into your new template file.

1. Save your current template first
This is a must. Save the old one first just in case something screws up and you need to get back to the old template.

2. Use a text editor
Don't do any coding in the Blogger Editor; it's too easy to mess things up. Get a text editor to do any code tweaking on your computer. If you have no idea what to use, just use Notepad++. Download the latest Notepad++ Installer.exe file. It's free and it makes it easier for you to do your coding.

3. Open up the old and new template XML files in the text editor
Open them up because you'll need to copy some codes in the old template and paste them in the new template files. These codes that you'll copy and paste are basically the codes for your widgets. You don't have to understand what's going on inside the code; you just have to know where it is and what widget it is for.

4. Find out where the codes are located
Look at the image below. See the tag? Click on the image to make it larger. All the codes above this tag are mostly CSS, the type of code that controls the appearance (colors, fonts) of your blog. You don't need to copy/paste anything in this section.

The codes below the tag is the main XML code for your blog. Basically, it's the part that controls the layout (where the sidebars, widgets, headers are) and controls the data flow from Blogger into your blog. This is where all the codes for the widgets you want to save are located.


All your widgets are coded within the tag ... . All the tags must be located within the ... tag. The structure looks something like this:


The above is a sample code on how a widget code looks like in a template XML file. The main location of the widget is identified with the div id label. In this case, div id=sidebar-wrapper. Below the div id is the b:section tag. All widgets must be located within this b:section tag. You don't need to worry if you don't understand much about the div or b:section thingy. The important tag you have to know is the b:widget tag. Note that you can put as many widgets as you want inside the b:section tags.

Here's an actual example of a widget tag embedded inside a b:section tag. The location is sidebar-wrapper, meaning that the widget is placed inside one of the sidebars in the blog. The widget is an image widget, as you can see it being labeled id='Image1'.


The most important thing to note is that the widget code starts with the tag and closed with the tag. This is the single most important thing you have to know when copying/pasting later on.Remember also that the widget is placed after the tag and closed with the tag.

Here's another example. The widget is a Linklist widget. You don't have to know the codes inside the widget tag because you won't have to change anything in there.


5. Copy and paste the widgets into new template file
Identify all the widgets you want to keep in your blog after template installation. Locate their codes in the old template file. Remember, these are the codes within the tags and must be close properly with . Copy the codes for a widget that you want to keep and paste them in the new template file, within the tags at the location of your choice. Make sure the b:widget and b:section tags are closed properly.

If you don't know the div id location you want to paste them in, just put them in any div id, but must be inside a b:section tag. It'll then show up as a widget in the Layout > Page Elements page (as in the image below) and you can then drag and drop the widgets to any new location.


6. Upload the new template as your new blog layout
Once you've pasted all the widgets you want into your new template, upload the new template into your blog using the upload button shown below.


7. If not sure, test this technique on a test blog first
If you're not sure whether it'll work out okay, try it first in a test blog. Create a test blog with a few junk posts (lorem ipsum), create some widgets, and then try changing into new templates using the technique above. See if you can make it work.

------------------------------------

Easy no?

I bet most of those bloggers who use the basic Blogger templates do so because they all got so frustrated of having them widgets gone every time they install new templates. Now you don't have to stick to those basic ones knowing this trick; plus you've got all the templates you ever wanted here in Ourblogtemplates.com (just kidding, or not!).

Saturday, September 13, 2008

Adding 'Links to This Post' in the Postfooter

The text by the arrow above is the 'Links to this Post' link, or a Backlink in your postfooter section. If clicked, it'll show all the blogs/pages that are linked to that particular post of yours. Some of my older templates don't have this.

To have it on your blog, follow the instruction below. Backup the template file first just in case something goes wrong and you want to revert back to the old file.

Find this code in your xml file (use your search function):


This code is for the Comment link next to the Backlink. What you have to do is to paste a new group of code before (or after) the Comment link code, depending whether you want the Backlink to appear on the left or right of the Comment link.

If you want the Backlink on the left of the Comment link, put the code in red before the Comment link code, like the example below. The red code places the Backlink in the postfooter.


If you want it after, or on the right, of the Comment link, paste the red code below the Comment link code:



It's not done yet. You have to turn on the Backlink in the Blog Post Edit tab. Click on the small left-button for Links to this Post to turn it on.


It's pretty much done, but you might want to tweak the CSS code to change how the links, Backlink and Comment links, appear in the postfooter. Say, you might want to change its borders, colors, etc.

To do this, find the .post-footer .post-comment-link a {...} tag in your XML file. The whole code may look like this:

.post-footer .post-comment-link a {
margin: 0px 0px 0px 7px;
padding: 0px 0px 0px 9px;
border-left: 1px solid $postfooterTextColor;
color: $commentTabLinkColor;
font-weight: normal;
text-decoration: none;
}

This is where you might want to change if you want to change the appearance of both links, Comment and Backlink. For example, the border-left: 1px solid $postfooterTextColor; places a border just on the left side of the link.

If you want to learn more about how to change it, read this blogger template instruction.

Friday, September 5, 2008

How to Add the Quick Edit 'Pencil' Button?

The top image shows the Quick Edit button (the yellow pencil) in a blog post. Some of the older templates provided here don't have the Pencil button on even if you opted it to be on from the Layout page.

There are 2 things you have to do to turn on the Pencil button.

1. Modify the XML code
Here's what to add in the XML code so you can have the Pencil shows up on your blog posts when you're logged in, to make it easier for you to edit the posts.

If you're editing the XML code online from the Blogger Layout > Edit HTML page, make sure you click on the Expand Widget Templates box.

Inside the XML (or HTML) code, search for the string 'data:post.editUrl'. The code section should look something like this if you don't have the Pencil button on.


To turn on the Pencil button, replace the red line on the code above with the blue line from the code below (as you can see, the rest of the codes remain the same):








2. Select the Quick Edit Button
Go to your Layout > Page Elements > Blog Posts Edit tab, and click on the Show Quick Editing box to turn it on. That's it.


Tuesday, August 26, 2008

Menubar for easy navigation

Here's a sample of where a menubar, aka a linkbar, is located - just below the header - easy for navigation. The basic templates in Blogger don't have this menubar.

All of the templates designed here have been coded to have this linkbar. To add links in the linkbar, go to the Layout --> Page Elements tab and click the Linkbar Edit link (see the red line below). The rest is easy!

Colors and fonts are easy to customize...

What do I mean by this?


Here's what it means. If you want to quickly change some colors or fonts, you'll go to the Layout --> Fonts and Colors page like the one on top. This is the easiest way to customize your own template if you don't know how to play around with the code.

But sometimes the things you can change are limited. For example, if you use the basic templates provided by Blogger, you have only about 10 - 20 items to customize. Other free templates also provided a limited number of things to change from, at most probably about 40 items.

But when using the templates provided here at Ourblogtemplates.com, you can change around 70 - 100 items, depending on the templates you use. That's way a lot more than the rest. This option is great if you got easily bored looking at the same templates, or if you want something a little bit different with your own taste.

If some of the items you want to customize don't change if you choose different colors or fonts, don't worry because those items might have been left there from a previously designed templates and are not meant for the templates you're using. The rest of the customizable items will work just fine.

If you're still not sure what I mean by all this, just try using one template designed here on a test blog that you can easily create (don't try on your main blog yet if you're not sure). You'll see how easy it is to customize the template.

Expandable Posts

What is it?
The "Read more..." option (aka "expandable posts") allows you to show a shorter version of a longer post, or a summarized version, in the main page of the blog. The readers can then expand the post to its longer full version in the post-page by clicking the "Read more..." button. This option is great if you have posts that are too long to be shown on the main page.

For this code, the "Read more..." link will only show up for the posts that have been selected to show the link, which is a good thing. There are other versions of the code that won't function properly: the "Read more..." link shows up even if you don't want it to show up.

To get all the templates with this Expandable Posts function, make sure the templates are labeled with Expandable posts.
How to use it?
Most of the new templates here have been added with the 'Expandable Posts' code. You pretty much don't have to do anything much. The only thing you need to do is to separate each post you publish into two parts:
  1. The summary part that will show up both in the shorter version and the full version.
  2. The other part that shows up only in the full version in its post-page.
To do this, you first have to click the 'Edit Html' button, and add the following code (in red) into your post editor and separate your post according to the example below. You can continue writing in the 'Compose' mode but the fullpost-separator tags won't show up.

Type your summary here

Type rest of the post here

This is how it looks in the Post Editor (with the 'Edit Html' mode):


How to make it easier?
You can make it easier not to type the fullpost-separator tags everytime you post. To do this, go to the Settings --> Formatting tab. At the bottom is the Post Template form. Type in only the code in red above (the fullpost-separator tags) into the Post Template form.

You're done. The fullpost-separator tags will be automatically inserted in the Post Editor everytime you want to post. You can see the tags in the 'Edit HTML' mode to see where to place your posts accordingly.

How to change the "Read more..." text?
You can easily change the text to whatever you want, e.g. "Continue reading...", "[...]", and so on. Just go to the Layout --> Edit HTML tab and click the Expand Widget Templates box. Search for the "read more..." string (the red line below) in the XML code and simply change it to whatever you want. See the example below:


What if I don't want the "Read more..." code?
Delete it. Go to the Edit HTML tab and click the Expand Widget Templates box. Search for the "data:post.body" string (the red line below) in the XML code and delete the code in red only.



expr:id='"post-" data:post.id'>








Read more...








Credit: The 'Expandable Posts' code by Hackosphere.

Saturday, January 26, 2008

How to get rid of the Blogger navigation bar?


Here's a snapshot of a Blogger blog and the navigation bar (navbar) is at the top shown by the green arrow.

So, how do you get rid of it if you don't want it hanging on top of your blog? If you want to turn it on instead of off, read the section at the end of the post.

To Turn Off the Blogger Navigation Bar
Just copy the Navbar1 code below and paste it anywhere inside your blog XML file as a CSS code after the /* Variable definitions section. If you're not sure what this means, follow these steps:

#Navbar1 {
margin: 0;
padding: 0;
display: none;
visibility: hidden;
}

1. Login to your blog and click the Edit HTML tab inside the Template tab.
2. Inside the file, locate the section body { ..... } and paste the Navbar1 code below this section, after the closing bracket.
3. Click 'SAVE TEMPLATE'.
4. That's it. You're done.

************************

It's easy to get rid of it. But know that the Navbar serves some purposes. The most valuable purpose for you is that it helps other Bloggers stumble upon your blog when they click the NEXT button on the Navbar searching for other blogs randomly. Not to mention that it's easy go to the login page if you have the Navbar on; otherwise, you have to open up the Blogger login page to login.

So, you decide which is the best for you. To have it on or off?

Update: How to turn on the Blogger navigation bar?
If you're using my templates, most of them don't have the Blogger navigation bar. But, if, you'd like to turn it on, simply look for the following code and delete the code in red.

#Navbar1 {
margin: 0;
padding: 0;
display: none;
visibility: hidden;
}

Friday, January 25, 2008

How to add META tags into your blog?

Do you want to improve your blog value, get more hits, and rank high on search engines? Then you must optimize how your blog is indexed in a search engine.

While there are lots of factors involved in building quality blogs that can draw huge traffic in, having simple things right in the beginning is as important. One of this simple thing is getting your blog indexed properly with the right description & keywords to optimize search engine rankings (known as Search Engine Optimization or SEO).

To get information, search engines use automated software agents called spiders, crawlers, robots, or bots to collect the a few words from a site or blog (typically the URLs, blog name, and blog description, and maybe some words in the early part of sentences or paragraphs) that will later be used as keywords to index the blog.

Because you cannot be certain which words are taken as keywords pertaining to your blog, it's most likely that your blog won't be indexed properly in search engines - in the worst case, your highly relevant keywords might not even be used to index your blog. When this happen, searches on keywords relevant to your blog may have your blog buried at the far end of the list of thousands and millions of pages. What a waste!

To have a control of what is read by crawlers on your blog to be indexed, you have to build what is called a META tag - basically a bunch of words that makes up the most relevant description and keywords of your blog. If the META tag exist, this is what the crawlers will read and index and get displayed on any searches related to your keywords.

Here's what a search on my blog looks like on Google. The description is exactly the one I have written in the META tag. The 1st search on the list shows the new META tag description that was made a few seconds before the snap. The old META tag is shown beneath it (22 hours ago).


There are basically 2 parts to a META tag: first is the META description and second is the META keywords. The description are what appears on a search. As you can see, if the description is too long, it'll be cropped as search engines only use a few lines to describe the blog. An optimum number of characters to use for META description is 150 (including spaces and dots).

For META keywords, you can use as many words as you want, but don't repeat the same word too many times (more than 5) to avoid keyword spam. Crawlers can identify keyword spamming easily - which won't make it good either for SEO.

To create a META tag, simply copy the code below and rewrite your META description and keywords (the red text):





Then, place it in between the ..... section near the top part of your template XML code. It's best to put it just below the <data:blog.pageTitle/> code.

For more details:
Go to this Free META Tag Builder tool. It directs you easily to build a META tag, create the HTML or XHTML code, and guides to paste it into your blog template XML code.

Just for the fun of it, you can analyze your blog's original description and keywords by submitting your blog URL at the Free META TAG Analyzer before placing the new META tags in your blog - so that you can compare how it is indexed before and after the change.