Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-01-13 02:21:35

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Stuck with javascript conflicts for new plugin

Hi,

I am in the process of writing a plugin (my first one) for my new photo gallery Site.
The plugin is working so far, and I am like 80 % done.

Apart from better sorting features for images by category it will implement also a Lightbox call from the thumbnail anchors.
I got this working so far, so I can release this soon.

However, there are two hurdles, that I couldn’t get over:

  • Because I am passing some additional stuff into the title attributes, for this purpose, I want to ged rid of the default tooltip, that still hangs on the default node of the title attribute. The only way to get around this so far, that I could find, was to call each image twice and then setting the first image to display: none through CSS. I’ve searched around extensively, up to Dustin Diaz and such, but nothing that works in my case.
  • What is the most cross-platform and most reliable way, to force line breaks inside the title attributes ?
    ( Using an HTML escaped HTML carriage return entity will not work in this case ! )

Any hints, Ideas would be apreciated.

regards, marios

Last edited by marios (2007-01-13 02:25:16)


⌃ ⇧ < ⌃ ⇧ >

Offline

#2 2007-01-13 02:45:32

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Stuck with javascript conflicts for new plugin

…force line breaks inside the title attributes ?

You can’t – they are meant to be inline descriptions. You can make it look like it with various JavaScript “tooltip” scripts, but it can’t be done for non JS browsers.

…want to ged rid of the default tooltip…

Pretty much every tooltip script I’ve seen does this, but if you aren’t using one the JavaScript can be simple enough: just loop through the relevant elements, and set its title attribute to empty, basic DOM stuff.

I would suggest you look at the various tooltip scripts that are around, to see how it is done.

Offline

#3 2007-01-13 18:55:34

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Stuck with javascript conflicts for new plugin

I could resolve the first Issue. ( The problem here, was, that normal DOM scripting didn’t do, since all the rest uses the prototype syntax )

now the last thing is the lin-break thing.
I wish there was a way around this.

Thanks again

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

#4 2007-01-28 03:09:27

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Stuck with javascript conflicts for new plugin

Could resove all those issues, however, I’ve hit another very uggly problem, which is to pass the image id’s to all the exif functions ( iterate over them ) and then get each result back to the image query function and put it all together.
each task i fine when performed isolated, but the two things together are a nightmare.

In other words, this is well over my head.

If I fail on this one, then I ‘ll just post a simple proof of concept plugin and bail the further rest on ransom.

regards, marios


⌃ ⇧ < ⌃ ⇧ >

Offline

Board footer

Powered by FluxBB