Fortnightly Post #4.7: Long time, no post

Hi, there! It has been a while since I last posted. Time has swiftly passed and there were notable events galore. I have enjoyed my spare time that I planned from the start and now it’s time to get back to work.

Last time I talked about the “blueprints” for the tag page. Now, it is almost complete, but unfortunately, we might give it up. Why you may ask, well it’s because we haven’t yet decided which format the images will be. It depends on those that “draw” (better said, create) them. They might be svg or a section of a 3D model, in which case the drawer will also be the one to tag them. I am quite happy with my tag page as I learnt a gamut of technologies like: JavaScript, JSON, AJAX, (better) PHP, using plugins like jCrop and Select2.

Because the updates for the tag page have stalled, I now have to focus on the presentation part. I have to create a gallery for the forthcoming images and I have one plugin in my mind but it first needs approval. Till then…

Happy birthday DEX Online!

Fortnightly Post #2.6: Tag me well!

The code review went well, there were some minor fixes that Cătălin Frâncu, my mentor, had to make. But now it’s stable, there are no more errors or warnings and everything seems right. I still have to add some comments to my code as I reckon that good implementation needs good documentation.

I’ve started writing the tag page and there are ideas galore. Some of them still need discussed because in my mind they’re somehow equivocal. Basically, on this page, there will be one of the images that need tagging. There will be some fields which the volunteer has to complete (e.g. the lexeme that is in the tag, the centre of the tag coordinates, the the centre of the pointed area coordinates) and this information will be stored in the database. Of course the most difficult part is to get the coordinates from the image. But fortunately, all of this work is done by plugin which is called jCrop. It lets users create a selection on an image and then it returns the coordinates (x, y) and the size (width, height) of it. With some JavaScript (which I have just started learning), I calculate the coordinates of the selection centre, which populate the input fields.Based on this coordinates we plan to draw the tags and pointing arrows on the image using HTML 5 <canvas> tag. I really enjoy this part of the project as it seamlessly combines server side and client side scripting.

That’s all for now and for a few days henceforth. I will indulge myself with a short vacation.

Fortnightly Post #2: Manage file with style!

Almost done with the elFinder file manager!

I have successfully binded its results of users actions to queries in the database. After completing an action (move, delete, copy, rename) the elFinder (elf, henceforth) adds the name of the command to an array and the results to another array. I created a function that makes queries based on the data stored in those arrays. For example, if a new file is uploaded the script creates a new entry in the table with the path of the added file and the user that completed the action; if a file is moved, it changes its path and so on. This is possible as the elf has a bind option that calls an external function whenever a specific user action is completed.

I have sent the code to be reviewed by my mentors and I’m looking forward to my second commit.

My next task is to create a new page where text in images can be tagged. This is helpful in search engine indexing and will be implemented using jCrop.

Fortnightly Post #1.5: Please wait while updating…

I had the task to update elFinder, the file manager plugin that is used to store and manage The Word of The Day (wotd, henceforth) images. The new version has a lot of new features, like search and multiple roots. Multiple roots was the main reason for the update, but it wasn’t what we had really expected. Multiple roots meant that two directories could be managed from the same window and we didn’t want that, as different people will manage wotd and definition images respectively. But there where major differences in syntax and compatibility that convinced us the update was still needed.

After the code and files update, when testing, the plugin wouldn’t work. That was because the new version had some bugs when using jQuery library greater than 1.7.x (DEX Online had 1.8.3). Fortunately, elFinder had a branch that solved these bugs. Unfortunately, it needed newer versions of jQuery and jQuery UI than the site had, so I found myself once again updating. When everything seemed right, one admin table (which was implemented using jqGrid) disappeared completely. You guessed, it also needed a small update because jQuery deprecated some of its methods that jqGrid used.

After that I tried most of the site pages looking for errors and all looked promising, until I checked The Word Mill game. Yep, you didn’t guess. This time, it was not my fault and neither any update’s. It was simply because on local clones, definitions that the game needed to work, weren’t copied.

Albeit it might have seemed tedious and annoying, on the contrary, it was utterly constructive as I had to wander about the source code, which made me understand how it works and ease further development.

My next task is to create a separate page to manage the definition images, and write a method that creates or modifies entries in a data table, depending on users’ actions in elFinder.

Fortnightly Post #1: DEX Online — The Illustrated Dictionary


My name is Marian Alexandru Grigoroiu and I was assigned ‘The Illustrated Dictionary’ project. My main objective is to create a platform for adding images to words’ definitions.

I have reserved myself a fortnight to study the source code and to do some research. Monday I will start the real coding and I can hardly wait. We are yet to decide all the details regarding the looks and the implementation, but our guideline is: ‘Keep it simple!’.

Good luck to you all!