29 December, 2009

Extending the Security Module of SilverStripe

Okay back to web development after my post yesterday.

Now I was in need to code up a section which is about user registration. Now this is quite easy with SilverStripe's User Page Module. But this module didn't help me out while implementing the site. I needed some other extended features such as,
  • Accept subscription payments
  • Set subscription amounts
  • Enable discounts / promos
  • Different user types
  • Different permissions
Now these things have been quite a bit of a headache for me in the beginning as I couldn't find a proper way of implementing this. After reading some of the core CMS codes (the security admin) I found my lucky niche to get it done.

Now this is what I mainly planned out. I am decorating the Group class to hold up subscriptions, promos, and most importantly the user permissions. By following this method I could quite smoothly. All I had to do when the registering process is that add the user to the correct group, and my client is really happy as he is able to do all the things inside one page, the Security Admin.

The codes are there so I am hoping to release them soon. Till then hope this post will be quite a buzz.

28 December, 2009

My views over General Sarath Fonseka

I am not a blogger who blogs about politics from the start of my blogging, yet as what I have been reading, seeing on the internet + television I thought I have to simply write something about what I feel.

So now a days Sri Lanka, is going to choose a new president for a period of 6 years, from 2010.
There are two main candidates, current president Mahinda Rajapaksha, and Former Army Commander General Sarath Fonseka. I thought of writing this post as I lost my confidence in General SF, with regard to what he talk.

He is raising a few things which makes a criminal in front of me. Let me list them out.

1. Former President CBK, and Defense Minister Ratwatte is much more better than President Mahinda, and Gotabhaya.
2. His statement which he made to the sunday Leader.
3. Again his statement at Ratnapura.
4. His promise to increase government workers salaries in 10, 000 Rupees.
5. His talk with Kingsly at Sirasa TV.

Okay let me go through these points,

1, my opinion about the first one is that it is true in CBK's time SL Army got lots of new weapons compared to the current president's time. Yet did they win the war! No it was a failure as a whole, as I know (what I have seen on news) in the first few years army achieved so many victories, operations like JayaSikuru, Riwirasa brought great damage to the LTTE. Yet they couldn't finish the war simply. And there was quite a huge buzz around the country saying that some of the military plans have been sold to the LTTE, etc, etc. And the Sri Lanka government sold a lot of money laundering institutions / organizations which were fully owned by the government (Air Lanka, Sri Lanka Insurance Corporation, etc.). And I don't think anyone would say president CBK's time is a good one, everyone needed some change and that's why Ranil became the prime minister though he didn't have a good name at all.
If we compare the current situation, during the past four years SL government occupied SL insurance corporation, Sri Lankan air lines, and most importantly the nation won the battle against the most brutal terrorist organization LTTE.
I am not singing praises for president Mahinda or Gotabhaya, lets say they didn't do anything at all. But my question for General is that how the hell CBK and Ratwatte can be better than Gota or Mahinda? I have an answer which I believe is true, General sing praises for CBK and Ratwatte as CBK is using the voice of her to help General. This is totally unacceptable.

