31 December, 2008

How to create a google sitemap

Sitemaps an important fact in the realm of web development.

There are some benefits you can have with sitemaps, as listed bellow.
  1. helps to index the new pages and recent changes
  2. helps to index your webpages more quickly on search engines
  3. Also helps search engine to keep search content fresh
Now without going to much detail lets see how to create a site map, find bellow a very brief site map, which I will use to explain how to create your own one.

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">


<url>
<loc>http://mysite.com/</loc>
<lastmod>2008-27-23</lastmod>
<changefreq>never</changefreq>
<priority>1.0</priority>
</url>

<url>
<loc>http://mysite.com/about</loc>
<lastmod>2008-27-23</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>

<url>
<loc>http://mysite.com/contact</loc>
<lastmod>2008-27-23</lastmod>
<changefreq>weekly</changefreq>
<priority>1.0</priority>
</url>

</urlset>


Okay by having a quick glance at the example you will notice that this it XML, now dont panic if you dont know XML, its really easy to learn. Go to http://w3schools.com/ to find tutorials.
Now as a fact Google sitemaps are created using XML, right thats what I wanted to mention huh!.

think it is the time to review the sitemap,
Lets assume that my site is a three page website, all the pages are just and index page, an about page and a simple contact form. Have a look at the sitemap, can you see three code snippets just like this

<url>
<loc>http://mysite.com/</loc>
<lastmod>2008-27-23</lastmod>
<changefreq>never</changefreq>
<priority>1.0</priority>
</url>


Now for ease I would say that each of these snippets represents a web page. lets go through it, the whole thing is wrapped inside a url tag (simple xml tag huh!).

there notice the for tags nested inside the url tag. lets go through them first.

  1. <loc>= okay this is the location of your webpage. so it is my index page as well, and it is a complete url.
  2. <lastmod> = now this I wont have to explain, simply the last modified date.
  3. <changefreq> = this is the frequency you change your page. you can state the frequency with hourly,daily,weekly,monthly,yearly, never. Okay in my case I have not planned to change my webpage, so I have used never. I dont think I will have that much time to change it hourly huh! ;)
  4. <priority> = now this is another important data. the priority of your webpage in your site. You might be thinking of the greatest priority, with a lot of 9s. yeah lots of 9s make a big number, but google has their own way of specifying the priority. you can state it by using a decimal which is in the range of 0 - 1. The high priority one is 1 and the lowest is 0 anything can be used within here, 0.1, 0.2, ...., 0.8,0.9, 1. the 0.5 is the medium priority is 0.5.
Okay now we disscussed about the addition of the pages. now what about these


<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.google.com/schemas/sitemap/0.84"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">


the first line says that the XML is using UTF-8 encoding, oh yes google needs in that way in order to accomadate special characters. and the second line decalres the namespaces.
now these two lines are going to be the same for any google sitemap. so you dont have worry, just do a copy and space.

Okay, now you are ready to create your sitemap, whoops! hell your site has 100 and 1 pages.
now what it will take days to create one, dont worry there are sitemap generators.

screen the following URLs,

http://www.sitemapspal.com/

28 December, 2008

Greetings website is doing a nice job!

I have blogged about the greetings.whynotonline.com website which I coded up in just 5 hours. It is a free service which let you send your warm wishes to your loved ones.

Whynotonline.com officially launched this site on the 8th December 2008. At this moment it has been working for 21 days. The fact that drove me to write this blog post is that for this 21 days the site has sent more than 250 greeting cards. This is a giant step for a very new website.

If you still didnt hear about this new website pay a visit, Click Here.

17 December, 2008

whynotonline.com redesigned

whynotonline.com is redesigned.

As the earlier design is somewhat messy and hard to find the content on the website we, me and my friends thought of coming up with a new good design. Also while designing our website we thought of coding up new modules to manage the portfolio, and the content.

So finally we came up with a nice design template, (its me who designed it!), and after the approval I had to work on it.

After two sleepless days we managed to get our site ready with a new fresh theme.

Have a look!


I would like to thank all my friends at whynotonline.com for helping me to complete this job successfully.
Read the whynotonline.com blog post

