[TYPO3] TS: Supply minW/minH with a value from a register
Christopher
bedlamhotel at gmail.com
Mon Mar 13 06:01:37 CET 2006
Replying to myself:
On 3/12/06, Christopher <bedlamhotel at gmail.com> wrote:
> Hi Joerg,
>
> On 3/12/06, Joerg Wagner <jwagner at digilog.de> wrote:
> > Hi Joey,
>
> <snip>
>
> > I have used <hX> tags, but my GIFBUILDER images are enclosed as <img> tags
> > between <hX> and </hX>, and not used as background images for the <hX> tag.
> > You are right, using them as background images would open the possibility to
> > nicely crop the image width by CSS settings, but I there is no possibility
> > to set any alt and title attributes for background images, and I don't see
> > how I could feed in an alternative text (e.g. for screen readers). Maybe I
> > am overlooking an ingenious possibility here to put the plain text between
> > the <hX> and </hX> and visually hiding it using CSS, but currently I do not
> > see such a solution. Please tell me, whether I am overlooking something
> > here.
>
> Well, you may be missing something. Have a look at the source code at
> http://www.bedlamhotel.com/ (there's only one page, so you should be
> able to find it easily...)
>
> The h1 on that page is replaced with a GIFBUILDER text image, and the
> css specific to the image used is created using a combination of
> LOAD_REGISTER and a surprisingly small userfunc that may be of
> interest to you since it works by building the GIFBUILDER object,
> using php to determine its size and dynamically building the css.
>
> The image in the h1 can be adjusted using the align option in the
> header field in content records, so I wouldn't think it'd be too
> difficult to do the sorts of things you're trying--I _do_ think that
> you will need at least a little bit of php to get the output you're
> after though.
>
> I keep meaning to try to turn my TS/userfunc example into a proper
> extension, but I haven't had time yet to do so. Since it might be
> useful to you & others, I'll post it to the wiki a bit later today in
> the hopes that someone will be able to take the basic idea and code
> and turn them into a nice, more flexible extension.
>
> Once I've done it, I'll post back to this thread.
>
I've done it. For a fairly complete tutorial on how to build FIR
headers using TS and a short userfunc, see
http://wiki.typo3.org/index.php/GIFBUILDER_FIR_IMAGES.
It's basically just commented code, but I think it's clear enough that
anybody reasonably experienced with TS should be able to follow it.
Again, if somebody would like to make an extension out of it, please
do so!
-Christopher
More information about the TYPO3-english
mailing list