2 & 3. Sunday leader reported some statement about Gotabhaya ordering the army (affective on the 58th division, Brig. Shawendra Silva - at that time) to kill the LTTE leaders whoever come to surrender with holding white flags or using some other means. Today I read an article on this website saying that the Editor of the Sunday Leader newspaper with the GOV are planning to issue a distorted version of a audio clip to prove General did such a statement. I am not going to talk about that incident. He is said no, he has been misquoted. OKAY we trust you. Now General go to Ratnapura and say a similar thing, he 100% proves that's his decision to reveal such a thing, though it is justifiable or not, but accepted by the nation. So I think he didn't betray Gota or Mahinda alone, but the wish or the whole nation.
As a true Sri Lankan if or if not Gota gave such an order to kill the LTTE leaders, I love what happened. If I could I will join the army to kill them. (I don't know what others think, but I think this is the love towards the country). If someone give an order like this I will not reveal it in any case. Lets see we keep secrets for our friends, family, etc. Do we reveal them if we are having some bad blood. This is very amateurish. Can't believe being a former General he could do this. And my question for General is that why do you reveal such things targeting a presidential election? this is not election campaigning, for me this is like revealing you have a brain filled up with SHIT.
Also, General you could go to courts and had time for that against Gotabhaya to seek justice about but why dont you do something like that to prove you didn't said such a thing.

4. This is for me a joke, Ranil was very popular for a statement which is about bracelets and gold chains. This sounds the same. Though he plans to limit the number of ministers to 35, and save some money which are used as commissions can he pay the whole lot of GOV workers 10,000 more.
Working for a BOI company which is in the IT industry I know that they come to Sri Lanka passing India as well, is because of the low cost. So General say that he is going to raise salaries of private sector employees too. I wish this wont happen, as our investors will go to somewhere else as they are going to miss their key benefits (General you have to know, Salaries are not what we take home, but EPF, ETF, Tax have to be included too). It is too simple to make such statements, yet the fact is that they expose that General doesn't have any sense of what he is talking about.

5. This is again I never want in my country. He has no plan which is to raise the country. He just blames presidents Mahina Chinthanaya, and he narrate statements made by someone else.
And he clearly said he is in this election as a candidate, because he is not treated well and he hates the way Gota and Mahinda work. This cannot be the starting point for such an intention. If he really need to serve the motherland he has to have such an ambition from the very first secod he was born, he said he was drived to take part as he is not treated well.
Lets think a little other way round. What will happen is the government presented him with a large plot of land, some better position, 600 troupe of army soldiers as his care takers, some women soldiers (i dont know for what), a house, vehicles, and hmmm what else, yes approved to close the roads when he travels, etc etc etc etc.
HE WILL NEVER BECOME A PRESIDENTIAL CANDIDATE. He says so.....

I got these intentions not being influenced by the current President nor by Gotabhaya. Yet I got them by listening to the things what have been happening in the past few days.

Anyway I wish you wont fill my blog with spam about General SF.

It has been quite a pain these days, the General Spamming :)

Think of this a little.

watch these for more

http://sarathfonseka.com/mediamain.html
http://dzoneonline.com/2009/12/25/exclusive-interview-with-sarath-fonseka/

22 December, 2009

Customizing the comments forms in SilverStripe

I came across some development stuff this week. I had to install a SilverStripe blog, yet the client needed some customizations for the Page Comments, also to change the form with which you can comment.

I always like to extend the core codes of SilverStripe but not to change them as it always helps when updating the CMS + the Framework.

Anyway this is what I did about the commenting, I had to extend the PageCommentInterface.php, I created a new child class of PageCommentInterface, called CustomPageCommentsInterface ( this is in ./mysite/code/CustomPageCommentsInterface.php ).

There I only had to override the method PostCommentForm.

This method creates a form, adds and Spam protection modules, MathSpamProtection, and the needed fields. Okay now I did one thing, I wanted to hide the Name and the URL fields of the comments. what I did is that I replaced them with hidden fields, and by the time it creates the form I assigned values to it by retrieving the logged in users details.

One more thing, for my requirement I didnt need any new fields to be introduced to comments, if you need any you can add them by a DataObjectDecorator, and create your field as you need.

Hope this information will be useful.

13 December, 2009

SiteWide publishing for SilverStripe new concept.

This is a new concept which I started working on and have done the stuff for some extent.

The goal is that on sites which have sub sites, we will need to run sections like news, customer testimonials, which probably common to all the subsites as well, yet there might be pages which are not needed to published on all the sub sites. Let me explain this more. Think of an organization which has many departments, and all these departments have their own news as well as common news. Now if we are to run a news section for this sort of a website we will have to duplicate content, which consumes time, and sometimes can cause errors. I am trying to address such a problem with this extension.

Surely you might think why do we need a new module for this as the SubSiteVirtualPage is there. Yes true you can make use of it. But the fact is that the SubSiteVirtualPage doesn't handle relationships among data objects (has_one / has_many / many_many). And the most hard question is how to have the same template and tags. Okay I think my approach can fix this up.

I am extending the SubsiteVirtualPage, and the module has two page types, one is SiteWidePage, the other one extends SiteWideHolder.

Now in the news module which we are trying to build we are going to extend the SiteWidePage as a NewsItem, and SiteWideHolder as NewsHolder, and we will be creating respective templates, NewsItem.ss and NewsHolder.ss. This solves the problem of having the same layout.

Now what the SiteWidePage does is that it has a new field called publishing, which has a check-box group with the names of the SubSites to publish. Once you select the sub domains and publish the page, it creates needed pages (SiteWidePage) on the subsites and take the content from the source. Okay we have it then, about the has_one relationships I am doing every time the source page is published it updates the pages which are taking its content. It is like cloning the database record. This solves the problem of the has_one relationships.

To make this much useful I am having a solution for the has_many (many to one) relationship as well. The below image illustrate the many -> one relationship.