Vote us on CSS Fights

cssfights vote

14 December, 2008

List Style Image not working with IE

I found another crappy issue with IE, the CSS list-style-image doesn't work with IE.

After spending 10, 15 minutes on the internet searching for some hack I found that this is an issue everyone are experiencing, unfortunately I was not able to find any hack.

Now I thought of some thing by my self, what I did was add the image I needed as the background, then add some padding to make sure the list content doesnt not overlap with the image.

Now my code is something like the following,

#Navigation ul li{
float:left;
background:url(../images/nav-bullet.gif) left no-repeat;
list-style:none;
list-style-type:none;
width:auto;
padding:0px 8px;
}

This worked for me, but not the right code I needed, if you got into the same problem try this.

08 December, 2008

IE Hacks!

I hate IE!

yes I do, I guess that there wont be a single web designer who doesn't.

I have been working as a web developer for the last 4 years, and I would say that all of the time IE has been my nemesis. I had to write separate CSS for IE all the time, but as I got to know about the CSS hacks two years back, I found it easy to use them. They are pretty nice little code snippets which only affect on the web page if it is only being rendered in IE.

I thought of posting two friendly websites, where I read a lot about these CSS Hacks.

Find them bellow this page.

Still I don't feel any good about IE, in my world it is just some crappy software which doesnt know how to render a simple HTML. Anyway this is our fate! most of the people still use IE, so we have to make our websites ready for IE too, I am concerned about these hacks and all, because of the prefixed reason.

Even the new google browser Chrome is 1000 times better than IE, anyway as we designers doesnt have any other choice lets pray, people will use browsers except IE then we can forget about this crap :)

http://cavemonkey50.com/2005/12/the-ultimate-ie-hack-guide/
http://www.maratz.com/blog/archives/2005/06/16/essentials-of-css-hacking-for-internet-explorer/

06 December, 2008

Greetings.whynotonline.com

Send your friends and family heartfelt wishes this christmas and new year
season using the free service provided to you by whynotonline.com.

This is again a website project where I am involved with the development, I was the only developer and I completed the whole website within just 5 hours, from designing upto coding.

I used SilverStripe Open Source here to do this, yes the Sapphire framework is really great for web development, welcome to try it out. go to http://silverstripe.org

Creating widget ready Wordpress themes

I thought writing some thing about creating Wordpress themes.

This post is about creating widget ready Wordpress themes. Is really easy.

Now all you need is two php files in your theme folder
  1. sidebar.php
  2. functions.php
In the sidebar.php just add the following code.

<?php
if(function_exists('dynamic_sidebar'))
dynamic_sidebar();
?>

Then in the functions.php you have to add the following code.

<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'before_widget' => '<div id="%1$s" class="sidebar-box %2$s">',
'after_widget' => '</div>',
'before_title' => '<h2 class="widgettitle">',
'after_title' => '</h2>',
));
?>

Now let me explain what we did with these codes,

in the sidebar.php we are calling the dynamic_sidebar function to render the sidebar which is dynamically created by the wordpress, and in the functions.php we are registering a side bar.

Now go to your admin area and then add any widgets to your side bar, when you save your settings you are done. Just refresh the page and see whether it is working.

For further reference read the following page from the Wordpress codex

http://codex.wordpress.org/WordPress_Widgets_Api/dynamic_sidebar

17 November, 2008

Tribute to the Sri Lankan heroes

This week started from the 15th of November is declared as the "Ranaviru Upahara Week" as to express our gratitude towards the troops of the Sri Lankan Military forces.

They have been making a lot of sacrifices to save our motherland from the terrorists. They won a very important milestone by liberating Pooneryn, which is considered as a key strategic point.

Lets honor them for all their sacrifices to save all of us.

16 November, 2008

Installing Ruby on Rails on WAMP

Okay you want to install RoR huh!

