Showing posts with label blogger. Show all posts
Showing posts with label blogger. Show all posts

Wednesday, March 17, 2010

Expanding or Shrinking an area in website like Youtube

As an user Youtube is a great video sharing service .As a web developer ,Youtube like any web 2.0 service ,comes with many effects . One of them is changing the size of video are ,expanding or shrinking with a click .

when you click on "wide" button ,video area expand to a larger size ,sidebar goes down and content in video area stretch fully . When you click on 'normal' ,video area shrink to normal size and sidebar goes up .

Live Demo

In this post ,I want to introduce to you how we can make this trick . It's easy to do and won't take you a lot of time and effort .
This trick is related to a Jquery's API name ToggleClass ,which is a part of Jquery framework .ToggleClass can add or remove one or more classes from each element in the set of matched elements ,for example ,we get an element like this
<div class="tumble">Some text.</div>
if we apply this statement $('div.tumble').toggleClass('bounce') ,it mean : find all div elements which has class "tumble" and add one more class"bounce" to these div elements . And the result we get here
<div class="tumble bounce">Some text.</div>
But if we apply $('div.tumble').toggleClass('bounce') again ,the div element above return to "tumble" class only ,"bounce" is removed . So the result after second time is <div class="tumble">Some text.</div>
Base on what ToggleClass can do ,to expand or shrink an element , we can make an element with initial size for example 600px width .When user click on wide button ,we use ToggleClass to add a class "wide" to this element . The "wide" class will re-define width to 900px . And when user click on Normal button , we will apply ToggleClass again for removing "wide" class .The width of element back to 600px .

So ,we got the idea .Here is an example .
In this example ,we create a web page with five elements like this :
<div id="header"></div>
<div id="main">
    <div id="content"></div>
    <div id="sidebar"></div>
    <div id="comments"></div>
</div>
<div id="footer"></div>
Now ,the CSS
#header, #content, #comments, #sidebar, #footer { margin:10px 0px; padding:30px;}
#header { width:900px; margin:0px auto;}
#main {width:960px; margin:0px auto; overflow:hidden;}
#content { width:540px; float:left;}
#comments { width:540px; float:left;}
#sidebar { width:280px; margin-left:20px; float:right;}
#footer { width:900px; margin:0px auto;}

#content.wide { width:900px;}
float attribute of sidebar element must be right for it can goes up and down .If you set this attribute to left ,it may ruin your design .

In the website ,create a link for switch between expanding and collapsing mode . A link like this :
<a id="wideView" href="#">Change View</a>
Elements are ready ,to make it work ,we need to add a script :
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#wideView").click(function() {
                $("#content").toggleClass("wide");
                $(this).toggleClass("wide");
            });
        });
    </script>
In the script above :
The first line : <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
for loading Jquery Framework so we can use jquery statements .
The following code :
$(document).ready(function() mean we only run this script when page are loaded fully .
$("#wideView").click(function() mean this function is only executed when user click on element which has id "wideView"
  $("#content").toggleClass("wide"); as I said on ToggleClass above ,this line will add a class 'wide' to element which has id="content" ,so re-define width of content from 540px to 900px
  $("#content").toggleClass("wide"); execute this line when user click element "wideView" again .This statement will remove the class 'wide' from element which id="content" ,so size of content element back to 540px;

Ok ,you are done .
Save webpage and see the result .
This trick can apply in websites and of course ,it work with Blogger . In this post ,I want to explain how it work to you and I hope you can apply it creatively ,unlike other posts, just show you a code and copy paste instruction .This can be used in video website like what youtube did ,or further ,changing web layout ...
Read more...

Expanding or Shrinking an area in website like Youtube

As an user Youtube is a great video sharing service .As a web developer ,Youtube like any web 2.0 service ,comes with many effects . One of them is changing the size of video are ,expanding or shrinking with a click .

when you click on "wide" button ,video area expand to a larger size ,sidebar goes down and content in video area stretch fully . When you click on 'normal' ,video area shrink to normal size and sidebar goes up .

Live Demo

In this post ,I want to introduce to you how we can make this trick . It's easy to do and won't take you a lot of time and effort .
This trick is related to a Jquery's API name ToggleClass ,which is a part of Jquery framework .ToggleClass can add or remove one or more classes from each element in the set of matched elements ,for example ,we get an element like this
<div class="tumble">Some text.</div>
if we apply this statement $('div.tumble').toggleClass('bounce') ,it mean : find all div elements which has class "tumble" and add one more class"bounce" to these div elements . And the result we get here
<div class="tumble bounce">Some text.</div>
But if we apply $('div.tumble').toggleClass('bounce') again ,the div element above return to "tumble" class only ,"bounce" is removed . So the result after second time is <div class="tumble">Some text.</div>
Base on what ToggleClass can do ,to expand or shrink an element , we can make an element with initial size for example 600px width .When user click on wide button ,we use ToggleClass to add a class "wide" to this element . The "wide" class will re-define width to 900px . And when user click on Normal button , we will apply ToggleClass again for removing "wide" class .The width of element back to 600px .

So ,we got the idea .Here is an example .
In this example ,we create a web page with five elements like this :
<div id="header"></div>
<div id="main">
    <div id="content"></div>
    <div id="sidebar"></div>
    <div id="comments"></div>
</div>
<div id="footer"></div>
Now ,the CSS
#header, #content, #comments, #sidebar, #footer { margin:10px 0px; padding:30px;}
#header { width:900px; margin:0px auto;}
#main {width:960px; margin:0px auto; overflow:hidden;}
#content { width:540px; float:left;}
#comments { width:540px; float:left;}
#sidebar { width:280px; margin-left:20px; float:right;}
#footer { width:900px; margin:0px auto;}

#content.wide { width:900px;}
float attribute of sidebar element must be right for it can goes up and down .If you set this attribute to left ,it may ruin your design .

In the website ,create a link for switch between expanding and collapsing mode . A link like this :
<a id="wideView" href="#">Change View</a>
Elements are ready ,to make it work ,we need to add a script :
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $("#wideView").click(function() {
                $("#content").toggleClass("wide");
                $(this).toggleClass("wide");
            });
        });
    </script>