Okay this is it, please be kind enough my graphics sucks :). Anyway note now that pages can have many images but a image can only have one page. Now as out login we have to add images to one page, and when we add an image it might be taken by the pages which get content from the source Page. OMG! we are ruining the logic of many -> one. To avoid this I am doing something like this. I extended the DataObject and created a new one called CloningDataObject now what this does is, once the page is published it creates clones and let the other pages to refer to those clones. This way I thought we can keep the many -> one relationship and proceed. As the SiteWidePage when the source dataobject is saved it writes all its content to its clones, on deletion it deletes all the clones as well.

One thing you have to note about the CloningDataobject is that it has a defined has_one relationship to the Page class. So if you are going to use this in your NewsItem page you dont need to extend the CloningDataObject and create a new relationship as it is there.

Now I still couldnt find a way to get on with the many -> many relationship, SilverStripe does it in a nice way, what I have in my mind is we can create more records in the respective database relationships tables. Yet I am trying to find a better solution.

I do think this can be a useful extension for the SilverStripe Open Source CMS, be glad if you can raise your thoughts about it.

23 years completed!

December 11th was my b'day, it was last Friday. So I just cut a cake at the office with my friends there. In the evening though I didnt expect Veranga a senior member of the Street Play troupe came to my place to pick me up for a party.
Damn! went to his place with my guitar and a drum. It was great and it was a real party. Singing till about 2 AM, and some booze was there too, he and his wife has arranged food too, and some friends of both came to the place.
Ultimately after having a late dinner one of his friends dropped me home, so thats how it went.
Its a good way to celebrate the b'day.

16 November, 2009

Suggestion Field on SilverStripe website

Today morning when I was checking my emails I found that the Suggestion field is approved by the SilverStripe team to be listed as a module on the SilverStripe website. Really joyed about that, a good way to start the day too.

The module is here on this page http://silverstripe.org/suggestions-field-module/

I will be writing some documentation for the module later today on the SilverStripe docs. Also have some plans to release a new version of the module too, with some more enhancements etc.

have a look.

09 November, 2009

Using commas in your SilverStripe templates.

I just had this problem when formatting dates of the SilverStripe Blog module on a new website project. Its true that you can do this by $Date.Format(d-m-Y) type of syntax. But what I needed was to add a comma to the date so the date was supposed to read like 09 November, 2009. To get this on the pages I had to use $Date.Format(d F, Y) type of thing. But unfortunately the SilverStripe's template parser doesn't allow commas.

There was a patch but I was running out of time, and didnt have much time to go through them. So as a quick fix I added the HTML escape character of the comma to the argument which is ,. Now this worked for me.

My code was

$Date.Format(d F, Y)

Check it out, it can be useful for you to work with SilverStripe Dates.

03 November, 2009

Styling the Ubuntu desktop

I did some thing cool to my Ubuntu. Have a look, it is somewhat close a Mac, and to Windows vista. For me there is no doubt the interface of Mac and Windows Vista is sensational.



What I did was this. i got a theme from the Bisigi project; the one i have used is the tropical theme which is listed there.
And after selecting followed the instructions on their website, which ran smoothly on my setting (I have Ubuntu 8.10 Ibex). The instructions are on this page. You might need to update your sources for this, dont worry it is too mentioned on the page, and instructions to do it. I am not going to repeat them over my blog :).

Now after installing you might have to select the theme you installed.

for that go to System >> Preferences >>Appearance in the new window you will find the new themes you have installed.

Now when you select it the look and feel of your desktop will change. But note I have a Mac style navigator on the bottom of my screen.

This is done with the Avant Window Navigator (AWN). Follow the instructions below to install it.

  1. Go to System >> Preferences >> Appearance and to the Visual Effects tab. Then select Extra option there, and close.
  2. Go to System >> Administration >> Software Sources, in that go to the Updates tab. See my setting in the following image.


  3. With the following code you can install the AWN.
  4. Then find it on the Applications >> Accessories and switch it on.
  5. Remove the default tool bar on the desktop.
  6. Add the AWN to your start up list.
Now you will have a pretty desktop with a AWN and with pretty theming, icons, and all. Customize the AWN as you need, it contains a lot of effects which can make it more pleasant.

03 October, 2009

Two new open source plugins

Hi, I could not write anything on my blog during the last month. Some huge projects kept me away from my blog, open source stuff, etc. But I could do some little things which turned out to plugins of jQuery and SilverStripe.

1. DPSPostPayment plugin for SilverStripe - click to see

