May 20, 2003

It’s been a very long time indeed :p However, the good news is that I’m actually back to working on Blog 8.0 again. I was stuck for a while on how to get hyperlink and image insertions working since the WPTools component only allows the insertion of the actual image or URL – there is no support for additional attributes like target, width, height, id, class etc. I wrote to the WPTools usenet group hoping somebody else might have come across the same problem and found a solution and I found somebody – Nick Crosby. Nick was kind enough to give me a few pointers on the direction that I should follow and after a day of stumbling around I was able to figure out how to insert a hyperlink with extra attributes. In the process, I also modified the hyperlink entry dialog box in Blog so that now you can select a set of default targets from a dropdown list or enter your own target – this should help people working with frames or IFRAMES. I also added a blank field where you can enter any other attributes of your choice as ‘=’ separated values pairs.

The only problem is, that I am not able to get the editing of an already entered URL working properly on the WYSIWYG view :-( I can retrieve the actual URL fine, but can’t retrieve the extra attributes since none of the WPTools functions for retrieving the URL support the extra attributes. Bummer! I’ve written back to Nick in the hope that he has encountered this problem too and has figured out a way around this and am waiting on him. In the meantime, I guess I’ll also try to find out how to add extra attributes to images. Of course, since Blog now also has a working HTML view, it is simple enough to edit a hyperlink in the HTML view but what if a user prefers to work in the WYSIWYG view? Shouldn’t they have the flexibility to enter a URL and to edit a URL? I think so. So I’ll try to get that working …

In the meantime, I’m also trying to figure out how to handle images and external file links in the new setup with Blog. Since images will be displayed in the editor only if I retain the external link to them specifying where they reside on the hard disk, I’ll have to retain that information when I save an entry. However, what I used to do with Blog was retain the file information only when the image was first added, automatically upload the image file but store only the file name as a remote reference on the Blog entry. Not sure if that even made sense to a lot of people but anyway, the problem is that the old approach will not work. I have to retain information as to where the image file is on the local hard disk in the database. This will probably mean that I have to parse an entry each time before a publish, find the image tags, convert them to server references and then publish. That’s going to be a bit of extra work and I hate approaches where you have to do repetitive work needlessly – but in this case, I think there is no getting around the need for the extra work. Ah well…

Be Sociable, Share!
Tags: General
Posted by Fahim at 6:28 am   Comments (4)