In the script above :
The first line : <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script>
for loading Jquery Framework so we can use jquery statements .
The following code :
$(document).ready(function() mean we only run this script when page are loaded fully .
$("#wideView").click(function() mean this function is only executed when user click on element which has id "wideView"
  $("#content").toggleClass("wide"); as I said on ToggleClass above ,this line will add a class 'wide' to element which has id="content" ,so re-define width of content from 540px to 900px
  $("#content").toggleClass("wide"); execute this line when user click element "wideView" again .This statement will remove the class 'wide' from element which id="content" ,so size of content element back to 540px;

Ok ,you are done .
Save webpage and see the result .
This trick can apply in websites and of course ,it work with Blogger . In this post ,I want to explain how it work to you and I hope you can apply it creatively ,unlike other posts, just show you a code and copy paste instruction .This can be used in video website like what youtube did ,or further ,changing web layout ...
Read more...

Tuesday, March 16, 2010

How often should you blog?

One of the blog readers asked to share my experience on the topic of how frequently the blog should be updated to reach the best outcomes. Let’s see what the expert’s advices are.

So how do you decide how often to blog? What’s the magic formula? There’s no definitive approach to figuring this out. Instead, take time to ponder the recommendations offered by WebWorkerDaily to help you find what will work for your blog.

  • Review your business goals. Increasing blog readership is a worthy goal, but how does the blog support your business’ goals? If your web site itself is the income generator, then you’ll need frequent fresh content. If the blog is for promoting you as an expert in your field, which in turns supports your consulting business, then you probably don’t need to blog daily.
  • Know your audience. What jobs do your readers have? How much of their time do they have for reading blogs? How active are they on blogs and social media? What industry do your readers come from? Are they reading during the workday or after hours?
  • Identify your contributors. Is your publication a one-person blog or a group blog? Group blogs cut the chances of burnout.
  • Look at the length of your posts. Some people with large followings write 1,000+ word posts; these people tend to publish less often. Readers may better tolerate daily posts when they’re shorter: 200-400 words. Some bloggers mix it up with longer posts on a weekly basis, with shorter posts filling in the other days.
  • Check web site stats. After adjusting your blogging frequency, check to see if the stats have changed. Remember that while a change could be associated just with the frequency or posting, it could also be because the content quality or level of blog promotion changed.
So, Mister S., did you get the answers? Probably, no… Because, the question on the blog publishing frequency has multiple dimensions, and does not have a magic answer. Let’s say, more you write, you have a higher chance to get the wide-spread exposure in a shorter amount of time. Not only do new blog posts give people a reason to return to your blog, but they also help your blog in terms of search engine optimization. Each new post is a new entry point for people to find your blog through search engines. The more entry points, the better the chances are that new readers will find your blog.

However, do you have abilities and time to publish several quality posts on a daily basis? In most cases, frequent publishing is a sign of a splog, not a busy blogger. So, be sure to offer the attractive content as much as you can. But, do not lose a fun of writing and do not get burn out, rushing for publicity. I would say that consistency of the posts is more important than frequency. If your readers are used to your two posts a week, do not disappoint them by long gaps. They might just leave and never come back.


Read more...

Sunday, March 14, 2010

Displaying Twitter Followers as Text

Image representing Twitter as depicted in Crun...

You can show number of Twitter Followers using third-party services ,but in some cases ,showing a gadget from third-party service may break your web / blog design . So ,it's a time for us to look for a solution to display number of followers as text and ,of course ,we can format this number with CSS for blending with our design .
In this post ,I will show you how we can display the number of Twitter followers as text using Twitter api and a bit of Jquery .

Steps  for making this :
1,In Page elements ,create an HTML/Javascript widget  . As I said in many posts ,you can paste the code direct to template file but it's hard to find and remove when error. So it's better if we use a widget .
2,Paste this code to widget content :
<style>
        body { font-family: Arial, Helvetica, sans-serif; }
        a { color: #0066cc; text-decoration: none; }
        a:hover { text-decoration: underline; }
    </style>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
       
        beforecounter = " [<b>";
        aftercounter = "</b>]";

        $.getJSON('http://api.twitter.com/1/users/show/YOUR_TWITTER_ACCOUNT.json?&callback=?',
            function(data) {
                $('#twitter').append(beforecounter + data.followers_count + aftercounter);
        });

    })
    </script>
<h2>Followers</h2>
<ul>
    <li><a href="http://twitter.com/" id="twitter">Twitter</a></li>
</ul>
in the code above ,please change "YOUR_TWITTER_ACCOUNT" to your account name .
the result of will be show in this line
<ul>
    <li><a href="http://twitter.com/" id="twitter">Twitter</a></li>
</ul> 

You can format this code by adding more CSS for displaying as you want . Adding a Twitter icon , make a round border for this element ... sound fun ,right :))
I hope this post helpful to you .
Read more...

Thursday, March 11, 2010

Simplex Portfolio - Blogspot template for Gallery and online Portfolio

Some of you commented in my blog for asking the template named Simplex Portfolio in live demo of previous posts . Now ,I will introduce it to you all . Template :simplex Portfolio .
It's a template for gallery and online portfolio ,I think it the best for showing artwork .
This template has a blog and a gallery ,you can upload your image to gallery and share your thoughts ,your information in Blog . Like templates Simplex Worldnews and Simplex Darkness upgraded ,I made this template for easy to configure via widget system ,and try to make it easy to use . But as usual ,I still need your comment and advice for make this better .
Here is screenshot :


Gallery page


Live Demo | Download

Here is instruction to install this template :

1,Download template and unzip it . You get a template file in xml format and a folder for images. You can upload images to an image hosting and change links in template file accordingly .In template file ,I uploaded images to Imageshack hosting which is unlimited bandwidth ,so you don't need to upload images .

