Textpattern Forum

You are not logged in. Register | Login | Help

#11 2009-11-13 13:07:35

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 5,979
Website

Re: taghandlers.php : remove hardcoded <br> tags

fwiw I find the forced br a little annoying at times, especially when using the core’s ‘label’ feature in plugins. The alternative is to code the label stuff manually, but that adds bloat to plugins and using the core functionality is simpler (br notwithstanding).


The smd plugin menagerie — for when you need one more gribble of power from Textpattern.

Txp Builders – finely-crafted code, design and Txp

Offline

#12 2009-11-13 22:11:30

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,117

Re: taghandlers.php : remove hardcoded <br> tags

Strange enough in this discussion: If you specify a label tag it is not even applied/output although the attribute’s name suggests so: The result is as if you write Search manually in front of a handcoded search form. (So this’d be obviously a valid fourth option ;)

I can’t tell when txp:search_input got its own form attribute, but as we have forms of type category and section now, shouldn’t there be one of type search for the sake of consistency?

I set up a second example in Textbook for showing the minimum of code required to build a customized search form. But neither is my coding waterproof nor is my English. Would someone be so kind and have a look if anything needs some sandpaper?
Thanks!

Last edited by uli (2009-11-13 22:12:30)


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#13 2009-11-13 22:54:28

Els
Admin
From: The Netherlands
Registered: 2004-06-06
Posts: 7,390
Website

Re: taghandlers.php : remove hardcoded <br> tags

uli wrote:

If you specify a label tag it is not even applied/output although the attribute’s name suggests so

Uli, I don’t quite get it; there is no labeltag attribute, so I assume that is not what you meant?


<txp:Els /> ;)
Tag Reference | Unexpected behaviour? Check the tag trace | Still no clue? Check the names of your custom fields

Offline

#14 2009-11-13 23:14:38

uli
Moderator
From: Cologne/Köln
Registered: 2006-08-15
Posts: 3,117

Re: taghandlers.php : remove hardcoded <br> tags

Els wrote:

there is no labeltag attribute

Of course you’re right.

I think calling it “label” made me think the thing that’s named label here would be enclosed by labeltags, because otherwise I wouldn’t need an attribute, I could just write it in front of the form, semantically perfect or not. Small “but”, I know: It would be outside of the form then.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#15 2009-11-24 06:03:08

TheEric
Plugin Author
From: Wyoming
Registered: 2004-09-17
Posts: 564

Re: taghandlers.php : remove hardcoded <br> tags

Bloke wrote:

fwiw I find the forced br a little annoying at times, especially when using the core’s ‘label’ feature in plugins. The alternative is to code the label stuff manually, but that adds bloat to plugins and using the core functionality is simpler (br notwithstanding).

So … I don’t know, remove three characters, “br.”?

Their should not be any markup that the user doesn’t explicitly specify.

Offline

#16 2009-11-24 06:20:22

wet
Developer
From: Lenzing, Austria
Registered: 2005-06-06
Posts: 3,115
Website

Re: taghandlers.php : remove hardcoded <br> tags

Eric, the disutility of hard-coded markup in core tags is undisputed. This thread is currently revolving around suggestions on how to solve this in a backward-compatible, coherent manner.

Offline

Board footer

Powered by FluxBB