Just follow the steps below, I believe that you have WAMP on your computer, if not please install that first.

  1. Donwload and install Ruby
  2. Stop your wamp servers and then install Ruby on Rails with this command 'gem install rails –include-dependencies'
  3. Then create a folder where you want to keep your RoR projects in my case it is just 'ruby'
  4. Create a rails project with the following command 'rails myfirstror'
  5. Add this to your Servers httpd.conf
    Alias /myfirstror/ "c:/wamp/ruby/myfirstror/public/"
    <directory
    "c:/wamp/ruby/myfirstror/public/">
    Options ExecCGI FollowSymLinks
    AllowOverride all
    Allow from all
    Order allow,deny
    </directory>
  6. Start your wamp server and access your RoR project with the relevant URL in my case http://127.0.0.1/myfirstror/

Web Design Brotheren

I have been into the web design / development market from the year 2005. For these last three years I have completed a lot of stuff related to the web, and have had a lot of experience too. But most importantly I have made a lot of contacts.

Now my plan is to create a website for that and to maintain some sort of a relation ship. This will help all of us to get more and more projects too.

So as I said the web design brotheren page will come soon on whynotonline.com

Look forward to that.

15 November, 2008

Bilingual Module

I was told to work on a bilingual website,

This is my first experience too, So what I did is just to start on a silverstripe module. This is working all good now. And the client is happy too, with this module any one can build bilingual websites easily, simply you have to insert the content in both languages you use.

This I did for a project which I got for whynotonline.com. My colleagues there wanted me to publish it free so you all can use it. Get it here

07 November, 2008

A nerdy look!

I played with some photoshop yesterday, to make my picture look more nerdy, not for any reason but just to have some fun.

Here it is


06 November, 2008

Congratulations Obama!

I couldn't write this message on the 4th, anyway here I am congratulating the first ever African-American president Barack Obama.

You have won a historical election!

I believe that the "CHANGE WILL HAPPEN"

04 November, 2008

Three themes in a row

Wow three themes I designed and coded are published on the SilverStripe website.

I think it wont make you surprise if I tell you that I am a designer. Yes! I do web designing, graphic designing, etc.. And I am the main contributor to the free template portal at whynotonline.com too. During my leisure times I make my HTML / CSS for the psd designs I do. Also I dont stop there I just make them to work with open source CMSs such as SilverStripe, Wordpress, etc.

This time I am so glad that four of my themes are there on the SilverStripe website.
Give a try you will be able to make use of them.

Have a good time!

16 October, 2008

Enjoying life with designing

I hope that all of you know that I am a web developer in profession. But after starting whynotonline.com template portal I think that I am a better designer.
It is just for 3 months time I did about 20 templates and released them free on the website. Also I did two SilverStripe themes too, and now they are there on the SilverStripe website.

Also I got the membership from Wordpress so that I can put some website templates there too. I enjoy this, helping others ;)

I would like if any of you can give me feedback on my designs, then I can improve myself I believe.

26 September, 2008

eew! 8 widgets for SilverStripe

This post is just to mention my recent Open Source Contributions. I use the SilverStripe Open Source CMS most of the time to work out my projects. I love the features there and the structure of it. I thought of spending some time with contributing to the cms and the community around it, with widgets and themes.
Finally I ended up with 8 widgets and 2 themes which were designed my me (I think all of you know about my template portal).

I will keep this up, so just write your ideas on my blog, so then I can put them to php codes.

BTW my little business whynotonline.com completed two projects successfully this month I used SilverStripe for them too, you can screen those two websites by visiting my profile at SilverStripe or the portfolio at whynotonline.com.

12 September, 2008

A new website with SilverStripe

Today 12th September 2008 I finished working on a media centre website at my office. I had a good time with it :) as I got permission to use my favorite CMS SilverStripe for that.

The website is http://staysure.co.uk/mediacentre/ have a look, You will feel that SilverStripe can cater most of your website needs after looking at it.

The most important thing it that I found some good hacks for the TinyMCE editor that they have used there.

1) I needed to add javascripts to some of the pages.
2) I needed to take off validating html on the TinyMCE but the SilverStripe editor doesn't allow me to do it.

For these two things what I did was to hang around the javascript which controls the TinyMCE.

/cms/javascript/tinymce.template.js

In that file you can find some useful things.
1) the html tags which are allowed in the editor that can be controlled by the directive valid_elements which you can find at the line 43.

2) Validating HTML can be disabled with the verify_html directive at line 42 there.