2,Upload template to Blogger .
3,To setup Search form ,Go to Dashboard -> Layout -> Edit HTML .Checked on Expand widget templates .Search for this code
         <form action="http://www.google.com/cse" id="cse-search-box" target="_blank">  <div>    <input type="hidden" name="cx" value="partner-pub-5647776272363922:fs5grtk1eoj" />    <input type="hidden" name="ie" value="ISO-8859-1" />    <input type="text" name="q" size="31" />    <input type="submit" name="sa" value="Search" />  </div></form><script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script&gt
Go to Google Adsense , create a searchbox and replace the code above with your own searchbox code .
3,Go to Page elements ,you see this screen :


-Pages widget is for showing pages in your blog .It's located in top-navigation bar of your blog  .You can create a page in Posting section and your page will be shown automatically in top navigation bar.
-To change logo to your site logo ,click on Edit button in logo widget and change url in img tag to yours :

-Menu widget is for adding sub-categories in Gallery category .If you add a link to menu widget ,it will be shown as a sub-category of Gallery .


in this picture ,there are 4 sub categories of Gallery name : dawn ,tree,seasons,and nature
-Gallery widget is used for control the images and slider in homepage .

To show images in slider ,click on edit button in gallery widget and change the title of widget to the category you want .
To show images in homepage but outside the slider ,click on edit button in Gallery widget and change the content of this widget to category you want.

-Gallery bottom widget is for adding ads to homepage .You can click on edit button of Gallery bottom widget and paste the code of Ads into widget content .
-Categories widget is for adding link to category in your website .
In footer of website
-About me widget is for adding blog author information .
-Pages2 widget is for showing pages in blog
-Categories widget is for adding link to category in your website
-Blogroll is for adding link to other site .
This template has many place for adding widget ,so you can add  your owns easily

Usage

-To post in Gallery ,create post as structure bellow :

image 
description

and add label "gallery" to post for Blogger understand that it's a post in gallery . You can also add other labels for sub-categories and add link to these subcategories in menu widget .
-To post in blog ,create a post as normal and add label "blog" for Blogger know that it's a post in blog ,not gallery .
That's all
I hope you love this template . Feel free to add comments and suggestion .
Thanks for all !
Read more...

Wednesday, March 10, 2010

JonDesign's Smooth Gallery - An awesome Gallery in Mootool

I'm familiar with Jquery ,but I find out that Mootool also has some good plugins ,and their effect are very impress . JonDesign's Smooth Gallery (JdGallery) is one of them .It's not only a good slider and carousel for website but also a complete gallery .
In this post , I want to introduce this Mootool's plugin to you all .With this plugin ,you can set up a complete gallery without using Flash as before .
See it screenshot :






And see it in action in the live demo 
Images is organized in Categories ,name of categories are displayed in the top-right of the gallery .When you click on the name of a category ,it goes down and show you images contain in . You can browse and choose the image you want to show .Or you can do nothing and let images auto slide ...
Now ,I will show you how we can apply this script to our site or blogger to make a gallery :
1,Download this script here
2,Unzip and you will see 3 folders and some html file for demo .Name of 3 folders are : CSS,images and scripts .Upload all files in Script folder and file jd.gallery.css in CSS folder to a host . The best is Google code
3,You can insert the code bellow direct to Blogger template file ,but it's easier if you insert in a HTML/Javascript widget . I heard people complaint it's hard to find and edit in Blogger template file (xml format) so it will be easy if you just work with a widget .
So,Adding a HTML/Javascript widget and paste this code into widget content first :

<link rel="stylesheet" href="url..../jd.gallery.css" type="text/css" media="screen" charset="utf-8" />
        <script src="url.../mootools-1.2.1-core-yc.js" type="text/javascript"></script>
        <script src="url..../mootools-1.2-more.js" type="text/javascript"></script>
        <script src="url..../jd.gallery.js" type="text/javascript"></script>
<script src="url..../jd.gallery.set.js" type="text/javascript"></script>
<script src="url..../jd.gallery.transitions.js" type="text/javascript"></script>


Ok,those are basic javascript file for JdGallery plugins .Other files will be added for special function ,for example : image zoom ,or Forward/Back navigation ...
4,Adding images to gallery as structure bellow

<div id="myGallerySet">
  <div id="gallery1" class="galleryElement">
    <h2>Category 1</h2>
    <div class="imageElement">
      <h3>Item 1 Title</h3>
      <p>Item 1 Description</p>
      <a href="#" title="open image" class="open"></a>
      <img src="link to image 1" class="full" />
      <img src="link to image 1 in thumbnail" class="thumbnail" />
    </div>
    <div class="imageElement">
      <h3>Item 2 Title</h3>
      <p>Item 2 Description</p>
      <a href="#" title="open image" class="open"></a>
      <img src="link to image 2" class="full" />
      <img src="link to image 2 in thumbnail" class="thumbnail" />
    </div>
  </div>
  <div id="gallery1" class="galleryElement">
    <h2>Category 1</h2>
    <div class="imageElement">
      <h3>Item 1 Title</h3>
      <p>Item 1 Description</p>
      <a href="#" title="open image" class="open"></a>
      <img src="link to image 1" class="full" />
      <img src="link to image 1 in thumbnail" class="thumbnail" />
    </div>
    <div class="imageElement">
      <h3>Item 2 Title</h3>
      <p>Item 2 Description</p>
      <a href="#" title="open image" class="open"></a>
      <img src="link to image 2" class="full" />
      <img src="link to image 2 in thumbnail" class="thumbnail" />
    </div>
  </div>
......................... 

</div>

In the code above,each image is covered by the code :
<div class="imageElement">
      <h3>Item Title</h3>
      <p>Item Description</p>
      <a href="#" title="open image" class="open"></a>
      <img src="link to image" class="full" />
      <img src="link to image in thumbnail" class="thumbnail" />
    </div>
link to image and link to image in thumbnail can be the same if you don't want resize image to thumbnail .
Image elements above are covered in category as structure :
<div id="gallery" class="galleryElement">
    <h2>Category name</h2>
    <div class="imageElement">
     ......................
    </div>
    <div class="imageElement">
      ...................
    </div>

  </div>
And categories are covered in an element with id=myGalleryset as bellow :