This is a new plugin which I did with the help of Natalie Wright. She took part in giving me information and guiding me to do this. This plugin will be very useful for the owners of the e-commerce websites, who dont like to spend much on SSL certificates, as DPSPost works outside your website. It only redirects the client to the DPSPost website which accept the credit card details and process the payment, somewhat similar to the paypal. You can download this plugin from the open.whynotonline.com website.

2. Progressbar - click to see

This is a handy plugin which can serve you as a progress bar. I suggest this will be really useful for Ajax based websites. To indicate the uploading / downloading progress. The progressbar is programmed to be much customizable.

I did some examples on the same website. See it

The plugin is available to download here.

I welcome you all to use the plugins.

21 August, 2009

0.0.3 version of the Select Decorator plugin

I did some new modifications to the select decorator plugin. The plugin had a problem in the 0.0.2 release which is when you add two drop downs on the same web page the plugin didnt open the respective drop downs menu but the last drop down in the page. This was a serious problem, and with this new version I solved it. So you can make use of the plugin. Also this supports all the cross browsers including FF, IE 8, IE 7, IE 6, Safari, Google Chrome, and Opera.

The new version of the plugin accepts a new JSON object as the argument, which has a property called onChange. Yes you might have got what it is for, its for the onchange event of the dropdown. You can have that included there either now, which makes if more useful.

If you see the new demo of the plugin you will find that there are two dropdowns there and which are different on styles, and the first on which is blue in color has its own onchange event call.

See the demo for more information about setting up the plugin and using it.

http://open.whynotonline.com/select_decorator/index.html

enjoy!!!!

25 July, 2009

Navigation on Ajax websites using browser's next and previous buttons

On this post I am talking about some problem which I had and resolved myself while coding up Ajax websites. Normally when it comes to Ajax what comes to my mind is that removing page refreshes. Ajax websites are websites which works more like web applications, the user interaction is handled using asynchronous calls to the respective servers. On this post I am talking about the navigation in a Ajax website using the next and the previous buttons of the browser.

Lets assume we are working out a website for selling a particular product or service, which contains a form which we process in 4 different steps. The first step might ask some questions from the user about what he needs. On the second step they will get a list of relevant products or service packages and hey selects one. Third step they will enter their details, fourth step they will do the payments and finish the deal. Now as we are using Ajax there will be no page refreshes in between these steps, that means the browser just will stay on the same page or in other words the document.location will be the same.

Lets assume a user comes to my website, and he goes to the second step, oh!! he realizes that he has not entered some data on the first step correctly, what I feel is that in this case he will click on the browser's back button though a back button is given on the form. Wow lets say the first step form is the first page of the website as well, and then what happens is once the user clicks the back button he will get some other website which he was viewing previously without getting the first step of the form.

Now what can we do about this situation? This can be answered. Now if you use Gmail you will see a very complex Ajax application, and when you click something note that the browsers hash is being changed, it is the same thing which happens when you click on an anchor in the same page. I will make it more simple, our approach should be like this,

URL of our website = http://mysite.com
URL of our second step = http://mysite.com#product_options

The text which comes after the hash is called the URL hash, and it can be accessed by javascript using the following

document.location.hash

The advantage is that if you change the hash dynamically your web page will not be refreshed. And the changes to the hash will be in the history. So using next and previous buttons of the browser you will be able to navigate among the respective hashes.

To program such a thing what you have to do is to have a listener for the browser hash, easily you can do it with a code like below.


$current_hash = '';

function hash_listener(){

$new_hash = document.location.hash;
if($new_hash != $current_hash){
$current_hash = $new_hash;

// Do whatever javascript functions you need to.

// After that remember to change the hash of the browser.
window.location.hash = 'second_step';

}

}

okay!! now above is our listener, and still we have to bind it, we shall use the setInterval function for that.

window.setInterval("hash_listener", 500);

Now our Ajax website's users will be able to navigate using the browser's next and previous buttons.

If you carefully look at the listener you will find that I am updating the hash from my javascript. but if you are going to use anchor tags you will be able to achieve the same thing.

I wish this information will be useful for you.

24 June, 2009

Image Transitions

Do you think this is flash? My answer is no it is not. It is pure javascript, and css.

So that's true, the animation on the top is not a flash movie, but a javascript. Okay enough talking, this is the newest javascript extension I did for the jQuery Javascript library. You can use this to make transitions like above on your websites, also using any number of images. It is light weight, normally compared to other libraries jQuery is light weight. As this plugin runs on jquery and it is built not to be much complex it is pretty light weight and will not make your browser stuck on a point. :D

So just a note, this is my 3rd plugin which I am publishing for the jQuery community, also my 18th open source plugin. (i am not sure where I will end, started with SilverStripe Open Source CMS. lol!)

