This Is A Sample Of Sticky Post


The Problem is: to do this trick, we must use HTML code to make up the text... But don't worry, if you are not capable with HTML Codes, there are simple and fast way to make your sticky post without learn it. Use your "New Post" to make a sample of your sticky post, set the display as close as your real post, use the Preview to check your sticky post display then copy-paste into your content collumn text add gadget.

Learn how to make this sticky post in http://doit2us.blogspot.com/2010/02/how-to-make-sticky-post-in-your-blogger.html

Showing posts with label main. Show all posts
Showing posts with label main. Show all posts

The Simplest And The Smartest Blogger Related Posts

>> Monday, May 24, 2010

We have been discussed about How To Make A Blogger Related Post before, by written a JavaScript and CSS directly into our HTML Template.

Although this methode is more safer because we could see the naked ("true") JS and avoid the malicious script, to some people especially for newbie, it could be complicated to implemented this method.

If you are searching "The Simplest And The Smartest Blogger Related Posts" and did not bother with external JS.. (Before make this posting, I already checked that this code was "clean", even I used it too for this blog). Than I think this Blogger Related Post Tips will fit with you. I have found this code in more tech tips

To display related links at the end of every post. copy this code into a new HTML/Javascript widget and place at the bottom of the post or at the footer in the page elements section.
Widget uses jQuery v1.3.2, If you already included jQuery into your blog. no need to do it again.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"  type="text/javascript"></script>
<script src="http://blogger-related-posts.googlecode.com/files/related-posts-widget-1.0.js" type="text/javascript"></script>
<script type="text/javascript">
relatedPostsWidget({
   'containerSelector':'div.post-body'
   ,'loadingText':'loading...'
});</script>
And this what will we look after save...

How To Make A Scroolbar Within Blog Post

>> Monday, April 19, 2010

This trick is rather similar with How To Make A Spoiler In Second on purposed and the final display, Each technique have their "positive and negative" factor. I don't want to discuss the "more and less" of each trick, is up to you to decided which one that will fit to your purpose. Scrollbars will be very useful to minimized the text area and allowing readers to view the full contents by clicking the bar. We usually saw this technique implemented  for Terms of Service, User Agreements, Rules, or Privacy Policy.

To make a scrollbar within the blog post, first we must define a class (write into HTML Template), this action is giving the "name" to this class and setting the display when it show, and then to applied within the blog post, we must "call" the class (by writing the class in our blog post).

Log in to Blogger >> In your Dashboard choose your Lay out blog >> Edit HTML >> and Find /* Sidebar Content */ and put this script to define a class below it:

.scrollingpostbar {
height:350px;
width:450px;
border:0;
overflow:auto;
}
You can rename .scrollingpostbar as you like, as long as you remember the "name", set the height and weight and border by adjust 350, 450 and 0 to make it fit with your post.


After finished, then we can type the text, although the tittle is How To Make A Scroolbar Within Blog Post, actually we can use this scrollbar mode in the page element in our template, exactly the same as How To Make A Spoiler In Second .

To show up in our blog post, after we have typed the TEXTARTICLE in the Post Editor, then click “Edit HTML” and paste these tags, exactly as this position:
<div class="scrollingpostbar">TEXTARTICLE</div>
I wrote this article again and applied this trick to show up how is the final display for example:

This trick is rather similar with How To Make A Spoiler In Second on purposed and the final display, Each technique have their "positive and negative" factor. I don't want to discuss the "more and less" of each trick, is up to you to decided which one that will fit to your purpose. Scrollbars will be very useful to minimized the text area and allowing readers to view the full contents by clicking the bar. We usually saw this technique implemented  for Terms of Service, User Agreements, Rules, or Privacy Policy.

To make a scrollbar within the blog post, first we must define a class (write into HTML Template), this action is giving the "name" to this class and setting the display when it show, and then to applied within the blog post, we must "call" the class (by writing the class in our blog post).