<div id="myGallerySet">
  <div id="gallery1" class="galleryElement">
   
.....................
  </div>
  <div id="gallery2" class="galleryElement">
   ................
   </div>
......................... 

</div>
Very straight and easy . You can add more element for images and categories as you want like the structure I showed above .
6,To make it work ,we must add this code  at the end of widget content :

<script type="text/javascript">
function startGallery() {
var myGallerySet = new gallerySet($('myGallerySet'), {
timed: true
});
}
window.addEvent('domready', startGallery);
</script>
Save widget and see the result .
This post is very simple . I just want to introduce to you a Mootool's plugin and the basic to set-up a gallery . This plugin has many options and I can't write all here because it will be so long .If you want to know more ,you can see in this site
I hope you like it  !
Read more...

Monday, March 8, 2010

Showing your location by Google Static map

In websites on travel ,restaurant ...,they usually provide a map for readers to show up their location . It's very good for readers to know where they are and how to reach to their location .
You have a shop,a restaurant ,and you want to adding a map to your location ? It's very easy ,my friends .See the map I added bellow and I will show you the trick :




Now ,let's take a look on what is beyond the map ?
Here is the code for map
<img src="http://maps.google.com/maps/api/staticmap?center=21.075313,105.772897&zoom=14&size=480x480&markers=color:red|label:S|21.075313,105.772897&sensor=false" />
just a HTML tag for inserting image . But the secret is in the URL :
http://maps.google.com/maps/api/staticmap?center=21.075313,105.772897&zoom=14&size=480x480&markers=color:red|label:S|21.075313,105.772897&sensor=false
This is URL to an map which is created by Google  Static Map - a service of Google . You send an URL which contain parameters such as location,zoom level,size of map,marker ...like the URL above to Google Static Map and it return an image which is map of your location . You can paste the URL above direct to browser address bar and see the map .
Let's go deeper in the URL above :
- http://maps.google.com/maps/api/staticmap?: this is HTTP request for Google Static Map service
-center=21.075313,105.772897 : center parameter defines the center of the map, equidistant from all edges of the map. This parameter takes a location as either a comma-separated {latitude,longitude} pair (e.g. "21.075313,105.772897") or a string address (e.g. "city hall, new york, ny") identifying a unique location on the face of the earth .If you are outside US , using string address sometimes receive a wrong result . So the best is using latitude and longitude . But how to know the latitude and longitude of a location ? You can go to this webpage , choose your location in map ,when you see your location ,double click and you will see the latitude and longitude .
-zoom=14 mean the zoom level of map is 14 . Zoom levels go from 0 to 21 .You can test them for the best result.
-size=480x480 : mean the size of map is 480x480 pixels . Maximum is 640x640 pixels .
-markers=color:red|label:S|21.075313,105.772897 is marker of your location in map. Markers parameter come with a set of value assignments . Color is the fill color of your marker ,label is the character which show up on your marker ,and the last value is latitude,longitude or string address of your location .If you want to mark more than one location ,you can add more markers parameter ,each of them mark a location .
-sensor=false : specifies whether the application requesting the static map is using a sensor to determine the user's location. This parameter is required for all static map requests
Now ,joining all parameter to an URL and place it in src attribute of img tag ,we can show a map for a location .
There are many options which can be add to URL for making a map as our need (for example ,show a path ,show a satellite map...)  .In this post ,I can only cover the basic . Detail can be found here .
I hope this post helpful to you . Thanks for reading .
huy signature
Read more...

Showing your location by Google Static map

In websites on travel ,restaurant ...,they usually provide a map for readers to show up their location . It's very good for readers to know where they are and how to reach to their location .
You have a shop,a restaurant ,and you want to adding a map to your location ? It's very easy ,my friends .See the map I added bellow and I will show you the trick :




Now ,let's take a look on what is beyond the map ?
Here is the code for map
<img src="http://maps.google.com/maps/api/staticmap?center=21.075313,105.772897&zoom=14&size=480x480&markers=color:red|label:S|21.075313,105.772897&sensor=false" />
just a HTML tag for inserting image . But the secret is in the URL :
http://maps.google.com/maps/api/staticmap?center=21.075313,105.772897&zoom=14&size=480x480&markers=color:red|label:S|21.075313,105.772897&sensor=false
This is URL to an map which is created by Google  Static Map - a service of Google . You send an URL which contain parameters such as location,zoom level,size of map,marker ...like the URL above to Google Static Map and it return an image which is map of your location . You can paste the URL above direct to browser address bar and see the map .
Let's go deeper in the URL above :
- http://maps.google.com/maps/api/staticmap?: this is HTTP request for Google Static Map service
-center=21.075313,105.772897 : center parameter defines the center of the map, equidistant from all edges of the map. This parameter takes a location as either a comma-separated {latitude,longitude} pair (e.g. "21.075313,105.772897") or a string address (e.g. "city hall, new york, ny") identifying a unique location on the face of the earth .If you are outside US , using string address sometimes receive a wrong result . So the best is using latitude and longitude . But how to know the latitude and longitude of a location ? You can go to this webpage , choose your location in map ,when you see your location ,double click and you will see the latitude and longitude .
-zoom=14 mean the zoom level of map is 14 . Zoom levels go from 0 to 21 .You can test them for the best result.
-size=480x480 : mean the size of map is 480x480 pixels . Maximum is 640x640 pixels .
-markers=color:red|label:S|21.075313,105.772897 is marker of your location in map. Markers parameter come with a set of value assignments . Color is the fill color of your marker ,label is the character which show up on your marker ,and the last value is latitude,longitude or string address of your location .If you want to mark more than one location ,you can add more markers parameter ,each of them mark a location .
-sensor=false : specifies whether the application requesting the static map is using a sensor to determine the user's location. This parameter is required for all static map requests
Now ,joining all parameter to an URL and place it in src attribute of img tag ,we can show a map for a location .
There are many options which can be add to URL for making a map as our need (for example ,show a path ,show a satellite map...)  .In this post ,I can only cover the basic . Detail can be found here .
I hope this post helpful to you . Thanks for reading .
huy signature
Read more...

