Wednesday, July 7, 2010

How To Post A Cut and Paste Code in Blogger

Have you ever tried posting a code in blogger like java code or something like a link code using plainly the code tags to be copied and paste by your readers? Have you seen anything happened? Most probably you didn’t see anything appeared on the post, and probably you are also getting error messages from blogger.

Posting a cut and paste code in Blogger though it’s not that easy to do, yet it’s not too complicated to work on. Let us go ahead and understand first what is happening why it is not appearing on the post.


First, we have to understand that blogger templates are usually in xml format. They use a totally different coding system. When you integrate a code or a javascript with blogger, you will have to parse it first so that it will become readable for the computer, and that blogger will recognize it as a function code.

This is totally different if Wordpress. You can just simply cut and paste the html code in the php and widget modules.

Secondly, you will need to modify and add a code in your template.

The big HOW?

Modify the template:

1. Log in to your account in blogger. Click Design> Edit HTML
2. Click Expand widget area
3. Click Ctrl-F and find this code:

]]></b:skin>  

4. Copy this code and paste right below the code in step 3.
pre
{
background:#efefef;
border:1px solid #A6B0BF;
font-size:120%;
line-height:100%;
overflow:auto;
padding:10px;
color:#000000 }
pre:hover {
border:1px solid #efefef;
}
code {
font-size:120%;
text-align:left;
margin:0;padding:0;
color: #000000;}
.clear { clear:both;
overflow:hidden;
}

5. Click Save Template.


Post a Cut and Paste Code
1. Click New Post Tab
2. Click Edit HTML Tab
3. Parse your code. If you have a Kompozer, simply type in the code in WYSIWYG mode. If you want to copy paste the codes, please use notepad or gedit. From that, copy paste it to the Kompozer. Copying it directly from word or open office will destroy the codes. So you need it without any other codes.
4. Click Source at the bottom tab.
5. Copy the parsed code of your original codes.
6. Paste the new codes
7. Enclose your new codes with these Pre tags:
<pre>Your Code</pre>
8. Click Publish.

Note: If you don’t have a Kompozer, you can use online tools which can parse your codes for Blogger. Try to visit this link.


If you have any question, I will be glad answer it.:)

Blessings!

0 comments:

Post a Comment

Commenting is good, it helps everybody. But SPAMMING is bad, it ANNOYS everybody.

NO SPAMMING PLEASE! SPAMMERS WILL BE PENALIZED!

About This Blog

This blog is a portfolio of knowledge about Money Making Online and Blogging. It is full of tutorials and helpful tips on successful blogging and making money online.

To start with, I highly recommend that you read 31 Days To Make A Better Blog.

Our Community

  © Blogger templates The Professional Template by Ourblogtemplates.com 2008

Back to TOP