I thought that these tips will be useful for you.

Give a try ;).

01 September, 2008

Open Source CMS awards 2008

Packt Publishing announced the Open Source awards for the year 2008.

http://www.packtpub.com/article/2008-open-source-cms-award-finalists-announced

I am really glad that most of the CMS softwares I use for my development has made it to the finals, and specially Silverstripe.

Lets help them to be on the top three...

24 August, 2008

Feed some fish!!!

My brother has a fish tank at home...
I enjoy feeding them. Hey but they are real ones. I thought you all would like to share my experience too ;). Have a good time with some fish....

20 August, 2008

Working with Drupal

I've got a request to work on a project to a hotel, with Drupal, or Wordpress. As my first choice I chose Drupal. Drupal was one of the CMS programs which was selected to the final rounds of the 2007 Open Source CMS Award Best PHP CMS Finalists. I felt that I must try on with Drupal, though I have heard that it is somewhat complicated and have to do some complex programming too. Anyway I found some interesting books too, would like to share them with you all

I would like to share my experiences with Drupal in future, keep in contact I will write somethings here. Whoops! please give me some time to do that, I am a busy man actually :)

17 August, 2008

First Ever Sinhala Software release

Dear all,

I would like to make this a letter to all the readers of my blog. Yesterday I went to a party, and I was talking with some of my friends. There I heard that some professors from the University of Moratuwa and some others have put a full page advertisement on a well known Sri Lankan Newspaper (Lankadeepa) saying that they have done the first ever Sinhala software. Yes they might have done the first Sinhala firefox translation, but I dont like them saying that they are the first ones who released a Sinhala Translation, as there are so many Sinhala Software projects which are released before the firefox translation.

Also I am a bit discouraged about this as I did the SilverStripe Open CMS sinhala Tranlation with two of my friends which was released on the 22nd of May 2008. But as to the Fedora project Wiki the Firefox Sinhala translation has released on 25th May 2008. So this is not fair saying that they did the first ever Sinhala Translation.

I am going to write to some of the team members about it and I prefer that if they can apologise from me and my friends who did the SilverStripe Translation and as well as from the public for making some false image of them

Lets see what will happen. Anyway I believe that the people who read this post will understand the situation well.

Nivanka Fonseka

14 August, 2008

Found a new forum CMS just to suite my needs

I was searching for a module or a plug in which can enhance my Wordpress installation with a forum. I was searching on the internet and just found the right thing, bbpress
.
It is so interesting that it can be integrated with a wordpress installation, the administration is a lot simple and also there is no clumsiness which confuse the users. Any wordpress user wont feel he is using some other piece of software, as bbPress is so much like the wordpress, also the creators of bbPress has some influence from the creators of the wordpress.

Anyway I solved my problem with the bbPress and I thought of writing something about it on my blog as it made my life a lot easy :).

Thank you bbPress!!!!

28 July, 2008

Special Promotions at whynotonline.com

Hello friends

whynotonline.com introduces some promotional special prices for two months starting from 28th June 2008 to 28th September 2008. You are welcome to read more about it at http://whynotonline.com/special-promotions-at-whynotonline-com/ and read more about whynotonline.com's news at whynotonline.com blog .

22 July, 2008

a new template store

I am glad to mention about my new idea a web site front end store (in other words a template store).

I opened a new website to sell web site templates http://templates.whynotonline.com where the public can buy website templates and use for their websites. This is something very much easy for the website owners. as they can just peep into our website and buy what they need and just can ask their developers to use that template.

I would like to mention that if a person can code HTML he has the opportunity of buying a PSD (photoshop) template which is generally cheaper and can do his own html, css coding, or if that person is not capable in HTML, CSS he can buy a HTML / CSS template. Also if a person need something more interactive he can go for a flash template, (no matter whether you buy flash templates all our flash templates are done in a way that the content is totally stored in xml files so that to embed your content you may have to edit a simple text file, so there is nothing to worry about. Also these flash templates are done in a way that it can render HTML, CSS so you can embed your own graphics there too).

Anyway I hope you will pay a visit to my new website http://templates.whynotonline.com


10 July, 2008

A new website is launched