Sunday, March 7, 2010

Make thumbnail for related posts

You may know the code for related posts which I showed in previous post in Simplex Design blog. In this post ,I want to show you the code for adding thumbnail to related posts . This code is based on related posts code before but add some lines for thumbnail . I myself don't create this code ,I found it in Bloggerpluggins blog,and introduce it here ,I hope it helpful for you all .

You can take a look on related post with thumbnails at live demo
 


Here is steps for doing this hack :
1,Go to Dashboard ,continue to Layout --> Edit HTML .Checked on Expand Widgets template .
2,Look for  </head>
and replace it with :

<!--Related Posts with thumbnails Scripts and Styles Start-->
<!-- remove --><b:if cond='data:blog.pageType == &quot;item&quot;'>
<style type="text/css">
#related-posts {
float:center;
text-transform:none;
height:100%;
min-height:100%;
padding-top:5px;
padding-left:5px;
}

#related-posts h2{
font-size: 1.6em;
font-weight: bold;
color: black;
font-family: Georgia, &#8220;Times New Roman&#8221;, Times, serif;
margin-bottom: 0.75em;
margin-top: 0em;
padding-top: 0em;
}
#related-posts a{
color:black;
}
#related-posts a:hover{
color:black;
}

#related-posts  a:hover {
background-color:#d4eaf2;
}
</style>
<script type='text/javascript'>
var defaultnoimage="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKOINl99YGs9_-i80F5VnrvSauA6q65tqJ5TXD1LbnMVOIqK_dbx7DKAXkHlL9GWhlRH4ClG730Seze7Yf2UE_x4gYjh3aOB8wx5OSKOMQ7B3xL4XexOz-dUhIvgRUeYs28UvNBszGLDU/s400/noimage.png";
var maxresults=5;
var splittercolor="#d4eaf2";
var relatedpoststitle="Related Posts";
</script>
<script src='http://blogergadgets.googlecode.com/files/related-posts-with-thumbnails-for-blogger-pro.js' type='text/javascript'/>
<!-- remove --></b:if>
<!--Related Posts with thumbnails Scripts and Styles End-->
</head>
This is CSS for formatting related posts section .
3,Find <div class='post-footer-line post-footer-line-1'>
or <p class='post-footer-line post-footer-line-1'>
if you don't find any of two lines above in templates ( for example ,in template I designed ^^) you can find this <p><data:post.body/></p>
and add the code below after these line :
<!-- Related Posts with Thumbnails Code Start-->
<!-- remove --><b:if cond='data:blog.pageType == &quot;item&quot;'>
<div id='related-posts'>
<b:loop values='data:post.labels' var='label'>
<b:if cond='data:label.isLast != &quot;true&quot;'>
</b:if>
<script expr:src='&quot;/feeds/posts/default/-/&quot; + data:label.name + &quot;?alt=json-in-script&amp;callback=related_results_labels_thumbs&amp;max-results=6&quot;' type='text/javascript'/></b:loop>
<script type='text/javascript'>
removeRelatedDuplicates_thumbs();
printRelatedLabels_thumbs(&quot;<data:post.url/>&quot;);
</script>
</div><div style='clear:both'/>
<!-- remove --></b:if>
<!-- Related Posts with Thumbnails Code End-->
There are some variables in this code and you can change its value for making related posts section as you want .

var maxresults=5;
the number of related post which will be show

var relatedpoststitle="Related Posts";
title of related posts section
var defaultnoimage="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKOINl99YGs9_-i80F5VnrvSauA6q65tqJ5TXD1LbnMVOIqK_dbx7DKAXkHlL9GWhlRH4ClG730Seze7Yf2UE_x4gYjh3aOB8wx5OSKOMQ7B3xL4XexOz-dUhIvgRUeYs28UvNBszGLDU/s400/noimage.png";
url of default image if it can't create thumbnail

var splittercolor="#d4eaf2";
color of splitter line .
4,Save your template and you are done .

huy signature
Read more...

Tuesday, March 2, 2010

So is it definitely that blogger no longer accepts...

So is it definitely that blogger no longer accepts that code because its still working on my other blogger http://icechipper.blogspot.com/ and I'm afraid to make any changes there now.

I just don't get that. Can anything be done to find out what is happening for sure. Can you contact someone that is maybe higher up the coding scale on blogger?

Otherwise I have to change all 365 links for my main menu and that doesn't seem fair for blogger to do this without an advance notice of some kind.

Thank you.
Read more...

Then it is coding that Blogger no longer accepts. ...

Then it is coding that Blogger no longer accepts. What part disappears?
Read more...

Wednesday, February 24, 2010

Make a pop-up contact form for Blogger using Fancy Box and Google Docs

There's a request for making pop-up contact form in my blog. So in this post ,I will show you the tip to make a contact form for Blogger ,using free service Google Docs and a Jquery Plugin name Fancy Box .
Here is screenshot :


Live demo



Here is the tip :
1,Go to Layout ,continue to Edit HTML ,check on Expand Widget Templates
2,Insert this code right after ]]></b:skin>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.4.1.min.js"></script>
    <script type="text/javascript" src="http://dinhquanghuy.110mb.com/contactform/jquery.fancybox-1.3.0.pack.js"></script>
    <link rel="stylesheet" type="text/css" href="http://dinhquanghuy.110mb.com/contactform/jquery.fancybox-1.3.0.css" media="screen" />


3,Go to this address ,paste script bellow to text area in the page ,and click encode :
<script type="text/javascript">
        $(document).ready(function() {
                        
            $("#contact_form").fancybox({
                'width'                : '75%',
                'height'            : '75%',
                'autoScale'         : false,
                'transitionIn'        : 'none',
                'transitionOut'        : 'none',
                'type'                : 'iframe'
            });
            
            
        });
    </script>   
Copy the result and paste to template file right after the code in step 1 .
3, In previous post ,I told you tip to make Contact form for Blogger using Google Docs . You can read it here
When you created a contact form in Google docs ,it give you a link to form like this : http://spreadsheets.google.com/embeddedform?formkey=dGF2d0VzaXJfMUx3WWpaOXpJc1FKOWc6MA

