Divis Blog

Just another geeks blog.

Writing ICQ Open Xtraz

clock January 15, 2009 08:04 by author Divi

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:

clip_image002

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).

clip_image004

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:

clip_image006

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:

clip_image008

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:

clip_image010

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:

clip_image012

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:

clip_image014

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:

clip_image016

"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).

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Twitter is a nice thing

clock October 12, 2008 00:25 by author Divi

I just was recovering the menu of my blog, because the links of my projects as well as the button for switching the language were not shown since the last update anymore. As I was just adding some stuff I realized that the BlogEngine has a widget for twitter.

What is twitter?

Twitter ist a page where you can leave short messages (almost like a SMS) to share with your friends what you're just doing. Others then can register themselves to stay up-to-date with your news. It's some kind of bulk-SMS with self-registration.

image

What I think about twitter?

I think twitter is a very nice idea, that could get big very fast. The only problem with twitter is that the people you want to share your thoughts with, need to be interested in you. That means - if noone watches your twitter-feed, noone will ever read it.

So if you got friends that are interested in reading what you're doing all day - twitter is a realy good tool to accomplish that - if not - you should know what twitter is, just to be able to discuss with someone, but you should save the time for writing the texts.

One nice thing about twitter is: You may set your messages to private-only. In this case everyone has to ask for your permission to subscribe to your feed.

Twitter-Widget

My intention was to write a short script to enable the BlogEngine to get my feeds. Twitter is very easy to handle, because it publishes a rss feed of every user which you can even limit by the specific parameter to save your and your servers traffic. But as I already told you earlier, BlogEngine already has a tool to do this for me, so I just had to insert my twitter-data (address and rss feed) so the tool could fetch them for me.

Twhirl

Because sometimes it's very annoying to login on twitter.com to post your last message, there're several tools which you can install on your PC that do the login, posting and even the retrieving of your friends feeds for you. One of these tools, that is unfortunately not listed in the downloads section of twitter.com is twhirl. Twhirl is a desktop client for twitter, based on Adobe Air. But even though this requires you to install Adobe Air, it's not a big deal, because the Air- as well as the twhirl-installation are almost self-running. As soon as you installed twhirl, you're getting the following list-view, which you can style by a well filled list of skins:

image

 

Summing up:

It's a quite nice idea for chatty people, but you have to have the nerves to always keep your messages up-to-date - and people that are willing to read what you're writing - otherwise twitter would be like an instant messenger without contacts ;-).

Currently rated 5.0 by 1 people

  • Currently 5/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


MS is not cool enough

clock August 25, 2008 15:54 by author Divi

Hi all,

How doesn't know it yet: "Photosynth" is a project of the "Microsoft Live Labs", where you can upload your pictures which Photosynth then tries to combine to a big one. If that works well enough, you're then able to click through the single parts of the big image to get a three-dimensional impression.

Some days ago I downloaded the required plugin, installed it and uploaded some pictures from a wedding party. Everything worked fine, but as I just wanted to show the result to my girlfriend, I got the following message:

"Unfortunately, we're not cool enough to run on your OS yet. We really wish we had a version of Photosynth that worked cross platform, but for now it only runs on Windows. Trust us, as soon as we have a Mac version ready, it will be up and available on our site."

image

Ok - beside the fact that I already installed and ran that plugin ... how the hell do they get the idea I could be a MAC user? Ok - if I'd be using Firefox or Opera - I could take this as a joke ... but I used a MS-IE7! I hope they'll fix it these days, because I really appreciated that cool 3D-view. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Much to do!

clock July 20, 2008 22:21 by author Divi

Since a while I had no time anymore to write some texts for my blog, but because there was just a little break, I thought I could add a short summary of my projects:

That thing that swallowed most of my time during the last weeks was the Microsoft exam 70-536: "Microsoft .NET Framework - Application Development Foundation". After I investigated all my free time in it and couldn't get it at the first try, I had to take my second shot. But the passing of the exam didn't release that much of my time, because all that projects that had been bottled-up had to be done now.

Here're some of them:

Pixelkaempferin - alias Jessika Wollstein

image

A good friend of mine, which wanted to demonstrate her abilities of graphic design. I really enjoyed working on that page, because I could try out some gimmicks. One of them was a the fact that she is now able to configure almost every page by XML and the icons are loaded automatically (matching to the config). Another thing was a diagonal menu, wherefore I just had the idea of an imagemap and some attached mouseover effects.

Spielefinder.Net

image

On a party one evening I talked to my girlfriends brother and asked him about some tools the web is still missing. I wanted to write a new project as a little training, but it needed to be a project which didn't already exist. During our conversation about verious ideas, he got me on the point of a game database. There're many of them, but none allows to filter the games by hardware. So about a week ago I got a page online which was able to filter its database for a specific hardware setup. Over that the client is able to specify a tolerance via some sliders (from the ASP.Net ajax toolkit) for the case they want to upgrade their PCs.

Codeplex - DownloadCounter

