Showing posts with label JavaScript. Show all posts
Showing posts with label JavaScript. Show all posts

Add HTML and java Scripts Inside Blogger posts in a Display Box

It is very difficult for anyone using Blogger blogs to show HTML codes and JavaScript inside the blog posts . You might have also seen people showing the scripts in small display boxes of fixed length and width. Now after applying this Blogger trick , you would be able to show HTML and JavaScript inside Blogger posts with custom display boxes .



Click on layout of the blog in which want show HTML or JavaScript and now select edit HTML .Before you apply any Blogger hack ,remember to download and save your full template.Now tick the expand widget templates and move onto the selection shown below ( towards the end of CSS code )



Otherwise you can press Cntrl+F and paste ]]></b:skin> on appearing search box then enterPaste the following CSS code above that line .



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;
}


The above code is for drawing a display box inside the Blogger post to show HTML and JavaScript.You can change the length ,width ,size and color of the box , back ground image etc. by editing the CSS code. After adding this code you can call the display box anytime into your post by following next step

<pre>

"your HTML or JAVA script"

</pre>

In Blogger in draft , there would be a problem with this HTML and JavaScript display box . For fixing that,Expand Post options from the Blogger text editor ( On the bottom left corner ) . From the compose settings, select Interpret typed HTML . Now everything would appear fine

Before you add "your HTML or JAVA script " make it post friendly by following this linkInside the box provided paste the script and click make it friendlyNow copy the generated code and paste between

<pre> & </pre>
to keep it inside display box

Making the script postable is the only requirement if you plan to show the HTML or Java Script alone , without a display box.


Please leave a comment if you like this post or subscribe to this blog via RSS or Email.

Add Digg button to Blogger

This is the step by step guide to show you how to add a Digg button to your Blog....
Digg is a social content website where your readers or you can submit content to. If you have a good story, members will 'digg' the post and write comments. As a blog owner, you may want to make it easy for and encourage your readers to submit and digg your articles.

Automatic Count and Vote Button

Before you do that though, you would want to take note of the following:-

1. Your blog should be set to save Post Pages. Post Pages are archived blog posts published to their own web page. Each post will have a unique URL, which is required by Digg for the individual posts to be submitted. To verify or enable it, login to your Blogger Dashboard. Under Settings-> Archiving, set the “Enable Post Pages?” to “Yes” and save the settings.

2. This template hack will put a Digg button to every post. You are therefore not able to choose which post you want to include or exclude a button. If you would prefer to have a Digg button added only to some posts, read the later part of this article on “Button for selective posts.”

3. The code reads the URL of the individual blog page and this shall be the URL used for submission of the story to Digg.

Under “Template”, click the “Edit HTML” tab. Block copy the entire HTML code for your site and save it in a text file. You can also click the "Download Template" link. This is one of the two necessary steps whenever you want to change the template. The second step is of course to “Preview” the new changes, and save the changes only when you are satisfied. The backup you have saved in a text file will come in handy when you accidentally click to save the changes without previewing them. With a backup, you can easily restore the template to the prior state if need be.

Click the box next to “Expand Widget Templates”. Scroll about two-thirds down the template to look for the code that reads:-

<p><data:post.body/></p>


If you want the button to show at the top right corner of your post, replace the above code with this.

<div style='float:right; margin-left:10px;'><script type='text/javascript'>digg_url="<data:post.url/>";</script><script src='http://digg.com/tools/diggthis.js' type='text/javascript'/></div><p><data:post.body/></p>


This is what you get:-


Please leave a comment if you like this post or subscribe to this blog via RSS or Email.