As I read that ICQ 6.5 has been release some days agon, I wasn’t quite excited ... various errors, crashes and disturbing little things had put the old versions into a bad light. Actually I had sworn to myself never to use ICQ again, after it crashed the last time without any reason, but because I already broke that intention several times by clicking quicklaunch-items that were laying around, I thought I could at least have a look at the new version ... The only thing worth to mention seemed to be the "Open Xtraz"-campaign:
I almost left the page as I decided to find out what these Open Xtraz would be. So I opened the Developers Zone and got desperately disappointed ... about 10 forum entries and only rudimentary instructions for the Xtraz just wasn’t what I expected. But at least there was a list of things to do when you wanted to develop your own extra:
1.) Download Open Xtraz Developer Tool
2.) Download Open Xtraz Template
3.) Develope and test
4.) Upload Xtra into the gallery
Seemed to be quite simple – so I downloaded the DevTool and clicked the link for getting the template – but the template didn’t want to be loaded as long as I wouldn’t have installed the new ICQ, so I decided to install it.
After everything was installed, I first opened the screen "My Xtraz" (See below). The screens had been empty at this point. So I clicked the "button" "Create Xtra" (at the right bottom).
But that didn’t open, as expected, the developer tool, but a link which pointed back to the "Developer Zone". Here I had to click on the link "Download template", which made ICQ create a directory on my drive. In this directory were placed two subfolders named "content" and "theme" as well as several configuration files. All together it remembered me on the packages which are used to create Firefox extensions. In another subfolder in the themes directory you can find the icons (ICQ not wants you to change their file names). And lastly there’re Javascript-, HTML and some image files in the "content"-folder.
If you open the Xtra it will look somehow like this:
And here we can see the reason why it’s necessary to download a new template for each Xtra. ICQ seems to create the IDs in this way (see the title of the page (green bar))… As if they couldn’t have done this while uploading the Xtra into the gallery ;-)
Well ... at least we now know that it’s just HTML and Javascript. So let’s have a look into the "developer tool" ... you guess it:
Nothing special - instead of some kind of developement environment or at least something that could give you a hint how to do it, it’s just a UI for setting some metadata for the project. For example you can set the name or the description of the project as well as the size of the window in which the Xtra should be displayed.
In the middle you’ll find two radio-buttons, which decide where the project is located ... The upper radio button (default) simply contains a link to the directory which ICQ created while creating the Xtra. The lower radio button (this could be quite interesting) tells the Xtra that the project is located at a specific web address. This means that you could for example host interactive content on your own server with a database behind it.
The locations below the radio buttons are more for your information then meaningful for any actions - they just help you getting through the jungle of icq template-directories ;-). Lastly at the very bottom there’s a link for creating a zip archive out of your Xtra which you then can upload - that’s all about the "developer tool".
So let’s have a look at the files in the directories themselves.
The HTML-file:
The HTML file has links to the included func.js file as well as a link to a Javascript file that is located at the ICQ-server, which contains the API. The rest of the files only contain some HTML and CSS, which result at the screenshot you could see above.
The JS-file:
In the JS file you got the following first line:
var icqConnector = XtrazConnector.getIcqConnector();
Here will be the XtrazConnector-object used to initialize the so called IcqConnector. If you got a debugger, just like the Visual Studio, you simply can insert the keyword "debugger" into the first line of the init method and you get any information about the Connector:
At my first peek at this interface, I really had to laugh quite loud – didn’t I just read that the JS file, which was hosted at the ICQ server itself, was named "open_xtraz_wrapper_1.js"? So why did we get here already ApiVersion 2? ;-) ... well ... details ;-D.
At least we can see here a rough overview about the functions which the Xtraz API is offering. We can create "Alerts" (Alerts are the small windows which appear directly above the SysTray) and send a message there... The attempt to use it for debugging reasons turned out to be very very annoying, because I flooded myself with Alerts and had to click each single one to read the next one ;-).
Another method for example is GetUserList(). This method returns the following object:
At first I was a little bit over-challenged, because I thought I could access the properties via their indexes – but this was prohibited to me. Would I have had a look into the documentation a little bit earlier (which btw. doesn’t explain how it works), I could have saved me some time for searching, because at the definition of the method "GetGroupList()" they’re accessed via "Group(Idx)" which also works for this method ... So we can simply create a loop through all the users via a for loop which walks all the items from zero to the number of items:
var users = icqConnector.getUserList();
for (var i = 0; i < users.Count; i++)
{
var user = users.Item(i);
}
The user object then offer you all the information about your contacts which these entered – that means in my case I always had the nick name at hand but only very rarely the real name. The birthday was filled at the half of all my contacts, so I decided to create a birthday list for testing. After some attempts it looked similar to this:
The scrollbar I had to add myself, but that was done very quickly, because the "Developer Tool" allowed me to set a fix height of the window and I just had to add a DIV with the specific height and the style property "overflow:auto". Of cause I added a small headline, as well as a link to my website – but that’s all. One interesting thing about this was the case that ICQ threw an Javascript-error as I tried to access a table via innerHTML – because of this the list is only mad of floating DIVs.
After everything was finished I tested if everything worked fine - and then you could instantly upload it ... I thought :-D ... As I tried to upload the project I got the error message that my mail address could not be verified ... ok - because of security reasons they should do something like this, to prevent malware from being uploaded ... But: After the confirmation of my mail address (ICQ itself removed the "not verified" message from the settings), I still got the message. So I searched via Google for a solution of my problem and found someone who wrote that it didn’t work for him as well until he created a new account. Because I already spent some time for writing this Xtra I decided to try this solution and created (unwillingly) a new account - but that also didn’t work - so I tried to restart my ICQ - and - I was able to upload a version...
Because I could neither find a hint if it worked in the "My Dev" section nor on icq.com, I posted a complaint, that something didn’t work over there...
Meanwhile I got a mail from ICQ ... In this they write, that my Xtra doesn’t match the requirements ... Reason: I didn’t create my own icon. ... damn - ok - icon created and tried again to upload ... obviously they respected my complaint, because now you can’t read anymore "Mail address not valid", but just:
"Upload failed" ... without any reason - without description - nothing that says why the upload failed - I think they just replaced the error message, so that noone can see how they are unable to conrol their own system...
Conclusion:
I think Open Xtraz are a really nice idea ... I think you could create almost something like a second Apple AppStore - but I also think they really fouled up while implementing it. I hit that often on my desk because of the frustration that made me headaches while I was kicked out, tried to login without success or upload files that were blocked without any help, that I’m quite unwilling to deal any further with it ... Request to ICQ: Fix that damn bugs - or at least don’t be that petty to refuse working uploads because they don’t have the icon you want. THANKS!
If someone is interested enough to engage with this and hasn’t been infected by my annoyance, you can find the reference to the API here. I wish you a lot of fun with your projects - it’s quite funny - I hope you will succeed with your uploads ;-)
[Update]
About 3-4 days after my second complaint I got a message from ICQ that told me that my error was recognized and fixed. Meanwhile the birthday list has been downloaded about 10.000 times. You can find its gallery page here. Now everything seems to be working fine. I'm glad to see that ICQ was able to fix their problems. One warning I'd like to give you for your way: If you're using alternative clients for the ICQ network, you might get multiple contact requests daily by bots that try to add you to their contact list. I got about 4-5 contact requests a day from several russian accounts. (And of course - I also tried to reply to them to check wheter it could be just someone interested in talking to me ;-D). If you're using ICQ itself, you can open your settings and block all messages from persons which are not in your contact list. That's working fine with ICQ. In Trillian this doesn't seem to work the way I wanted it to (as far as I experienced it).