And last but not least: I added a new project to Codeplex named "DownloadCounter". At the moment it's just a very simple assembly and a demo project. I started that project, because the boyfriend of my sister asked me if I could put some files online for download and I decided to give him the ability to track how many times these music tracks where downloaded (he's a little hip-hopper) so that he can measure his success (or not :-D). And because I already wrote several download counters, I thought I could write one in .Net which was reusable and put it on Codeplex so that it can be improved over time - so I'm now hoping that some guys will download it and give me some good hints for improving it.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Various 20080406

clock April 6, 2008 15:28 by author Divi

In the last time I haven't had much time to work on my blog or some of my private sites, because at my job we've (fortunately) very much work to do which is sometimes (unfortunately) a little bit short of time.

To not open a larger theme in here, which I'd like to explain much more detailed, but wouldn't have the time to, I decided to just post some things that I found during the daily work of the last weeks:

 

VSO DivxToDVD

Some days ago I was asked to get a very debatable video from the internet on DVD, because a friend of mine has no computer to use the internet himself or at least watch the downloaded video. After some flops of software I tried, I was guided by Google to the page of Softonic, where I found the VSO DivxToDVD Converter 0.5.2.99. It's a pretty cool tool, simple to use and free:

image

As I went to the producers page to check out for some updates, I found out (to my regret) that the nice (and, much more important, free ;-D) Tool became fee required. I think it's a good thing that VSO decided to bring it to the market, because I really like that tool, but I don't want to pay for it as long as I just need it from that rarely. The new name of the tool is ConvertXToDVD and costs about 40€.

(Hint: Softonic still offers the link to the old, free version).

 

SDP Multimedia

As I was searching for the solution of a problem during the last week, I found a webcast which I'd like to watch, but which had no download link. It seemed as if there'd be some very interesting infos inside of it, but because it was to long, I tried to download it on various ways (which didn't actually work) - until I found the stream ripper SDP Multimedia.

image

It's a little bit slow while downloading (or perhaps it has just been the streaming-server :-D), but in any case: It's also free!

You only need to add a stream via the MMS protocoll and instantly the SDP starts downloading it to your harddisc.

 

FileSystemWatcher

At work we're using VisualCron since several months to do our filesystem-based cronjobs. Some days ago I found out that that the .Net framework allready offers a helper class, which can be used to do exactly this thing: System.IO.FileSystemWatcher.

This object allows you to watch filesystem and react on various events (e.g. changes, updates,...). Therefore you only have to instantiate the object, choose the directory to watch, (optionally define a file mask (e.g. to just react on .cs-files)) and to tell the object to start watching:

 

System.IO.FileSystemWatcher fsWatcher = new System.IO.FileSystemWatcher();

fsWatcher.Path = @"C:\fsWatcherTest";
fsWatcher.Created += new System.IO.FileSystemEventHandler(FileCreated);
fsWatcher.WaitForChanged(System.IO.WatcherChangeTypes.Created);

 

With this code, you get the FileSystemWatcher to wait for the creation of exactly one file and call the method FileCreated afterwards. To react on the renaming of this file - and this not once, but several times, I extended the program in the following way:

 

class Program
{
    static void Main(string[] args)
    {
        System.IO.FileSystemWatcher fsWatcher = new System.IO.FileSystemWatcher();

        fsWatcher.Path = @"C:\fsWatcherTest";
        fsWatcher.Created += new System.IO.FileSystemEventHandler(FileCreated);
        fsWatcher.Renamed += new System.IO.RenamedEventHandler(FileRenamed);

        while (true)
        {
            fsWatcher.WaitForChanged(System.IO.WatcherChangeTypes.Created);
            fsWatcher.WaitForChanged(System.IO.WatcherChangeTypes.Renamed);
        }
    }

    static void FileCreated(object sender, System.IO.FileSystemEventArgs e)
    {
        Console.WriteLine(String.Format("File Created: {0}", e.FullPath));
    }

    static void FileRenamed(object sender, System.IO.RenamedEventArgs e)
    {
        Console.WriteLine("---");
        Console.WriteLine("File Renamed:");
        Console.WriteLine(String.Format("Old path: {0}", e.OldFullPath));
        Console.WriteLine(String.Format("Old name: {0}", e.OldName));
        Console.WriteLine(String.Format("New path: {0}", e.FullPath));
        Console.WriteLine(String.Format("New name: {0}", e.Name));
        Console.WriteLine("---");
    }
}

 

After I entered the code I did the following steps

1.) Started the program.

2.) Created a text file in the specified directory.

3.) Renamed the newly created text file.

This caused the following output:

image

 

Interesting: If I create a new file on Vista via right clicking, I get a new file where the file name (without the extension) is marked, to ease the renaming. As I just said - the file is firste created an renamed later on (as can be seen at the image above). So take care that a file you handle might not have its final name after the creation.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Free pdf-printer from Bullzip

clock February 22, 2008 19:25 by author Divi

During the last days I've been asked several times for the possibility to convert, as easy as possible, any Word-files into pdfs. Usually one of the following things crossed my mind instantly:

- OpenOffice offers the option to save files as pdfs.

- The Office 2007 plugin "Save as PDF" (naturally requires Office 2007)