Talking about this one, it is a ready made extension for you to download and plug to your website. View the documentation page for more information http://open.whynotonline.com/simple-transitions/index.html you'll see more transitions there, I have some ideas to implement more to this. The web page which is mentioned above contains the link to download the plugin, and there is a little documentation at the very bottom of the page.

Check it out.

08 June, 2009

Suggestion Field Module for SilverStripe

This post is about a new module which I coded up. I named the module as Suggestion Field (I dont know how relevant it is, usually I am stupid in naming stuff.). Anyway the reason I named it is that this module provides you with a text area which fetch some helpful suggestions when you start typing inside it.

The module can be used as two ways, one is to make a search box, which provides some suggestions with links pointed to the working URLs, (if you have used SilverStripe doc, you might have seen this).

The other one is to use it as a normal text field, when you click on a suggestion it will automatically fill your input box.

Anyway if this is not clear for you please see the demo here http://open.whynotonline.com/suggestion-field/

Hope this will be a useful plugin, I will be writing some documentation for this soon, and will post this to the SilverStripe website as well, yet you can download it from the whynotonline.com open source portal. If you go here you will find the file which you can download http://open.whynotonline.com/suggestion-form-field/

Please let me hear your views about this new module.

22 May, 2009

Two JQuery Plugins

The last few weeks I have been snowed under a lot of interesting work. Mostly I got a chance to work with a nice server, which is a dedicated and having Free BSD Installed. Also I was working hard on an online app which works on top of jQuery and SilverStripe. So I have been doing a lot of jQuery related stuff to make my app to work handy, and efficiently.

Also I had some good time with coding up two little plugins to jQuery as well. One is a plugin which enables you to do bulk uploading and the other one is for styling HTML Select boxes. Below you will find a little description about the new plugins.

Bulk uploader for jQuery


With this plugin you can make your HTML to accept multiple files using one file input. The plugin automatically maintains a list which allows the users to arrange their uploads.
You can see the demo of the plugin follow this link http://open.whynotonline.com/bulkuploader/index.html

Select Decorator for jQuery

This is the next plugin, while I was working on my app, I had to style some select boxes / html drop downs. I found some plugins which acts as select boxes but not really select boxes. I couldn't use and lists as I needed to handle the change event of the select box. So I had to code up my own plugin to style select options. To see a working demo and a download like for this one please follow this like, http://open.whynotonline.com/select_decorator/index.html.
Still its a pitty that this plugin works on any browser except Internet Explorer. I still couldnt find a solution for that, sometimes readers of this post might have, if so please share.

I wish that the two plugins will make your life easier as web developer.

27 April, 2009

Setting up LAMP on ubuntu

As I can remember (though I have a bad memory) I think that I have mentioned that I am an Ubuntu user for at least about 100 times on this blog. To read about why I use Ubuntu please see the posts which I have posted here.

I thought of writing a post to explain how to set up a working LAMP (Linux Apache PHP MySQL) server (I will call it a server ;)) on ubuntu.

And from here onwards I am talking about the terminal, sometimes it may be boring but yet I believe that being simple is very helpful to be flexible.

Okay now the first step must be the install Apache on your Ubuntu installation,

For that you will have to use the apt, paste the following command in your terminal.

sudo apt-get install apache2

okay here you installed Apache on your computer.

now what? PHP I think

run the following commands in your terminal one after the other.

sudo apt-get install php5
sudo apt-get install libapache2-mod-php5


these will install php and the mod_php for Apache,

then restart your webserver, use the following command,

sudo /etc/init.d/apache2 restart

Now you have installed PHP and Apache, okay lets do install MySQL use the following command to do it.

sudo apt-get install mysql
sudo apt-get install php5-mysql


now again restart your webserver and all wil run good.

is this post useful? any comments highly appreciated.

12 April, 2009

we opened a new website for open source

On the very first post I wrote about the twitter module on my blog here, I mentioned that the team at whynotonline.com including me; are planning to open up a new website for the open source contributions we do. As I mentioned we agreed to use the URL http://open.whynotonline.com for the website.

I did the designing and the coding for the website, and Dasun my best friend and my business partner filled the website with content. As being the owners of the company we had to do some extra work on the website and had to be awakened for a couple of nights.

The goal of the website is that to make people more passionate on open source software. Open source has been helping whynotonline.com to be successful in business, we spend 20% of our time in open source developments. Though whynotonline.com is new to the web development business (10 months) it has done a lot, and has managed to build a huge client base which includes clients from all around the world. My thought is that such a website will help the developers at whynotonline.com to build up good profiles individually, as well as the company will benefit from it too.

