[Typo3-dev] Core or extension? was: IMAGE.alttext RC2 possible bug

Martin T. Kutschker Martin.T.Kutschker at blackbox.net
Mon Apr 5 18:19:39 CEST 2004


Robert Lemke wrote:
> Hi Martin,
> 
> On Mon, 2004-04-05 at 14:04, Martin T. Kutschker wrote:
> 
>>>I still think that this is the job of an extension like the
>>>dmc_image_alttext plugin. Such an extension only has to create two new
>>>fields and add some TypoScript to use them.
>>
>>Oh come on, accessability is a top priority issue for some sites. This 
>>is really something that belongs to the Core and not some extension that 
>>has to use hacks (ie use the class extension mechanism) to get something 
>>like this done.
> 
> Well, please have a look at the current class.tslib_content.php. Using
> XCLASSES or even any PHP is not neccessary in order to get a new title /
> alt attribute. Everything is accessible either through TypoScript or by
> calling the function getAltParam.

I forgot that. Ok, if it can be done without XCLASSes I might change my 
mind.

>>But it seems we have different opions on alt/title anyway.
> 
> No, I don't think so. I personally use alt / title properties by default
> in my projects. But using an extension has different advantages:
> 
> - It's not neccessary to change the core, if something should be changed
> for the creation of alt / title tags. That is important, because many
> sites won't update their core for one and a half year or so, until the
> next stable release comes out

I don't see what might happen.

> - The core becomes more generic and works more as a framework rather
> than a HTML render engine. I know of projects using TYPO3, who don't
> produce HTML at all - they use it for generating reports or even PHP.

Duh, text w/image and images are straightforward html. Changing them is 
fine, as you won't need them in any other context.

> - This paticular core feature would depend on a correct implementation
> of another extension, namely css_styledcontent.

Why? alt and title are attributes. Any TS extension will do that 
implements them.

> It's no problem to
> change the TS configuration of that extension too, but while we're at
> it: Why is css styled content an extension? Or templavoila?

So you are more flexbible. But why use "classic" TypoScript anyway. Drop 
tt_content and use only flexform/templavoila. But wait, there is 
something to the effect in the TODO.txt.

As long as there is tt_content and tslib_content.php IMHO it makes sense 
to have alt/title in the Core.

> Imagine that someone would like to force his backend users to always
> fill in the description (alt / title attribute) of all images being
> uploaded. Implementing that as an extension is fairly easy now because
> no strict default implementation is done yet.

The site admin should be able to make any field required (and vice 
versa). This shouldn't be hardcoded in the extension (or the Core).

> But away from that: Why not do it as an extension, if it's possible
> without getting such problems like using XCLASSES etc.? You could argue
> that you want it to be a default behaviour. But then why not create a
> package which contains certain "shy" extensions by default?

So you're argueing to do it as an extension with the option to ship it 
with the standard distro or as a "WAI-package".

I'm not convinced because alt/title are so intrinsically linked to HTML, 
but a shy extension in the standard 3.6 distro would satisfy me. If this 
means anything to you ;-)

Masi

PS: But please remove strip_tags() :-)





More information about the TYPO3-dev mailing list