Log in to Blogger >> In your Dashboard choose your Lay out blog >> Edit HTML >> and Find /* Sidebar Content */ and put this script to define a class below it:
.scrollingpostbar {
height:350px;
width:450px;
border:0;
overflow:auto;
}
You can rename .scrollingpostbar as you like, as long as you remember the "name", set the height and weight and border by adjust 350, 450 and 0 to make it fit with your post.


After finished, then we can type the text, although the tittle is How To Make A Scroolbar Within Blog Post, actually we can use this scrollbar mode in the page element in our template, exactly the same as How To Make A Spoiler In Second .

To show up in our blog post, after we have typed the TEXTARTICLE in the Post Editor, then click “Edit HTML” and paste these tags, exactly as this position:
<div class="scrollingpostbar">TEXTARTICLE</div>
To make a scrollbar in page element.  Our Text or HTML/Javascript Code can be inserted directly into the template via Layout -> Page Elements -> Add a Gadget >> Text or HTML/JavaScript. Similarly, if we have typed it in the rich editor mode, we can click the “Edit HTML” link at the top right corner and insert the above tags.

After publishing the post or saving the page element, you will be able to see the text or HTML/JavaScript gadget within a box and the scrollbars automatically inserted. 
Note : this trick only works on Text or HTML/JavaScript gadget.

How To Delete Spam Comments In Blogger

>> Tuesday, March 23, 2010

A couple days ago, I found a comment contain with 10 links that not relevant with the article that I have post (spam comment). Since this incident,  I want to give brief tips for New Blogger about How To Delete Spam Comments In Blogger Blog.

Log in to Blogger. In your Dashboard >> choose your blog that you want to delete the comments (if you have more than one blog) >> and click View Blog.

Click the Title of the article that contain the comment that you want to delete >> and look at the "spam" comments.
Just Click the trash image and we will brought to the confirmation page.
Make sure to check the Remove forever? box if you want to delete that comment forever, but remember that this action can not be undone. After you have decided tu check or uncheck... Simply click the DELETE COMMENT.

Done.. the comment will be vanished and leaving the comments name / id and a notice that "This post has been removed by a blog administrator."

Blogger Related Post I- The Naked Script

>> Tuesday, March 16, 2010

Actually I had long enough to discuss about how to make a related posts widgets in blogger because of it's very useful function.

 According to the name - related post - this widget provides information to visitors who are reading our articles that there are other articles that discuss the similar or related topic that maybe they will be interested with. The main goal is to make our guess visiting times become longer, this means making our blogs become more populair and for those who put some ad on their site / blog, it will give more chance that the ad will get attention from the visitors.

After a long search from internet about how to make it, I found quite a lot of tutorial on "blogger related posts". Almost all of them use external JavaScript, some working and some did not. Most of Not Working related posts widget because of it's server and the other because of it's wrong Script, it seems to be a little miss code when posting the article. ( please read How To Posting Source Code in Blogger Post / Articles ).

Both long and/or short script related post widget that we find in the "blogger related post widget"  Tutor, actually consist of two major parts. JavaScript Codes that serves to showing related post itself, and HTML / CSS Codes that used to set the display of related post.

In this article I will not discuss about setting the display of related post widget, because we can find a lot of ways out there even displaying the related post with it's screenshot link.

As I ever mention in How To Make Recent Comment II. The use of external JavaScript (File JS stored on outside server) can speed up our web pages loading times. The problem is we often can not see directly the contents of those Java Script, because the server restrictions or by the owners file setting. This will lead us to fear of the presence of malicious script inside those "invisible" JavaScript.

So in accordance with the title Blogger Related Post - The Naked Script, I will give a Related Post JavaScript -Naked-  So you do not feel worry anymore cause you can see it's contents.

