My first widget
Tuesday, April 18, 2006 4:39:02 PM
As a participant at The Gathering, I was fortune enough to sit some 20 meters away from the Opera stand, and got the opportunely to talk to quite a lot of the present employees, and frankly, I was impressed how friendly and helpful they where. Props!
Anyway. After been knocked out of the Battlefield 2 tournament, I found myself having two full days without really having anything constructive to do, so I figured; why not try making a Widget.

For those of you who don't know what a widget is:
A widget is a web page whit out any background, which is placed right on your desktop, in stead of the traditional placing in your browser.
Widgets are unlike traditionally web pages supposed to preform a rather specific task, like displaying a RSS feed, and is not really supposed to preform a lot of tasks, like providing search, displaying the time, and show a RSS feed at the same time.
The reason for this, is that if the user don't want or need one of your features, or one of your features becomes obsolete, he or she will probably swap your widget, with two others which preforms exactly the tasks that he or she wants.
Now, there are four things you really should know before trying to make a widget:[/B]
HTML, CSS, JavaScript and Photoshop or some other graphics program.
I don't know shit about JavaScript, so I found myself looking for an already existing widget to base my own widget upon. The answer to my quest was found in the “Hallo World” test/demo widget.
Before I write anything more, I probably should explain what my widget actually does.[/B]
My widget, lets you check if you have got any new Personal Messages (or PM for short), in any phpBB2 board, given that the board owner has uploaded the privmsg_widget.php file in the document root of the board.
The widget is able to do so, because widgets share cookies with the Opera browser itself, meaning that if you are logged in to the board with your web browser, and have checked the “log me in automatically” check box, the browser, and therefore also the widget, will remember your name and password.
I'm still waiting for some comments on the widget, which was promised us by opera, and as son as I get this, I will walk you through the code as best as I can.
Until then, here are some screen shots of the widget in action:[/B]

Anyway. After been knocked out of the Battlefield 2 tournament, I found myself having two full days without really having anything constructive to do, so I figured; why not try making a Widget.

For those of you who don't know what a widget is:
A widget is a web page whit out any background, which is placed right on your desktop, in stead of the traditional placing in your browser.
Widgets are unlike traditionally web pages supposed to preform a rather specific task, like displaying a RSS feed, and is not really supposed to preform a lot of tasks, like providing search, displaying the time, and show a RSS feed at the same time.
The reason for this, is that if the user don't want or need one of your features, or one of your features becomes obsolete, he or she will probably swap your widget, with two others which preforms exactly the tasks that he or she wants.
Now, there are four things you really should know before trying to make a widget:[/B]
HTML, CSS, JavaScript and Photoshop or some other graphics program.
I don't know shit about JavaScript, so I found myself looking for an already existing widget to base my own widget upon. The answer to my quest was found in the “Hallo World” test/demo widget.
Before I write anything more, I probably should explain what my widget actually does.[/B]
My widget, lets you check if you have got any new Personal Messages (or PM for short), in any phpBB2 board, given that the board owner has uploaded the privmsg_widget.php file in the document root of the board.
The widget is able to do so, because widgets share cookies with the Opera browser itself, meaning that if you are logged in to the board with your web browser, and have checked the “log me in automatically” check box, the browser, and therefore also the widget, will remember your name and password.
I'm still waiting for some comments on the widget, which was promised us by opera, and as son as I get this, I will walk you through the code as best as I can.
Until then, here are some screen shots of the widget in action:[/B]