Once I wrote a post about a website known as debts done with Expression Engine. When my boss told me now it is done I felt that I am again a free bird. But I was not lucky enough to enjoy my freedom for more than two days. After two days he said that he needs another adjoining web site done with the same look and feel for the US based debts content. Now I had to get back to the Expression Engine. There is a module for the CMS which can handle multiple websites. But I still cant understand what type of requirement they fulfill. I installed that module and created a duplicate website with all the content and that module gave me a website which I didnt want. Anyway I was intelligent enough to give up trying with that module, and to start working on my own to create the new website from the scratch. Ultimately I was able to come up with a nice website to make my boss happy.

Still I dont feel much good to work on Expression Engine. But as IT Professionals we have to be flexible enough to work with anything.

Anyway have a look at the new website http://debts.org/us/index.php

and if you are from US and if you go to the http://debts.org then you will be automatically redirected to the US content site. I had to hack a little plugin to the CMS to determine the IP ;).

Have a look...

07 July, 2008

whynotonline.com - planning to sell domain names

On the first two months whynotonline.com has got many hits covering 25 countries, which we believe a good start for a new website. And whynotonline.com has complteted 3 projects too which is a pride on the trade name.

As a new idea of the board of directories whynotonline.com is heading to be on the doman names, and web hosting market with many more facilities. Look forward for the new service.

You can be proud of a 100% Sri Lankan comapny selling domains names and hosting environments.

11 June, 2008

End of some hard times

Dear all,

Sorry that I couldn't write much for the last two months. I was working with some websites at Intervestment (PVT) LTD. A web site called Debts. I was working with an open source CMS software system called Expression Engine. For that I had to read lot about Expression Engine, and as there is not much community around it I had some really hard times with getting on to it.

But ultimately I was able to come up with it.

So have a loook at the new website debts.org.....

31 May, 2008

I started contributing to SilverStripe

I started contributing to the SilverStripe Open Source (CMS). I am coding up a Social Network and Directory Module for them.
I am also proud to say that this is my largest open source contribution.

http://silverstripe.com/extending-hacking-silverstripe-forum/flat/62113?showPost=62113#post62113

28 March, 2008

What hacking means to me!

Today at the office I had a little chat with one of my friends. We were talking about open source softwares, as I am reputed there as a Linux user and a open source fan and contributor. I told him about the FSF, and some history which sounds really nice and which I could remember a lot, on Richard Stallman's bio, Linus's bio and some more. As we were talking I used the word "Hacking".
Unfortunately hacking is not a familiar word for my friend. But I hope that this is some thing to be worry about. They think that hacking is something related to sadism. But we hackers only know how much trouble we take to develop softwares and to distribute them. This is our passion as hackers. But others think that hacking is something that we do to crack the systems and fulfill our needs in a very fraud manner, and also they believe that hacking is something very illegal.
But they do not consider about the freedom they earn by the contribution of thousands of hackers around the world taking a lot of trouble to come up with the best software systems.
Anyway I explained this to him and after a lot of time I managed to make him feel that hacking is something very useful.

And I found some references for him too...

would like if you all can read them

http://catb.org/~esr/faqs/hacker-howto.html
http://en.wikipedia.org/wiki/Hack_(technology_slang)

24 March, 2008

Commencement of Google Summer of Code 2008

I had a dream of taking part in the GSoC. So this time the GSoC has been opened its gates to the students to register from the 24tth of March 2008. I submitted my application to the Google and my preferred organizations are Wordpress and Joomla!.