//<![CDATA[
var relatedTitles = new Array();
var relatedTitlesNum = 0;
var relatedUrls = new Array();
function related_results_labels(json) {
for (var i = 0; i < json.feed.entry.length; i  ) {
var entry = json.feed.entry[i];
relatedTitles[relatedTitlesNum] = entry.title.$t;
for (var k = 0; k < entry.link.length; k  ) {
if (entry.link[k].rel == 'alternate') {
relatedUrls[relatedTitlesNum] = entry.link[k].href;
relatedTitlesNum  ;
break;
}
}
}
}
function removeRelatedDuplicates() {
var tmp = new Array(0);
var tmp2 = new Array(0);
for(var i = 0; i < relatedUrls.length; i  ) {
if(!contains(tmp, relatedUrls[i])) {
tmp.length  = 1;
tmp[tmp.length - 1] = relatedUrls[i];
tmp2.length  = 1;
tmp2[tmp2.length - 1] = relatedTitles[i];
}
}
relatedTitles = tmp2;
relatedUrls = tmp;
}
function contains(a, e) {
for(var j = 0; j < a.length; j  ) if (a[j]==e) return true;
return false;
}
function printRelatedLabels() {
var r = Math.floor((relatedTitles.length - 1) * Math.random());
var i = 0;
document.write('<ul>');
while (i < relatedTitles.length && i < 20) {
document.write('<li><a href="'   relatedUrls[r]   '">'   relatedTitles[r]   '</a></li>');
if (r < relatedTitles.length - 1) {
r  ;
} else {
r = 0;
}
i  ;
}
document.write('</ul>');
document.write('<a rel="dofollow" href="http://doit2us.blogspot.com">Learn How To Make This Related Posts Widget [?]</a></font>');
}
//]]>
We can simply created Related Post Widget by putting this JS directly inside our HTML template codes...

Go to your Dashboard >> Layout >> Edit HTML and check Expand Widget Templates.
Find this codes
]]></b:skin>  
</head> 
and Put this simple display setting Script between it,
<style> #related-posts { float : left; width : 540px; margin-top:20px; margin-left : 5px; margin-bottom:20px; font : 11px Verdana; margin-bottom:10px; } #related-posts .widget { list-style-type : none; margin : 5px 0 5px 0; padding : 0; } #related-posts .widget h2, #related-posts h2 { font-size : 20px; font-weight : normal; margin : 5px 7px 0; padding : 0 0 5px; } #related-posts a { text-decoration : none; } #related-posts a:hover { text-decoration : none; } #related-posts ul { border : medium none; margin : 10px; padding : 0; } #related-posts ul li { display : block; background : url(&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGqvqR-bDh_nAOgr_pFA0bn85UUYp3T9Du4ap4fhObKxsZmLFCY0zatV3dnat2H0ZW_Y_bPZFBaqo_h-c6NQmZgvXfqPaeanBSh5mG5N4dByRpxZAeh85I19alDbwqJtoe-uOU5BQ0Azk/&quot;) no-repeat 0 0; margin : 0; padding-top : 0; padding-right : 0; padding-bottom : 1px; padding-left : 21px; margin-bottom : 5px; line-height : 2em; border-bottom:1px dotted #cccccc; } </style>
Next put the JavaScript right after (below) it. So the final Script will look like :
]]></b:skin> 
The Display Setting Script
Related Post JavaScript
</head>
Next search for <data:'post.body/>. In some templates this code may look like: 

<div class='post-body>
Add this folowing script just below  <data:'post.body/>
<b:if cond='data:blog.pageType == "item"'>
<div id="related-posts">
<font face='Arial' size='3'><b>Related Posts : </b></font><font color='#FFFFFF'><b:loop values='data:post.labels' var='label'><data:label.name/><b:if cond='data:label.isLast != &quot;true&quot;'>,</b:if><b:if cond='data:blog.pageType == &quot;item&quot;'>
<script expr:src='&quot;/feeds/posts/default/-/&quot;   data:label.name   &quot;?alt=json-in-script&amp;callback=related_results_labels&amp;max-results=5&quot;' type='text/javascript'/></b:if></b:loop> </font>
<script type='text/javascript'> removeRelatedDuplicates(); printRelatedLabels();
</script>
</div></b:if>
After finished all, Save Your Template and click View Blog.. there you go.. You have new related post widget in your blog.

