Wednesday, March 27, 2013


When Time to choose web hosting plan, we face many problems like which hosting plan I choose? which company offer more economical plan? which hosting server need to choose? In this post We are going to discus which web hosting server is better for hosting a website.

1. Server Access

Both Window and Linux server allow to access directly using FTP, but only Linux server can allow to set up telnet or ssh access. Some window server administrator allow to access using telnet.

2. Language

Window and Linux both server allow JavaScript and HTML pages. For server side script like PHP, ASP. Linux is best for PHP while window is best for ASP, actually Microsoft is build window as well as ASP language so synchronization between window server and ASP is better.

3. URL Rewriting / Redirection

For URL rewriting or redirecting, Linux server support .htaccess file while Window server does not support .htaccess file, window server support web.config file for rewriting or redirecting rules. 

Actually I am writing this post to share my experience with you. I have another website tutorialdata.com, it started one year ago, when it started, it created using all static pages, each time when want to add page, all other pages related to that category need to update, so that was very complicated and boring. That time I am not familiar with php, then I learn php and create dynamic website and use .htacces to create SEO friendly URL, but that time website is hosted on window server and server does not support .htaccess file. So I decided to switch Linux server and now its fine, very fine.

So If you want to use .htaccess with php Linux server is best and want to use ASP then you need to use web.config for URL rewrite for that Window server is best.

Monday, March 11, 2013

Monday, March 11, 2013

Structure of Blogger Template



This is first part of series Create Your Own Blogger Template. In this part we learn structure of blogger template. So lets begun.
Our ordinary website template is used HTML language to design, but blogger template uses XML language to design. Structure of blogger template is same as structure of HTML file, which contains header ans body section which are enclosed into HTML under the XML tag.

<?xml version="1.0" encoding="UTF-8" ?>
<html>
    <head>
    ....
    <b:skin>
      <![CDATA[
  
      ]]>
    </b:skin>
    ....
    </head>
    <body>
    ....
    </body>
</html>
Head section contains all the meta tag information, css and Blogger variable.
  • Meta Tag : Meta tag information used for search engine optimization purpose, which include all title, description, keyword, author etc. included.
  • CSS :  CSS is used for designing purpose, changing to font style, size, color will be handled in this section. All the CSS code must be written between
    <b:skin><![CDATA[   
    and
    ]]></b:skin>
    Our blogger template is in XML format and css format is not in XML format, may be interrupt the parsing since css code enclosed into CDATA. When blogger template execute,
     <b:skin>..</b:skin>
    is converted into
     <style type="text/css">..</style>
    and
     <![CDATA[...]]>
    converted into comments
  • Blogger variable : Blogger variable is used for creating interface between our template and Blogger Template Designer. See Details into How to make Custom Template into Blogger Designer Friendly Template.
Body Section contains an designing layout of blog, means 1 column ,2 column, 3 column, right sidebar, left sidebar, ... . Below showing some blogger layout design.



Blogger template layout contains mainly four parts,
  • Header
  • Body
  • Sidebar (left or right or both)
  • Footer
Layout of blogger template is build using an section, widget. So first we learn what is section and widget in blogger.


Section is element which indicate part of layout like header, content, sidebar and footer and within section you can add multiple widget like blog archive, blog roll, or event third party HTML/JavaScript code. You can customize look and feel of section using CSS wrapped around it.
Syntax of section look like this

<b:section id='header' class='header' maxwidgets='1' showaddelement='no' growth='vertical'>
</b:section>
Where
  1. id is required field, it is unique id provide to that section for identification, use alphanumeric for given id.
  2. class is optional field, may be given an common name like header, main, sidebar and footer. You can given different name as you want.
  3. maxwidgets is optional field, specify that how many maximum widget are inside that section.
  4. showaddelement is also optional field, which specify in layout management in blogger, there will be show an "Add a Gadget". yes or no value are specify for this attribute, yes is default value.
  5. growth is also optional field, which indicate that if gadget is add, then sequence of adding gadget is vertical or horizontal. vertical is default value.
Widget, as display in above pic, widget added into section, there may multiple widget inside on section. Extra code can not be added directly inside section, for that widget used, code added inside widget and widget added inside section. Syntax of widget as follow
<b:widget id="header" type='Header' locked="yes" > 
</b:widget>
Where
  1. id is unique and alphanumeric, Once assign id can't be changed, until delete or add new one.
  2. type is also required field, which one of the following,
    • BlogArchive
    • Blog
    • Feed
    • Header
    • HTML
    • SingleImage
    • LinkList
    • List
    • Logo
    • BlogProfile
    • Navbar
    • VideoBar
    • NewsBar
  3. locked specify that, you can move widget using page element tab in blogger. If yes then can't move, that widget locked. If no then you can move this widget. Default value is no.
  4. title is specify name of that widget.
  5. pageType specify that on which type of page this widget is display. It can be all, archive, main or item. all is default value.
  6. mobile is indicate this widget is display in mobile view or not.

back to top