Textpattern Forum

You are not logged in. Register | Login | Help

#1 2009-09-08 04:45:39

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

taghandlers.php : remove hardcoded <br> tags

e.g., lines : 921, 1175 ( $out = (!empty($label)) ? $label.br.$out.$sub : $out.$sub; )

There really shouldn’t be style elements in the code, mmKay?

Offline

#2 2009-11-12 22:35:15

hal.subs
New Member
Registered: 2009-11-12
Posts: 4

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

Hi

I would really like to be able to remove the automatic <br> that is generated with this tag <txp:output_form form=“search_box” />

Can I please have the code or instructions to remove auto line breaks?
Thanks

Offline

#3 2009-11-12 22:47:47

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

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

hal.subs wrote:

<txp:output_form form="search_box" />

If you have a tag like that, you should look inside your form ‘search_box’…


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

Offline

#4 2009-11-13 00:28:05

hal.subs
New Member
Registered: 2009-11-12
Posts: 4

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

Hi

Form code = <div id=“search-box-wrapper”> <txp:search_input wraptag=”“ /> </div>

<txp:search_input wraptag=”“ /> is standard search tag. How can I define it to remove the output <label><br><input>?

At the moment I have just removed it with the CSS using #search-box-wrapper br (display:none).

Does the trick but there must be a better way. The <br> tag is hardcoded.

Thanks

Offline

#5 2009-11-13 00:58:00

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

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

How can I define it to remove the output <label><br><input>?

Sorry, had to remove my bullsh…

<txp:search_input label="" wraptag="" />

Last edited by uli (2009-11-13 01:04:47)


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

Offline

#6 2009-11-13 02:05:54

hal.subs
New Member
Registered: 2009-11-12
Posts: 4

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

Hi
That removes the “label” entirely. I still want it to say “Search” but remove the auto line break that is generated.

Thanks for the response all the same.

Offline

#7 2009-11-13 09:48:13

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

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

I really like to help but I don’t want to break you of thinking ;)


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

Offline

#8 2009-11-13 10:21:18

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

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

Because at the moment the br is hardcoded, you have two options:

  1. modify taghandlers.php
  2. don’t use the search_input tag, but handcode the search box

BTW, this is the ‘Feature Ideas’ forum, for questions you’d better use How do I….


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

Offline

#9 2009-11-13 12:01:58

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

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

Els wrote:

handcode the search box

That’s been my first guess (see “… my bullsh…”) until I saw that emptying the attribute values and deleting the button attribute could remove any unwanted elements. The br is apparently inserted as soon as you enter a value for label. Didn’t know that.


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

Offline

#10 2009-11-13 13:03:22

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

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

uli wrote:

The br is apparently inserted as soon as you enter a value for label. Didn’t know that.

Neither did I. Still, if you want to keep the label, you’re stuck with the br. I just thought of a third option: use rah_replace to replace it with a space ;)


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

Offline

Board footer

Powered by FluxBB