Note :
  • To make this related post widget works.. then you must have more than one article with the same label/tag/catagories. 
  • This related post widget not work in your main page (home).

We will discuss more about this related post widget setting in the next artikel.

How To Make A Recent Comments II (JavaScript)

>> Tuesday, March 9, 2010

In previously post we have already discuss how to make a recent comments with Feed Widget Because using the URL Feed facilities, the possibility problem that will be arrise is when the server of URL Feed that we used is going "Down". Although this was very rare.

In this article we will discuss how to make a recent comments with JavaScript.

Actually there are several reason why these method are usually avoided by the blog/site owner to use it.
The negative point's of using JavaScript, Beside can make a web page loading become slow, nearly most of the Recent Comments Tutorial using JavaScript, upload their scripts onto their external sites and provide you a code for insertion into your template, this makes the site/blog owner being worried about the possibility of inserted code that could endanger their site/blog or malicious script.

Usually, inside the code that they provide willl have the script that look like this :

<script src="http//externalsite.com/.....html/filename.js">
</script>
From the blog visitors, when the page loads, their browser will visited that external site to read and run the script of .js file. That is where the problems will come "if" the .js file contained with malicious script.
Because of this situation, many users decided to configured their browser to disable the script, so that the script will not be able to see/read, and this means that your visitor couldn't be able to view your recent comments.
So.. please be carefulll if you have an external JavaScript file link make sure that there is no malicious script inside, and regularly check the script from the initial script change. More better if you have your own Script on your own server.

To avoid the problem above, in this article, we are not going to upload the script to our site and makes you link to it. We'll let you have the full JavaScript code that we have used so that you know what goes into it. 

Go to your Dashboard >> Layout >> Page Elements >> and Add a Gadget >> Choose and click HTML/JavaScript gadget.
Named your new gadget, write in title column ex: New Blogger Tips Recent Comments.
Copy  the code below and Paste into the Content column.
<ul><script style="text/javascript">
function showrecentcomments(json) {
for (var i = 0; i < 5; i  ) {
var entry = json.feed.entry[i];
var ctlink;

if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k  ) {
if (entry.link[k].rel == 'alternate') {
ctlink = entry.link[k].href;
break;
}
}
ctlink = ctlink.replace("#", "#comment-");
var ptlink = ctlink.split("#");
ptlink = ptlink[0];
var txtlink = ptlink.split("/");
txtlink = txtlink[5];
txtlink = txtlink.split(".html");
txtlink = txtlink[0];
var pttitle = txtlink.replace(/-/g," ");
pttitle = pttitle.link(ptlink);
if ("content" in entry) {
var comment = entry.content.$t;}
else
if ("summary" in entry) {
var comment = entry.summary.$t;}
else var comment = "";
var re = /<\S[^>]*>/g;
comment = comment.replace(re, "");

document.write('<li>');
document.write('<a href="'   ctlink   '">'   entry.author[0].name.$t   '</a>');
document.write(' on '   pttitle);
document.write('<br/>');
if (comment.length < 100) {
document.write(comment);
}
else
{
comment = comment.substring(0, 100);
var quoteEnd = comment.lastIndexOf(" ");
comment = comment.substring(0, quoteEnd);
document.write(comment   '...<a href="'   ctlink   '">(more)</a>');
}
}
document.write('</li>');
document.write('<div style="font-size:75%;text-align:center"><a href="http://doit2us.blogspot.com/2010/03/how-to-make-recent-comments-ii.html">Learn How To Make This Widgets</a></div>');
}
</script>
<script src="http://doit2us.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments">
</script></ul>
<noscript>You need to enable JavaScript to read this.</noscript>
You can set your "recent comments" display, by adjust these value..

