NEWS CATEGORIES:



NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
Home / News / Webmaster / Tips and Tricks

Tips and Tricks


How to Customize Opera Widgets

A Simple Clock Widget for Your Desktop

By Catalin Bocanu, Web News Editor

28th of December 2007, 17:59 GMT

Adjust text size:


Opera Widgets Example
Enlarge picture
Opera widgets are web applications that run directly on your desktop without displaying the browser controls because Opera web browser can install and show them automatically.
They can be constructed using regular client side programming languages such as JavaScript and Flash. As a consequence, minimal knowledge regarding common used web-related programming languages are necessary if you want to create a new widget or to modify an existing one.

The main parts of an Opera widget are a file named index.html and a config.xml file. The index.html file can control external files, such as Flash animations or external Javascripts or could contain a Javascript in it, for example. Practically a widget could be assimilated to a regular client side web application which performs certain actions on a Windows or Linux desktop, as if it was called from a web browser.

The config.xml file is made in compliance with the Extensible Markup Language (XML) specifications. It contains the widget "configuration" options such as dimensions, icon, security, id and more. Every Opera widget is a zip archive containing beside index.html and config.xml other necessary files such as images, external javascript or CSS files.

For example, if you want to modify an existing Opera widget, you just have to download it and unzip all files in a convenient location, even if the file has not specified the archive type. Then, you must identify the elements that should be changed and their corresponding code in index.html, Javascript, Java or other existing file in the archive. For testing purposes (after you modify the widget) you must drag and drop the config.xml file directly in an Opera browser window and the widget will run automatically.

The next code forms an Opera widget that will display the current time on your desktop. It contains a Javascript included in the index.html file:

CODE

Clock


Look At The Current Time On Desktop!!!!!!
The current time is :

var Time = new Date()
var h = Time.getHours()
var m = Time.getMinutes()
var s = Time.getSeconds()
if (m < 10)
m = "0" + m
if (s < 10)
s= "0" + s
document.write(h + ":" + m + ":" + s)




The corresponding config.xml file must contain the next code:

CODE

Clock

This is a clock widget (simple clock)

300
300

yourdomainname.com
Clock
2007-12

TAGS:

Opera Widgets | Javascript Clock | Clock Example | Opera Widget Customization | Opera Widget Download
Read by 4,041 user(s) | Add comment | Link to this article TWEET THIS


Article rating:
Good (3.5/5) 4 vote(s)    

Subscribe to news | Print article | Send to friend

© Copyright 2001-2009 Softpedia
Contact:

 

 

SEARCH THE NEWS ARCHIVE :




Today's News
| Yesterday's News | News Archive


MORE RELATED ARTICLES:


The Basic Structure of a HTML Template

Web Site Development with WYSIWYG HTML Editors

Optimal Usage of WYSIWYG HTML Editors: KompoZer Case

Easy Building of Web Applications with HTML/OS

Trip into the Future of HTML

Automatically Create HTML Photo Albums with Image Thumbnailer and Converter Software

Windows Media Player in HTML

Google Page Creator

Automatically Designed Professional CSS Templates in a Few Easy Steps

A Simple Javascript Example

User opinions:

No user comments yet.
Be the first to express your opinion using the form below!

Share your opinion:

Your Name:
Your Email Address:
(will not be used for commercial purposes)
Solve this to prove you're not a bot: =
Your review/opinion:

 




Windows tabGames tabDrivers tabMac tabLinux tabScripts tabMobile tabHandheld tabGadgets tabNews tab

SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   ENTER NEWS SITE   |   ENGLISH BOARD   |   ROMANIAN FORUM