At last the website is for you all, and we will be really happy to see more and more traffic to the website. Have a look http://open.whynotonline.com

10 April, 2009

An editor which make me happy

I am using Ubuntu for sometime now, but still I was feeling a bit unhappy about the editors I had to use for PHP, HTML, CSS editing. Before using ubuntu I used MS Windows, but it felt that I have to say goodbye to windows, after the launch of Windows Vista. To be frank at that moment I couldn't spend money for a high performing computer. So what I did is that I though of using Ubuntu. Ubuntu has been serving me for about two years now. And I dont have any complaint towards Ubuntu.

But there was one thing I really missed when using Ubuntu, it was Adobe Dreamweaver, I used Adobe products including Adobe Dreamweaver for all sorts of web development. I could use it on Wine; but I was not that interested in that, because I didnt like the userinterface which I got, and there were some performance issues.

I tried a few editors, actually I am not that much interested to use IDEs. For me what I think is that IDEs are good for a person who is having a super fast computer. I used Quanta Plus, I was a bit happy about it. But again with time I used gEdit. Which is the defalult editor for Ubuntu. It is a very simple editor. But I had to spend some more time to keep my codes clean and tidy, with indentations and all.

Anyway now I have found an editor which suites me a lot, and which can serve all my needs. It is Komodo Edit. it has a lot of features including,
  • Multilanguage support
  • Code folding
  • Code reuse
  • Multi document editing
  • Syntax coloring
  • Syntax checking
Alone with these features, I am really happy to use it for my developments.

Before writing this post I did a lot of searches on google to find out what is the best, and what other developers feel about different editors. Now I thought that I must write something about my favorite editor, so that others can try it.

Good luck!

08 April, 2009

More into Open Source

The Sinhala and Hindu New year is close by, I got leave from the 9th April to 20th April. This is going to be some good time for me, to take my head off from the office, and the stuff I do at whynotonline.com, and I can head into some more open source related work. I have several things in mind, I wrote a proposal to the GSoC 2009, its for WordPress, to make a new versioning system for templates. But still I am waiting for the results, they have to approve it anyway. And my other plan is to work on a new module for SilverStripe Open Source CMS, which enables to provide booking facilities. This can be a very highly useful one, as my wish is to make this useful for Hotels, Cabs, etc., etc.

With these plans in mind I will be writing down my sketches about the booking module, as well as I am planning to read about various versioning systems, such as SVN, CVS, and GIT (which I use at whynotonline.com) for help my GSoC application.

Wow at last, when I take a look at my plans, all my 10 days are packed up. I will be going home, which is in the upcountry Sri Lanka, (on the mountains ;) ) and spend some time with my mom, dad, brother, and sister. Hope to finish most of the work possible from home anyway.

Also with all these heaps of work I will be spending sometime with my girl too, to please her.

Wish you a very happy and peaceful new year!!!!

06 April, 2009

finally the twitter module got in to the module directory

Today again is a special one for me. If you are a frequent reader of my blog you might have seen that I wrote some posts about the twitter module. Today I managed to catch Andrew at SilverStipe Open Source CMS, and got his approval to have the module on the SilverStripe website.
Now you can see the module on the pre-release list of the SilverStripe website, click here to follow it. And this is the link for the modules page.

I got some comments for the last post I wrote on adding an RSS feed for the module, I will be working on that too while preparing the codes for the next release.

Hope this module will be a useful plug-in to your website. Welcome to use it and for any comments.

13 March, 2009

Calendar Module relaunched as the Diary Module

After releasing the Calendar module for SilverStripe, we (me and the team at SilverStripe) discovered that naming the module as "Calendar Module" creates some naming conflicts, with another module which is coded by someone else.

So as to avoid the conflicts my module is released as the Diary Module, and if you click on the name you will be able to go to the official SilverStripe page of the module where you will be able to learn a lot about it. And I am really impressed that the module is listed under the supported list (http://www.silverstripe.org/modules).

I will be talking to my partners at whynotonline.com and will arrange a new demo site where you will have a nice URL, most probably http://open.whynotonline.com/ will be that ;)

03 March, 2009

First release of the Twitter module for SilverStripe

Dear all,

You might remember I wrote something about a new addition to the SilverStripe Open Source CMS called the Twitter Module. If you have a bad memory or you didnt see my previous post here is the link to that "Have you tried to merge your twitter account with your SilverStripe website".

Okay here we go, here is the first release of the module where you can have it installed it with your SilverStripe website.

To download it click here.

I'd love to hear your views about the module, and if you have anything in your mind just post your comments here.
The software is free, released under the Free BSD you can make use of it with out any hesitation.

Have some nice experience with this new addition. To let you know about some stuff about the module it ships with some widgets, where you can have your twitter details in many pages. Also still you can have only one TwitterPage set up on your website. You can have many, but the widgets will not work as you need, I will be fixing this soon, and would like to hear how you need it on a next release. Also I will be posting the codes to the SilverStripe.org so you will be able to download it from there too.

Thanks, I am going to have a beer today evening to celebrate the release, as this is something I was looking forward for sometime ;)
GREETS!!!!!