The 5 value is the number of the last comment that will appear in your recent comments gadget.
The 100 value is the number of lenght characters comment in your recent comments gadget.
Don't forget to change http://doit2us.blogspot.com with your URL Site / Blog.

After finished configuring your HTML/JavaScript (setting the value and replace the URL) click save, and view your blog. You should have a Recent Comments widget showing the latest comments posted on your Blog.

This script has been added to the anticipation if our visitor disabled the JavaScripts browser, There will be warning text below our "recent comments title" that's says "You Need to enable JavaScript to read this"
That's all... Happy controlling your Recent Comments...

How To Make A Recent Comments I (Feed Widget)

>> Sunday, March 7, 2010

Two-way communication between the owners of a site, especially blogs, with their visitor are one of the most important thing for the development of the sites. In addition to ongoing the relationships with their visitors, the owners of the sites/blogs can digg up the information about strenghts and weaknesses of their sites, what are the visitors like and dislike, criticisms and suggestion and much more.

One of the way to building two-way communication within a site is to provide a visitors comments facilities. Almost all of the sites/blogs based on CMS like Blogger, Wordpress, Drupal, Joomla, Mambo. already have comments facilities for the visitors by defaults.

But the problem is... Along with increasing the number of articles made, it's rather difficult for the owner of sites to control (read and answer) because the location of the scattered comments in various articles that have been made.

The difficulty in controlling visitors comments that spread in various articles can be overcome by "Recent Comments" facilities. This Recent Comments will show up the last comments by the visitors in an article, hence the blog owner will soon find out that there are new comments in their articles, so that they can make a follow up.

In this article we will discuss how to make a recent comments with feed widget on Blogger.
Because we will use the Feed Widget, then first we must ensure that the Comment Feeds are enabled.

Go to your Dashboard >> click Settings of your Blog >> click Site Feed. You should set the “Blog Comment Feed” and “Per-Post Comment Feeds” to either “Short” or “Full”. Do not choose “None”. Then Save the Settings.  
 
Next Go back to Layout >> Page Elements >> Add a Gadget in your sidebar, select “Feed”. You will be prompted to enter a Feed URL.
 
There are two Feed URL we can used by default, you can choose one of them.
Atom Feed for the blog commnets like this: 
http://doit2us.blogspot.com/feeds/comments/default
 or RSS Feed as Blog Comments as follows :
http://doit2us.blogspot.com/feeds/comments/default?alt=rss
 

Please replace http://doit2us.blogspot.com with yours. After finished click Continue
 Next, You can set "how to display" your  recent comment. You can named your Recent Comments by insert the Title column, Setting how much last comment you want to show up (5 by default). You can also choose to displayed the dates and name of the authors or not. When you are satisfied with the setting, click to Save the Changes.
You still can set the position of your recent comments by drag and drop the widget to the relevant part of your template and Save the Template. 
In the next post we will discuss How To Make A Recent Comments With JavaScript

How To Make a Sticky Post in Your Blogger With a Simple Trick.

>> Friday, February 26, 2010

Because of the specific goals, sometimes we want every guest who visited our blog, read or see: pictures, messages, or a particular post on all of our blog pages they were visited, it's call a sticky post.
Usually we put the sticky post above the blog post.

In blogger post rule, a new post will be shown on the top, while the older one place below/after it or become archive (depending on your post setting), but with this very simple trick you can remain your post sticky at the top.

Actually this trick is very simple, The key is add the "Add a Gadget" widget above Blog Post in Page Element

By default this widget isn't there, we must doing a little trick first to get that widget. If you do not have Add a Gadget Widget yet, please follow this link http://doit2us.blogspot.com/2009/11/add-add-gadget-on-header-and-blog-posts.html

The rest step is just to add our Sticky Post (or you can put picture, message, HTML/JavaScript ) by Add a Gadget Widget above the blog post.