Now ,what we need to do is add a link to pop-up contact form . Add this code to your template file where you need a 'contact me' link
<a id="contact_form" href="http://spreadsheets.google.com/embeddedform?formkey=dGF2d0VzaXJfMUx3WWpaOXpJc1FKOWc6MA">Contact me</a>
Remember to change the link to contact form in script above to your contact form link
Save template !
Ok,we are done.
So anytime we click on 'contact me' link ,a pop-up window which contain Google Docs contact form will appear .
Enjoy it ^^
huy signature
Read more...

Tuesday, February 23, 2010

10 Titillating Tips for Making Money Blogging

Guest Post by Chris

So you want to make money blogging but you don't know where to start, eh? Well you should start by NOT purchasing one of the thousands of make money online guides that haven't made anyone rich ... except the people selling the make money online guides.

The truth is, the vast majority of people who make an income blogging do so by being passionate about what they blog about. Are you passionate about what you blog about? You should be. Because your competitors are; every online niche -- ranging from biography to baseball -- has at least a handful of bloggers that actually love what they write about.

If you want to beat them to an audience, you are going to have to get ahead of the curve. Below are ten sure-fire ways you can do that.

1. Make sure your entire blog is search engine optimized. This means: using h1 headings, alt and title attributes, bountiful content, large amounts of internal links and meta description tags.

2. Promote your feed – it's your lifeline to potential returning visitors. Your visitors should have a way of easily accessing content to your site and, sometimes, they don't prefer to visit your URL. You should be using Google FeedBurner so that you can record feed stats, optimize with Google's ping service and monetize your feeds with AdSense.

3. Get external dofollow links to your blog. Don't point them all at the frontpage with the same anchor text. Make sure you get links from sites that are related – the mighty Google knows the difference.

4. Research different advertising options. Remember – AdSense is not always the answer. I have known long time bloggers who turned completely to services like ClickBank and Paydotcom (affiliate networks) and have increased their profits by ten fold.

5. Identify good ad placement spots on your blog. The eye often starts mid-left on the page, which makes it an ideal place for advertisements; but not all blogs are structured the same way. You may have design elements in your template that cause the eye to start in different places on the page. Experimenting with different ad placements is the only way to maximize their performance.

6. Feature an 'Advertise Here' page on your blog with traffic and demographic stats for potential advertisers. Some blogs get 90% of their income from private advertisers so you want to make it easy for them to contact you.

7. Never have blank banners on your blog. Run dummy ads if you don't have advertisers yet. Use the space to advertise that you are looking to sell ad space.

8. Take advantage of social networking mediums like Facebook and Twitter. No matter how little known your blog is, you should have a Facebook and Twitter page because some people prefer using these services to follow you.

9. Insert share buttons at the bottom of each of your blog posts. You never know when someone might submit something of yours, allowing your blog massive Stumbleupon or Digg traffic.

10. Frequently update your blog. You will never gain followers if you are a lazy, infrequent blogger. This is the single most important thing to practice if you are looking to make money blogging.

If you regularly practice the above methods, with determination (and maybe a little luck), you will be making a profit from your blog in no time. Stay driven, stay consistent and don't give up!

Author Bio:
Chris has written an extensive four article series on how to make money blogging at his new blog about blogging which features fabulous blogging tips, tricks and resources!
Read more...

Wednesday, February 3, 2010

Simplex Darkness template has been upgraded

Simplex Darkness is one of the most popular template of mine . It was designed in magazine style and it's good with many kinds of website .
Some people commented in my blog for errors ,suggestion ... and thank to them ,I can make a better template.
Most of comments are around the installing ,usage and errors in browsers . So in this version ,I made some upgrades :
-Make this template easier to install .You don't need to editing the code much .
-Some elements such as navigation ,list of page ,the categories are controlled via widget in Page elements
-More spaces to add widget .





Note: Page element is fixed . So now when you open a page ,it will show full post instead of being shorted .Check the live demo for result .Download link for fixed version is provided in this post
here is the screen of Page elements :


Live Demo | Download

How to install :
1,Download template file .This package included a folder of images so you can upload images to your host and change url in template file .
2,Upload template to Blogger .
3, Go to Page elements
To install logo ,click on edit link at the logo widget , and paste image to widget content as structure bellow

Do the same with banner widget . Paste your ads to widget content .
4,To install Page in top-navigation ,go to Blogger in Draft to create page and the page will be displayed automatically in top-navigation .
5,To show post in a category in slideshow ,click on edit button of slideshow widget .In widget title ,enter the title you want to show for the category ,and in widget content ,enter the category(or label ) , for example ,I want to show all recent posts under category 'Feature' in slideshow ,in editing widget dialog ,I do like this :


6,Do like step 5 for elements : morefeat,homepost1,homepost2...homepost7 . Which category you want to show ,enter its title in widget title and widget content .
another example ,I want to show recent posts under Business category in homepage ,I click on edit button ,and enter the content like this in widget configuration dialog :


7,To add ads ,click on edit and paste ads to widget content .
8,To add video ,paste the embed code to widget content .
9,Link list widget at the bottom is for creating a link to other page or feature article .
10,There are many space for adding widget ,so I think it will be easy for you to add your own widget ,ads ,and do some customization .
That's all . I hope you interested in my latest work .
P/s: please help me to check error on Chrome browser . I think I fixed most of troubles.
huy signature
Read more...

Friday, January 29, 2010

List of Blog writing tool support Blogger

Blogger is a good blog platform but its editor is not good .It's quite simple and lack of options for profession writer . So using a third-party tool for writing is a good choice .
I used some Writing tools that support Blogger ,and in this post ,I will make a list of them . I hope this will make your blogging become easy and interesting .