I read the project ideas that they have posted and selected two ideas, which I am sure about being capable to work them.
One is "Integrated Caching Solutions" (http://codex.wordpress.org/GSoC2008) at Wordpress
and the other one is "Image Manager improvements"
(http://forum.joomla.org/viewtopic.php?f=525&t=276044&sid=f56f133c3b79733cd2d5f72981fde342) at Joomla!

Now I am just waiting to see what will happen next, I mean that they have to accept one of my applications to start working.

But anyway I am very much delighted to work to these organizations.

11 February, 2008

Yahoo rejects Microsoft's Bid

Today 11th 02 2008 evening when I was reading CNN news I found that Yahoo has rejected the bid proposed by the Microsoft for $44.6 Billion.

I think this is some thing great for open source communities and the freedom they are always talking about. Because if Microsoft acquires Yahoo then Microsoft's capitalistic assets will grow and it will lead people to be Microsotinzed.

We are lucky........

04 February, 2008

Started using Ubuntu

This is one of my dreams I had. I could not change myself to Ubuntu (Linux) just because I had to work with Microsoft Softwares and Microsoft Programming languages such as c#.net, vb.net, ASP.net at the University. Always what I thought was it will be really hard to work with Linux.
But at the very beginning of this year I found a part time job at a web development company Intervest. I am working there as a web designer and a developer. I found some nice people there, and some of them wanted to use open source softwares because of the legitimate issues with Microsoft and so on (they have to pay a lot for those softwares). So as I am the designer they encouraged me to learn GIMP and Linux. I chose Ubuntu (7.10 Gutsy)
Though I have used Ubuntu 6.06 earlier I am not very much familiar with it. So had to panic at the very beginning. I had some problems with the graphics card and some networking failures (No I am not using any modem), but managed to find answers quite easily by referring to the Ubuntu forums.

Now I don't feel any difference with the new environment at all cause I got a nice list of softwares to use. My list is as follows:

Adobe Photoshop = GIMP
Adobe Dreamweaver = Quantas
Netbeans = Netbeans for Linux & Eclips
Python = Eclipse Python


Also when hanging around the internet I found a MAC theme for Ubuntu, and installed it. Now I feel like using a MAC. ;)

Anyway no worries any more, no illegitimacy. :)

02 February, 2008

Will Microsoft acquire Yahoo?

Microsoft has offered to buy search engine company Yahoo for $44.6 billion in cash and shares.
Both Microsoft and Yahoo are having a great competitor Google. Google competes Microsoft as a software company, and also competes with Yahoo as a search engine company.
Kevin Johnson at Microsoft said that the combination of the two companies Microsoft and Yahoo will create a better entity to compete with the Google.

"Today the market [for online search and advertising] is increasingly dominated by one player"
Yahoo is loosing its profit since Google emerged to the market.

Yahoo's falling profits
  • Oct to Dec 2007 down 23%
  • July to Sept 2007 down 5%
  • April to June 2007 down 2%
  • Jan to March 2007 down 11%

Yahoo confirmed that the board will evaluate the proposal and pursue the best cause of action to maximum long-term value for shareholders.

Also the competition authorities in the US as well as the European Union would be likely to investigate the tie-up.

LETS SEE what will happen!

26 January, 2008

My interest was driven towards Robotics

When I was just roaming in the internet I saw a video of a nice cute robot Keepon.
It is a yellow rounded robot and just reminds about snowmen that I have heard from the books which I have read in my past times. This robot is designed to perform emotive and attentive with human interactions.
Hideki Kozima of the National Institute of Information and Communication Technology in Kyoto, Japan has developed Keepon.
I heard that Keepons has got five motors, two cameras for the eyes and a microphone for his nose inside his attractive rubber skin.
Being very attractive lovable Keepon has achieved great popularity.

It broke my heart when I heard that Keepon is not offered for sale in general public, otherwise I was planning to buy one to keep on my desk. :(



See Keepon

20 January, 2008

SUN acquires MySQL

This may be an exiting news yet true, Sun Microsystems (yes the ones who owns java) bought MySQL AB for 1 billion Dollars. This makes Sun the third largest maker of server computers. Sun Microsystems CEO on buying MySQL AB Jonathan Schwartz says that they are putting millions of Dollars behind the ‘M’ in LAMP (Linux Apache MySQL PHP).

MySQL is a very popular DBMS, it is used for high tech systems including FaceBook, Google and many more banking softwares, CMSs like Drupal, SilverStripe. So Sun will have a good time after this.

What do I feel is that MySQL will be much more strengthen by this. MySQL’s revenue last year was $50,000,000 USD which is a large amount of money. And Sun has spent much more than that for this deal.

But things can change, I mean this is not a time to dream about the future of MySQL.

Anyway Good Luck SUN!

Read more….