- The Acrobat Distiller (Part of the commercial Acrobat from Adobe)

 

From time to time I made myself some trouble searching for an up-to-date version of some tools, that might could help me, but most of the time I recommended, to the guys that haven't had Office 2007 installed, to download and install OpenOffice.

 

Since today I would recommend, to the guys without Office 2007, because I like its plugin, to download the "PDF Printer" from Bullzip. The PDF-Printer ist free and requires only the installation of "Ghostscript". Both downloads can be found on the download-page of Bullzip:

 

Bullzip

After the installation, there's a new printer placed in your system control panel. If you select that device and print your document, a dialog appears, which asks you for the target file location. After you selected the destination, everything will happen automatically.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Kane and Lynch installer

clock January 20, 2008 15:00 by author Divi

After I've heard of "Kane and Lynch" (and just wanted some dark humor), I thought: "Hey - you could try the demo, which is laying around on your desktop for the last days." ... I really had to smile a little bit, as the installer looked as follows:

 

KaneAndLynchInstaller

 

Obviously there was missing a localisation file I thought and tried to click through the well-known mechanics. Unfortunately this try also failed, after I selected the path to install, because there appears an error message, which closes the wizard. Unfortunately I couldn't read anything so I was not able to install that game.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Outlook-Odyssey

clock January 19, 2008 17:11 by author Divi

As I already told you some days ago, I've bought the Office package. Full of anticipation to not get my mails anymore through the web interface but to just open my Outlook, I opened it and selected "Exchange" as mail server type. Obviously the biggest fault I could do :-D 

After I entered all required information for connecting to our Exchange server, my Outlook told me that they couldn't be verified ... Pity ;-) ... but the best joke came after that: Our admin had a good advice for me: First create another account and then set up the Exchange account manually in the configuration menu ... said - tried - failed.

The problem: Outlook offered the following options after reopening it:

1.) Enter valid account information for the Exchange (see above: that didn't work)

2.) Cancel

So I clicked "Cancel" to enter an alternative mailing server as primary account ... but ... hmm ... obviously the "Cancel" button forced Outlook not to go back one step to choose another server but to close ... Hard luck. Outlook wanted me to enter valid data for an Exchange accoutn and NOTHING ELSE!

 

So I thought: There must be any way out and started searching my registry for the name of the Exchange server. I found it on two places. One of them was the browser history (from the web interface) - the other one was at:

HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\<username>\13dbb0c8aa05101a9bb000aa002fc45a

First first try was, who'd have guessed, to clear that value... didn't work. So I simply deleted the whole key ... FAULT :-D!

After I started Outlook again, I got the following miraculous message:

MessagingServiceError

(You don't have the current version of the Microsoft Exchange-Message service. Please Create an profile first.)

Hmm ... ok - attempt failed - it was late - I haven't had a backup ... so: repair Outlook ... didn't work - deinstall Outlook and install it again - also didn't work ...

Slowly I got a little bit frustrated... Last try: Got the "work"-laptop and searched the key on it (To go the save way I deleted the whole <username>-key and replaced it with the information from the laptop) ... And when I just were destroying my new system, I also copied the whole profile-directory from the Vista directory:

DRIVE:\USER\<username>\AppData\Local\Microsoft\Outlook

En voila - my Outlook started the first time - the Exchange was already configured and all of my mails were already available (only the mails from the shared folders were missing) - and now I can finally write my mails at home :-D. 

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Strange problems with the BlogEngine

clock January 12, 2008 00:53 by author Divi

In any way there're some strange problems with the BlogEngine at the moment ... I already got used to edit them again, as soon as I published them from the live-writer, to remove the "tags:" writing,  but there seems to be also a problem with the IDs, because from time to time the entries seem to be duplicated... Or - much worse: I just got home and the newest entry was gone.

Fortunately the Live-Writer had cached a copy of the entry, so it saved me the time for writing it again.

I'll keep track of that ...

[UPDATE 20.01.2008] It simply seems to be the LiveWriter, because everytime I post anything - and even if i'm instantly changing the page after the post, there're two entries created. I've posted an issue about that on Codeplex.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


PC update and party

clock January 12, 2008 00:49 by author Divi

Slowly I'm getting ready. Today my new Office 2007 arrived, which I've had ordered at Amazon. On my work-pc I was already used to have it installed, but at home I haven't had it at hand as fast as I wanted. We've got a really cool concept of variable workplaces: Everyone of us got a laptop which he/she can just plug in at a desk next to his/her team colleagues. Unfortunately we have docking stations therefore in the agency, but at home I've got to work on the monitor of the laptop... that's no problem if you "just" want to check your mails or do something else - but a "normal" monitor is irreplaceable, if you want to enjoy the work for a longer time. That's the reason why I'm just gathering all the tools I need to work on my desktop pc at home.

Office2007_thumb1

Nevertheless I've just hired the room I'm always having my parties in. I would have prefered to get the 23.02., but because it was already taken, I decided to shift the party for one week to the 01.03.. And that was very handy as I realized on the next day: So I can have two parties :-D. So if you've ever been on one of my parties - expect your invitation.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5