1,Window Live Writer
One of the most professional blog writing tools .A full editor with word processing ,tables . It also support upload images in your post to image hosting services automatically . Easy to set-up ,write and publish post  .Free to use . I highly recommend this software .
2,BlogJet
A popular blog writing tool . Look like Window live writer.
3,W.bloggar
A free tool with a long feature list .
4,Elicit
A desktop blog client that integrates Web and RSS services for content recommendation .
5,RocketPost
Blog software designed for serious bloggers and business users. RocketPost is a complete, stand alone editor which puts you in control. It’s the only blog editor with WYSIWYG editing, full local editing and full blog import . It also has a built-in photo editing ,automatic linking to related posts ,and other features.
6,ScribeFire
An Add-on of Firefox browser . It's a small-size blogging tool but very effective . It support manage drafts, posts ,and support multiple blogs
7,Ecto
A good addition that accommodates both Mac and Windows users. It’s one of the older editors that will run from your desktop. It’s feature list is growing. Manages multiple blogs, imports categories and saves drafts.
8,Zoho Writer
Online application . Not only does it take care of all your blogging queries, but also provides an interface that makes saving and sharing documents easier.

huy signature
Read more...

Thursday, January 28, 2010

Fade in and Fade out effect for elements in Blogger blog

Jquery is the most popular Javascript framework .With jquery ,we don't need to work much for creating website effects as we did with Javascript . And in this post ,I will show you the way to create fade in / fade out effect for elements in website using Jquery . It look like hover effect which applied to links .



You can take a look in live demo
Steps to make this effect :
1, Open your Blog template and insert this code before </head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
This code is for inserting Jquery framework into your blog
2,Insert this code after the code above :

<script type="text/javascript">
$(function() {
// OPACITY OF BUTTON SET TO 50%
$("element").css("opacity","0.5");
       
// ON MOUSE OVER
$("element ").hover(function () {
                                         
// SET OPACITY TO 100%
$(this).stop().animate({
opacity: 1.0
}, "slow");
},
       
// ON MOUSE OUT
function () {
           
// SET OPACITY BACK TO 50%
$(this).stop().animate({
opacity: 0.5
}, "slow");
});
});
</script>

in this code , if you want to apply fade in /fade out effect to a specific element in your blog , replace element to id of this element .For example ,we have a div layout tag with id="div1" like this :
<div id="div1">
.....................content
................
</div>
to apply fade in/fade out effect to this div tag ,we change ' element ' to '#div1' like this :
<script type="text/javascript">
$(function() {
// OPACITY OF BUTTON SET TO 50%
$("#div1").css("opacity","0.5");
       
// ON MOUSE OVER
$("#div1").hover(function () {
                                         
// SET OPACITY TO 100%
$(this).stop().animate({
opacity: 1.0
}, "slow");
},
       
// ON MOUSE OUT
function () {
           
// SET OPACITY BACK TO 50%
$(this).stop().animate({
opacity: 0.5
}, "slow");
});
});
</script>


And fade in/fade out effect will be applied to the div tag which id = "div1" (included all of its content)
If you want to apply this effect to many elements in your site ,you can make a class for elements you want ,and change "element" to " .name_of_class"
For example ,we want to add fade in/fade out effect to images in blog , we can add a class "fade" to all image elements like this :
<img src="url_image_1" class="fade"/>
<img src="url_image_2" class="fade"/>
<img src="url_image_3" class="fade"/>
<img src="url_image_4" class="fade"/>
And change "element" in script to ".fade" :

<script type="text/javascript">
$(function() {
// OPACITY OF BUTTON SET TO 50%
$(".fade").css("opacity","0.5");
       
// ON MOUSE OVER
$(".fade").hover(function () {
                                         
// SET OPACITY TO 100%
$(this).stop().animate({
opacity: 1.0
}, "slow");
},
       
// ON MOUSE OUT
function () {
           
// SET OPACITY BACK TO 50%
$(this).stop().animate({
opacity: 0.5
}, "slow");
});
});
</script>



So Fade in/Fade out effect will be applied to all elements which have class="fade"
 I hope this post helpful to you . If you want more ,you can save the live demo and see the source code .
 If you see Blogger errors when saving the code ,you can encode the script in this post before inserting to template file . You can encode here .Just paste the script in this post to textarea and click on Encode ,then paste the result to template file .
Enjoy ^^

huy signature
Read more...

Monday, January 25, 2010

10 Firefox add-on that Blogger’s user should have

Mozilla Firefox Icon
One of the most popular features of Firefox is its add-on. Firefox has amazing collection of add-on for everything you can expect . Some of them are excellent tools ,work better than stand-alone programs but cost free .
I myself use Firefox as one of working tool for web surfing ( of course ^^) ,RSS , getting information ,writing blogs ,SEO … With Firefox and its add-on ,I don’t need to install programs for separated tasks , saving my time and disk space .
In this post ,I will make a list of Firefox add-on for Blogger user,I hope you like it .



Here is the list :
1,ScribeFire : ScribeFire is a full-featured blog editor that integrates with your browser and lets you easily post to your blog. It support Blogger ,so use this add-on ,you don’t need to login to blogger dashboard and see the bored Blogger editor .
2,Apture : This add-on put a button in your Blogger editor toolbar ,so you can search photo ,video ,image … for your post directly from your Blogger window . It can search from more than 50 sources ,so you can easily find what you need to illustrate your post .
3,Zemanta : Zemanta show a small window in the right hand of Blogger editor window for information such as links ,articles or images relevant to current text you are writing . You can add these contents to your post with a single click .
4,Copy Plain Text : Sometime you need to copy text from other website ,but you don’t want to copy the format of text . This add-on will help you remove the format of text ,so the text you copied is plain text .
5,KGen : KGen show you the strongest keywords in visited web page . Information this add-on provide is very useful for SEO , it help you identify the main keywords of your post ,so you can make a post that better ranking in Search engine result .
6, Write Area : Whenever you find a textarea in a page, where HTML is allowed, you can right click and choose Edit in Write Area . A window with toolbars needed for editing will appear ,so you can write text and format them (bold,italic,add links…)without worrying about the HTML syntax .
7,Similar Web : You know a website that contain information on topics you interested in ,and you want to find websites similar to the one you already know ? Here is the add-on for you .
8,SenSEO : this add-on has a list of the most important on-page-SEO-criteria and calculating a grade of how good your site fulfills these criteria.
9,Shareaholic : Great tools for social submitting . You can submit your article to various social networks with this add-on .It has links to more than 100 social networks .
10,Firebug : If you know a little on HTML and CSS ,and interested in customizing your blog template ,this add-on is very useful .It help you inspect each element of your template, finding what is wrong ,what happen with Jquery or any script …
This is list of FireFox add-on I think Blogger’s users should have .If you know any better add-on or want to suggest an good add-on ,feel free to comment .
Enjoy it ^^
Reblog this post [with Zemanta]