02 March, 2009

What the hell has happened to this blog?

Hey you might think so, yes I blacked out my blog, just to express my anger towards the grotesque attack to the Sri Lanka Cricket Team, at Pakistan. It was ruined as I did black out it, and now I have just replaced the blog's layout as I didnt want to make this hard to read ;).

http://www.theage.com.au/world/sri-lanka-cricketers-wounded-in-shooting-20090303-8n34.html

What I feel is this is done by some terrorists, and the attack means that every terrorist organization hates our country. So, there are somethings to understand anyway, as a whole all the terrorists are just in the same bunch. And this is a time, that our military forceses are kicking the asses of the LTTE (terrorists again). So I believe that no other terrorist, can stand this out. This is well expressed on this attack where terrorists, show their grotesque nudity to the whole world.

I as an innocent Sri Lankan citizen, pray for gods, that our cricketers will be in good health soon, and wish to see them on the playgrounds with their kicking performances.

Also I am somewhat keen to see what the media's such as CNN, BBC will act on this.

28 February, 2009

Got my new baby!!!!

Hi friends,

I got my new laptop yesterday, it an Acer Extensa 5630z, and has included some good configurations. I was in a hurry to buy one, before I spent all the money in my pocket. So yesterday evening after the office I went to the Unity Plaza, at Bambalapitiya and got it.

Its cool, includes Intel Core2 Duo Processor, 2 GB DDR2, 320 GB HDD, DVD Super Multi DL, Bluetooth, Webcam, and some other cool features. So yesterday was a busy day for me, had to find an OS for the laptop, and had to install all the softwares which I need to carry on my work. So I went through my CD pack to find an Ubuntu CD, (yeah I use ubuntu, I dont want to spend any money to buy windows) but found only a 7.10, which doesnt have the drivers for the VGA, and hard times began, the installation never proceeded. Because of this, I just started downloading the new Ubuntu Ibex (8.10). Wow it blindly worked at last. Okay then the first I will do with a new computer is to test its sounds, as I am used to listen to music whenever I work. And I felt wow again, the sounds are really good, and the headphone made me deff.

This is how it went yesterday. Until today morning I am up installing many softwares to the system. Apache, Php5, MySQL, FileZilla, are the mostly used ones.

Now enjoying the internet with my new baby, also just to let you know I am writing this with my new laptop too ;)

20 February, 2009

I did sing a song

All of you might think what is this post about a song, as when ever you come to my blog you find some technical stuff. Okay now I'd say that this is something about my life. Today I sang a song with two of my colleagues at the office. It was a nice time, I could play some guitar, but I haven't done any recordings. Anyway this time I sang a song. Find it below




To mention something about my friends, the one with the guitar is Kishantha (A software engineer at the office) and the one with a drum is Manju also my manager, and its me out there on the right hand side singing :) The song is originally sung by Priya Sooriyasena, a Sri Lankan mucisian.

19 February, 2009

Have you tried to merge your twitter account with your SilverStripe website

Have you tried that? If you have you might have definitely used the Twitter Status Widget which can downloaded from the SilverStripe.org. Now that is something cool you can add your recent Twitter status messages on any web page of your SilverStripe website. So whats about this post anyway? Ah yeah I forgot I was just talking nothing, okay this is what I need to tell anyway,

I developed a twitter module for SilverStripe Open Source CMS which is still in its development and testing age, you can find the a demo of it if you follow this link. Now let me explain a little about the module till I write a proper user manual and a documentation.

This module helps you to add your twitter messages on your website, you can embed your firends messages (just what you see when you go to your twitter home page), the public status messages to the website, as well as your Followers.

How will this help me? okay if you havent heard anything about twitter or twitter on your website, I'd ask you to have a look at http://twitter.com. For me it is a place where I can build a nice community, and to get myself introduced to a lot of people. So all this I can find on twitter, but not on my own site. What I am trying to achieve with the Twitter module is that to display what we talk on my SilverStripe website, it can be about business, arts, music anything I believe.

