Posted by Amir Shevat | Posted on 03-08-2010
Category : Open source, Opinion
If you are reading these lines, chances are you will not click on any of my ads.
In one of my previous articles, I have explored several revenue models for open source projects. I have promised to update on ad-supported revenue model as a way to make money from open source. In this article I report back on the relatively poor revenues you get out of this channel.
I have confirmed this fact with many open source bloggers and they all provide the same feedback – Software developers in general and open source developers even more so, are not interested in clicking on advertisement.
Spacebug, for example, is a dev-blog and has some open source projects hosted in it. Spacebug.com has moderate popularity – it gets about 60k unique visits a year. The revenues I see from it is about 100-200$ a year. It covers the expenses but is nothing to write home about.
These are some possible reasons why visitors to dev-blogs do not click ads:
- Developers are not here to shop – they are not interested in anything other than free content provided in the site.
- Developers are so accustomed to ad-supported websites the advertisement are transparent to them.
- Developers use ad-blockers and do not get the ads served in the first place
- Advertises and ad networks fail to deliver interesting content that fits the developer needs
I base these reasons on my behavior as a developer who visit dev-sites and from feedbacks from other open source bloggers
Posted by Amir Shevat | Posted on 02-06-2010
Category : AJAX, Open source, jquery
What is auto complete and auto suggest?
Auto complete and auto suggest are a user interface feature that extend search functionality. It basically makes it easier and fast for the user to search structured data.
There is sometimes a mixups between Auto complete and Auto suggest. I will try to state what comes to my mind when talking about both. I also share a fix/midification I have done for a cool auto suggest jQuery plugin.
Continue Reading
Posted by Amir Shevat | Posted on 23-04-2010
Category : Open source, Software development, Tips, jquery, web
Real estate on your web page could be as important as real estate in real life. You got very little space on your client screen and need to use every inch (or pixels). Errors and messages take up valuable space that could be better used for more important things.
That is why Gritter is a great JQuery plugin – it saves real estate on your page by showing alerts, messages and errors in a floating bubble way, that is both informative and (because you can configure Gritter to fade away after a few seconds) non intrusive:

This image was taken from one of our new site’s design, we decided to use Gritter instead of putting the errors and notification inline.
Check out Gritter’s demo site and project site and, for CakePHP developers, here is an article about integrating Gritter with CakePHP.
It is open source, looks great, easy to integrate, and is very useful!

CakeOTP is a reference implementation of User Registration with a secure, table-less and expirable implementation of One Time Password for the popular CakePHP development framework.
New in CakeOTP release 1.1
1) Automatic login process, after the account activation- The user is automatically logged into the site and is redirected to an internal page, immediately after activating his/her account.
2) User email validation.
Download this release here.
Checkout the Online Demo, project page and getting started page.
Posted by Amir Shevat | Posted on 13-04-2010
Category : CakePHP, Open source, Software development, Tips
Sometimes you need to enable silent (implicit) login for your users. A good example of this would be this – after a registration process, you would want to automatically login the user, rather then having him retype the user name and password.
In CakePHP there is a simple method in the Auth components that lets you login on the user’s behave.
Here is how it is done:
// assuming $password is the clear text password
$this->data["User"]["password"] = $this->Auth->password($password);
$this->data["User"]["username"] = $username;
// do the login
$login = $this->Auth->login($this->data);
// $login is true is login went well.
// now we can redirect the user to any page:
if($login){
$this->redirect(array('controller' => "anycontroller",
'action' => "any_secure_action", null));
}
This will be implemented in the next CakeOTP release.
Posted by Amir Shevat | Posted on 09-04-2010
Category : AJAX, IPWEditor, New Release, Open source, SAAS, Software development, release, web

IPWEditor provides easy in-place editing for Web pages with a layer of WYSIWYG. It allows you to seamlessly replace text on Web pages with inputs for on-the-spot editing.
Up until now IPWEditor did not support TinyMCE advance settings, due to a minor bug found and resolved by the community.
This release incorporates this bug fix and adds additional documentation around the ‘cancel’ functionality.
DEMO (TinyMCE)
Click me! I am editable and WYSIWYG!!! (TinyMCE)
Code behind:
<script type="text/javascript" src="jquery-1.3.2.js"></script>
<script type="text/javascript" src="jquery.editable.ipweditor-1.2.1.js"></script>
<script type="text/javascript" src="tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<div id=”editable” class=”myipwe1″> Click me! I am editable and WYSIWYG!!! </div>
<script type=”text/javascript”>//set all the tinyMCE configuration here and pass it to the editable
$().ready(function() {
var ed = new tinymce.Editor(‘myipwe1′, {
theme : “advanced”
}); $(‘.myipwe1′).editable(
{
type: ‘wysiwyg’,
editor: ed,
onSubmit:function submitData(content){
alert(content.current)
},
submit:’save’,
cancel:’cancel’
});
});
</script>
download and docs
Formal documentation and download can be found here.
Posted by Amir Shevat | Posted on 05-03-2010
Category : CakePHP, Open source, PHP, Security, Software development
I have been using CakePHP for a long time now and enjoy every second. It provides a productive, easy to use and well document platform for PHP application. The key advantages for me are – transparent OR mapping, a strong Model View Controller framework, and tons of extra utilities that make your life better.
I have came across a possible security issue in one of cakePHP code examples. This section of code is responsible to authorize or un-authorize clients access to a certain action (MVC flow)
action == 'delete') {
if ($this->Auth->user('role') == 'admin') {
return true;
} else {
return false;
}
}
return true;
}
?>
The major security rule this code is breaking is – never ever have ‘return true’ as a default for an authorization method.
Continue Reading
Posted by Amir Shevat | Posted on 11-02-2010
Category : CakePHP, Open source, PHP, Security, Software development, release

CakeOTP is a secure, table-less and expirable implementation of One Time Password for the popular CakePHP development framework.
A one-time password (OTP) is a password that is only valid for a single login session or transaction. It is commonly used in the internet for registration and password reminder process in which OTPs are provides to the user in a form of a link that the user uses to access in order to create/reset his password.
The problem is that most one-time password implementation involve maintaining additional database tables and batch process that handle the persistence and expire date of the one time password. This adds complexity and reduces performance.
CakeOTP is a simple and clean implementation of one time password. It reduces complexity by removing the redundant SQL calls and DB batch maintenance while still keeping the one time password secure and expirable.
Download this release here.
Checkout the Online Demo, project page and getting started page.
Feel free to post comments and questions.
Posted by Amir Shevat | Posted on 26-01-2010
Category : Microsoft, Open source, Opinion
In an interesting blog post about New Zealand education system moving from Microsoft to open source. I have noticed that the advertisement picked for the blog post, indicates that automatic-advertisement finally developed a sense of humor:

I hope I get the same kind of advertisement and then we can have a recursive blog post.
Posted by Amir Shevat | Posted on 22-01-2010
Category : CakePHP, Open source, PHP, Security, Software development, release

I have started to implement the algorithm for tableless, secure One time password.
Here is a link to the Demo, and here is a link to the beta release.
The only thing you need to do other then the regular cakePHP setup is to create a user table (used by the CakePHP Auth component):
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL auto_increment,
`username` char(50) default NULL,
`password` char(40) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;
Continue Reading