Read more...

Saturday, January 23, 2010

Blogger supported 'add pages' function

Like Wordpress ,Blogger now support 'add pages' function . It's an essential function for all bloggers to make about page ,or contact page . In previous posts ,I showed you the way to make a post become page ,but now ,it's not necessary . You can make a page by simply click on Add pages under Posting tab .


As  showed in picture above ,each blog can add maximum 10 pages . With a small blog ,I think this is enough .
Once your page is published, you can link to it from the new Pages widget. The Pages widget lets you add links to your pages as tabs at the top of your blog, or as links in your blog's sidebar
In the Pages widget, you can decide which pages will have links, and in what order they will appear. You can also choose whether or not you want links automatically created for pages when you create them by checking or unchecking the box to the left of Add New Pages by Default.


A notice for you all ,this function is unavailable in Blogger publish mode , it work only in Blogger Draft mode ,and there's no information found in Blogger Buzz . I guess Google need more time to test this function .So if you don't see 'add pages' link in Blogger mode (www.blogger.com ) ,try to login in draft mode at http://draft.blogger.com

huy signature



Read more...

Blogger supported 'add pages' function

Like Wordpress ,Blogger now support 'add pages' function . It's an essential function for all bloggers to make about page ,or contact page . In previous posts ,I showed you the way to make a post become page ,but now ,it's not necessary . You can make a page by simply click on Add pages under Posting tab .


As  showed in picture above ,each blog can add maximum 10 pages . With a small blog ,I think this is enough .
Once your page is published, you can link to it from the new Pages widget. The Pages widget lets you add links to your pages as tabs at the top of your blog, or as links in your blog's sidebar
In the Pages widget, you can decide which pages will have links, and in what order they will appear. You can also choose whether or not you want links automatically created for pages when you create them by checking or unchecking the box to the left of Add New Pages by Default.


A notice for you all ,this function is unavailable in Blogger publish mode , it work only in Blogger Draft mode ,and there's no information found in Blogger Buzz . I guess Google need more time to test this function .So if you don't see 'add pages' link in Blogger mode (www.blogger.com ) ,try to login in draft mode at http://draft.blogger.com

huy signature



Read more...

Showing live twitter stream in your blog using Jquery's Livetwitter plugin


Although Twitter now work as an instant messenger service, it was originally designed as a microblogging tool. The idea was to give short updates on what’s going on around you to a group of friends.

Twitter does still work well that way. Only now, your group of “friends” might be thousands of people, and what’s going on around you might be a natural disaster, an election or a concert. Twitter can be an excellent tool for “live Tweeting” these big events.

If you have a blog/website for an event ,you might want to add a live tweets streams on your site to keep track on what people are thinking .
And here is the solution for adding live tweets streaming into your site,a Jquery plugin named Jquery.Livetwitter



1,At first , click here to download Jquery.LiveTwitter plugin .
2,Upload file Jquery.Livetwitter.js to a host . I recommend Google code for an unlimited bandwidth and storage hosting .
3,Create a HTML/Javascript widget in your Blogger page elements .
4,Paste these lines into widget content :
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript" ></script>
<script src="your hosting / jquery.livetwitter.js" type="text/javascript"></script>
5,To add style to live tweets streams widget , paste this code into widget content :
<style type="text/css" media="screen">
        body {
            background: #E1EBFF;
            font-family: Verdana;
            font-size: 13px;
            color: #111;
            margin: 40px 120px;
            line-height: 1.4;
        }
        h2 {
            margin-top: 40px;
            font-family: Helvetica, Arial, sans-serif;
            font-size: 24px;
            font-weight: bold;
        }
        a, a:visited {
            color: #066999;
        }
        a:hover {
            color: #111;
        }
        .tweet {
            background: #fff;
            margin: 4px 0;
            width: 500px;
            padding: 8px;
            -moz-border-radius: 8px;
            -webkit-border-radius: 8px;
        }
        .tweet img {
            float: left;
            margin: 0 8px 4px 0;
        }
        .tweet .text {
            margin: 0;
        }
        .tweet .time {
            font-size: 80%;
            color: #888;
            white-space: nowrap;
        }

        #twitterSearch .tweet {
            min-height: 24px;
        }
        #twitterSearch .tweet .text {
            margin-left: 32px;
        }
    </style>

You can modify values in this code for what you want .
6, Now adding code to make this plugin work :
<div id="twitterSearch" class="tweets"></div>
    <script type="text/javascript">

        // Basic usage
        $('#twitterSearch').liveTwitter('keyword', {limit: 5, rate: 5000});
    
    </script>
in this code :
-the 'keyword' is the topic you want to show tweets ,for example ,you want to show live tweets on election ,the 'keyword' is 'election' .
-Limit :5 mean showing 5 latest tweets . You can increase this number to show more
-rate :5000 mean the time to refresh 5000 milliseconds .
7,Instead of showing tweets from others ,you can show your tweets only by using this script :


<div id="twitterUserTimeline" class="tweets"></div>

    <script type="text/javascript">

        $('#twitterUserTimeline').liveTwitter('username', {limit: 5, refresh: false, mode: 'user_timeline'});

    </script>
username : mean the name of twitter account you want to show its tweets .
Ok,you are done .
Save your widget and see the result .
I see there is a widget in Blogger for showing Twitter updates ,but I love this plugin because it's easy to use and has a lot of option . You can see its option at this page


huy signature
Read more...