I wrote a patch to fix xhtml validation, where block elements were put inside inline elements. In my opinion the whole story of putting the img inside a link-element was not done in a very clean way, thats why I hope this patch gets taken into cvs ...

Comments

Wes Cowley’s picture

Cool, thank you. You beat me to this, it was next on my list to fiddle with. I had to tweak it just a bit because it looks like it assumed a patch I didn't have (one that changed a parameter name from size to label in image_display) but after that it's working perfectly and validates.

crac’s picture

;) thats nice someone likes it ...

btw. the name of the function variable has changed in cvs since 4.5 ...

crac’s picture

can somebody of the devs tell me why you dont want to apply this patch to cvs, eventhough its clear that the code is not xhtml conform?

crac’s picture

better keeping ugly and buggy code than applying patches ...

ezheidtmann’s picture

With your patch, image_display() sometimes makes a link, sometimes it doesn't, and the condition where it does ($label = 'thumbnail') isn't immediately obvious. How about instead of adding the $tid argument, add a $link argument so it's clear you're making a link?

I don't know the trick to getting your patches accepted, but I know whining won't do it.

crac’s picture

StatusFileSize
new3.76 KB

How about instead of adding the $tid argument, add a $link argument so it's clear you're making a link?

done.

I don't know the trick to getting your patches accepted, but I know whining won't do it.

dont worry, this was my last patch for this module.

ezheidtmann’s picture

Looks fine to me. It gets my +1, if that means anything.

Robrecht Jacques’s picture

Assigned: Unassigned » Robrecht Jacques
Status: Needs review » Closed (fixed)

"image.module" validates to XHTML (afaics). Since version v.1.146 image.module uses a "span" around the "img", not a "div".

As for the "link" stuff: it is no longer needed (and more consistent like it is now) to put this inside 'image_display'.

I think we can "close" this. Maybe I misunderstood what you were trying to do. If so, reopen the issue.

crac’s picture

Status: Closed (fixed) » Active

thats a joke, isnt it? how do you validate your code? REOPEND

you call the same function different times for the same output. not the div or span are the problem, but the links: links around links ...

Robrecht Jacques’s picture

I really don't understand what you are talking about. What this patch does is change:

<a href="..."><span class="image thumbnail"><img ... /></span></a>

into

<span class="image thumbnail"><a href="..."><img ... /></a></span>

Right?

I wrote a patch to fix xhtml validation, where block elements were put inside inline elements.

I don't see "block elements in inline elements". <span>, <a> and <img> are all inline elements. No?

thats a joke, isnt it? how do you validate your code? REOPEND

http://validator.w3.org/

I must be unknownly funny, 'coz I'm not joking... If "image.module" is not valid XHTML I will want to see it fixed - and I will bug walkah until he does fix it. I just don't see it...

you call the same function different times for the same output.

Do we? Where? What? And how does this patch change this?

not the div or span are the problem, but the links: links around links ...

What links around links? And how does changing the order of "span" and "a" help?
I know that <a> around <a> is not valid XHTML, but I don't see it being generated anywhere.

Please help me understand the issue, and I'll help you getting it applied.

crac’s picture

Status: Active » Fixed

you are right, sorry for that! thats the problem when so much time passes ...

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Anonymous’s picture

Status: Fixed » Closed (fixed)