If you want to add a "post form" exactly like your post, then you can add a "Text" gadget.
Please not to write your post title in Title Column because it will show up as a "Gadget Title" not as a Post Title, you better write it in Content. and set the display as a Post Title.


The Problem is: to do this trick, we must use HTML code to make up the text... But don't worry, if you are not capable with HTML Codes, there are simple and fast way to make your sticky post without learn it. Use your "New Post" to make a sample of your sticky post, set the display as close as your real post, use the Preview to check your sticky post display then copy-paste into your content collumn text add gadget.

Open your Blogger Dashboard >> New Post. Write your sticky post.


Use Preview to check your final displal, Block your Sticky Post text.


Open your Dashboard in a new Tab >> Layout >> Page Element >> Add a Gadget (above your blogpost) >> Click Text >> Paste your Sticky Post into content column. and Save it.
And this is the final example...

How To Make Drop Capital Letter (Drop Cap) In Blogger Post

>> Tuesday, February 16, 2010

I n MS Word, there are facilities that can be used to create Drop Cap "formats the first character in the first paragraph as a drop capital letter", we often seen at the beginning of the novels, where the top of the first letter of the first word lines up with the top of the first sentence and drops down to the four or fifth sentence.

In this post we will learn how to create a drop cap in blogger post. exactly like the first sentence of this post.

1. Go to Dashboard >> Layout >> Edit HTML  and ensure you have checked the "Expand widget templates" box..
2. Then using your browser's search fuction, locate this CSS Code

.post {
  margin:.5em 0 1.5em;
  border-bottom:1px dotted $bordercolor;
  padding-bottom:1.5em;
  }
3. Add this CSS code right after it
.dropcaps {
float: left;
color: #000000;
font-size: 100px;
line-height: 80px;
padding-top: 1px;
padding-right: 5px;
}
So it will look like :
 
4. Don't forget to SAVE TEMPLATE 
5. If you want to create a drop cap in your post, then in the beginning word of your post, you  must type
<span class="dropcaps">Your First Letter</span>...second letter and so on
The following example is what I do on this post.
 
And you can see for yourself the Drop Cap display of this post.

6.  We can easily set/adjust the display of our Drop Cap by change the setting of .dropcaps.

You can change the color by change value #000000 (Black) with "yours". You can also change the setting of the font (size, height, weight, padding etc).

If you confuse about your HTML color code, then you can visit
http://doit2us.blogspot.com/search/label/change header color

Hope works for you and.. Good luck..!!

How To Get Rid Of "Read More..." In Blogger Post

>> Sunday, February 7, 2010

Unlike the other articles that discuss how to add or create Read more.. in blogger posts, I just have a problem to get rid of.it.
After change my template and try to make modification on it (look at http://doit2us.blogspot.com/2010/02/why-my-google-adsense-suddenly.html), All of my posts have "Read more..." facilities at the end of the posts, although I don't break the page. This became odd because almost all of my articles finished in one page, no need "Read more.." anymore.


Eventually, I've found that this technique works for me...

1. Go to Dashboard >> Layout >> Edit HTML  and ensure you have checked the "Expand widget templates" box.
2. Then using your browser's search function, locate the following line of code:
<data:post.body/>
3. Depending on your individual template, you may find this enclosed between <p> or <div> tags. We need to leave these tags intact.
4. If you've added any other "Read more" hacks to your template (or have added other conditional statements to the Blog Posts section), you may discover more than one instance of . If this is the case, you need to edit the section which has  <b:if cond='data.blog.url != data:blog.homepageUrl> a line or two above this.
The following example is on my HTML Template...

5. Delete script line below this (or similar <div class='post-body'...> on yours)
<div class='post-body' expr:id='&quot;post-&quot;   data:post.id'>
and leave one of   <data:post.body/>. This is finally modification script on my mine:
6. Click Save Template and preview your changes. If this has worked properly, your test post should display normally and clear without Read more... at the end of posts.

 

  © New Blogger Tips For Us Free Blogger Template by Mc 2010.

Back to TOP