Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-06-29 07:55:12

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,126
Website GitHub

html id attribute for txp:image

…so that it can be adressed through the DOM with GetElementbyID for unobtrusive JS methods such as described here in A List Apart

The necessary additions are minor – I suggest the attribute htmlid to differentiate from txp’s id:

In function image

additional attribute around line 52:
'htmlid'=> ''
output of additional attribute around line 84:
($htmlid)? 'id="'.$htmlid.'"' : '',


TXP Builders – finely-crafted code, design and txp

Offline

#2 2006-06-30 02:43:20

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

Re: html id attribute for txp:image

Added. r1392.

Offline

#3 2006-06-30 16:32:22

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,126
Website GitHub

Re: html id attribute for txp:image

Great :-)

… and thank you!


TXP Builders – finely-crafted code, design and txp

Offline

#4 2006-07-03 16:31:21

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 5,126
Website GitHub

Re: html id attribute for txp:image

Mary, just got round to updating this and ran into an error. I think an error sneaked in as you were reworking txp:image and txp:thumbnail. I get a series of messages in live mode saying: select * from txp_image where id = '66' limit 1.

One of the safe_row database requests (line 160) is different from the others in that it has ,1 at the end. Removing it resolved the problem for me.


TXP Builders – finely-crafted code, design and txp

Offline

#5 2006-07-03 20:30:13

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

Re: html id attribute for txp:image

Whoops. Thanks. Fixed.

Offline

Board footer

Powered by FluxBB