Have a look, I'd also like to hear your ideas about this new addition to SilverStripe. Welcome make your comments here.

12 February, 2009

Calendar module translation goes well

Today I received the fifth translation of the Calendar Module. I though of writing this to thank all those who contributed by translating.

pmnordkvist - Swedish translation
petsta - German translation
Jurgen Jessurun - Dutch translation

Many thanks for the good job.

Also I am really open to hear about your ideas about the module, feel free to make your comments on my blog or just drop me an email. Also download the latest build from the demo site of the Calendar module.

24 January, 2009

Official Documentation for the Calendar Module

Today I wrote some documentation for the SilverStripe Calendar Module. It is a nice experience for me as this is the first time I am writing something like this. Click here to read through the documentation.

Also still the module is open for translations, and I'd love to see your willingness to translate the module, wish that I will get a lot of help for this :).

21 January, 2009

Internationalization the silverstripe calendar module

Yesterday night (22.01.2009), I managed to integrate i18n to the calendar module.

i18n are means of adapting computer software to different languages with out any software engineering. This is added to the module with reference to the implementation of the SilverStripe Open Source CMS.

The module is now working well for English and Sinhala ( Click here to see the Sinhala enabled site ). So I would love to hear for any contributions for translating the module to more and more languages.

I believe this is a nice project, where you can have calendars in your own language. If you feel like to contribute as a translator check the following words and translate them, and email me fonsekaean@gmail.com . I'd love to hear from you ;)

JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
DEC

SUN
MON
TUE
WED
THU
FRI
SAT

JANUARY
FEBRUARY
MARCH
APRIL
MAY
JUNE
JULY
AUGUST
SEPTEMBER
OCTOBER
NOVEMBER
DECEMBER

NEXT
PRE

17 January, 2009

Calendar Module for SilverStripe

This post is about some recent open source stuff I did. I am a fan of SilverStripe for about two years. After setting up my own IT company I did a lot of projects with the use of SilverStripe, for those I had to write new modules, widgets, and themes to customize the CMS.

From the first day I start working with SilverStripe I started to contribute them, mainly with Widgets, but after setting up the free template portal of whynotonline.com I managed to contribute with some themes. Now on the (15th January) I managed to get approved my first module which is named as Calendar. Now it is listed on the SilverStripe Official Module Directory. I have been dreaming about this occasion, to do a good module, and to get the approval is not something easy, you have to make a lot of sacrifices for that, just like cutting down your sleep, working extra hours, reading about technologies, inventing algorithms, etc. Anyway I am really happy with what I have achieved.

Also I found a new project from whynotonline.com, which is an implementation of the Calendar Module, and that has gone live now too. Sometimes rather than reading documentations and user manuals, it is better to see a real world implementation of a software. If you think that same click here to see the website.

Also I want to thank my best friend also one of my batch mates at the university Lakshan in this occasion, he is the one who introduced me to the SilverStripe Open Source CMS, it was on somewhere in the beginning of 2007. He is my first open source guru, as friend he has been helping me a lot.

And then Dasun, my business partner, good friend. I started the whynotonline.com with Dasun, he has been an interesting character at the university. He always helps me with work. Many thanks Dasun.

So at last I would love to invite you to use my module, and join to club! :)

03 January, 2009

Seizing Kilinochchi

Our military forces managed to seize the LTTE HQ Kilinochchi yesterday (2nd Jan 2009).  The military forces have been making a lot of effort to destroy terrorism from Sri Lanka, and establish democracy.  

Kilinochchi has been acquired and ruled by the LTTE for the last decade, and it is know as the HQ of them too. This victory is really important in destroying terrorism, now LTTE rules only Mulathive, Lets wish our soldiers, officers ,our president, and all to achieve the vistory over the LTTE.

And all I owe my gratitude to our heroes


02 January, 2009

Template site redesigned

Our template portal didnt have a nice look, and feel. What I believe is that a good design is not only a good looking one, but a website which is very much user friendly. This idea was established at whynotonline.com too. So as to make real good designs I was asked to redesign the two websites that whynotonline.com has.

Now this was not an easy task for me to design a good desing, it should look nice, user friendly, and lots of stuff to keep in mind. Okay at last I came up with a design to the whynotonline.com main website which got real good comments.

Yesterday I have being working late hours on the templates website too, which is newly designed and which is now really user friendly. It would be nice to make your comments about that.

http://templates.whynotonline.com Click on the link to visit the site.