Jump to content

HTML?


Recommended Posts

Posted

1. a way to get html into an error_message?

2. when I use lang="" in the template to display a translatable lang bit, it's not parsing break tags from the editor. Why? I don't see first party translatable lang bits having anything done to them other than the lang="".

Actually I think I figured out #2. I think someone just pasted directly into the editor with break tags... I went and replaced a couple with actual line breaks and it displays properly.

Posted

I didn't just pass a key. I did the following:

				$text = \IPS\Member::loggedIn()->language()->addToStack( 'x_required_error', FALSE, array( 'sprintf' => array( $url, $name ) ) );
				\IPS\Output::i()->error( $text, '2S177/2', 403, '' );

$name is a lang string and $url is a url with the html tags in. Are you saying the lang bit isn't parsed before the point of error()?

Posted

I'm so ready to finally be done with this app. I just did html for a page that has a lot to show on it and it's so messy and I bet i will be frowning when i look at it to see what it looks like...

I am probably only 1 day from being finished, finally, other than bug fixing... (edit, well and after the bug fixing, I still have to do the upgrade routine to move some db data to new locations or alter what is stored...)

Posted

Am I supposed to call some particular method to parse the string or what? If it's possible to display htmnl in error(), then it must be bypassing whatever is done during normal output to parse lang bits... because it's not working.

Posted

I don't really understand your problem. You pass a language key (or the md5 hash as you are doing there), and HTML is supported. The template uses the |raw modifier so really you shouldn't be having any problems.

 

Posted

Well, I was trying to have it put a link in the error message and instead of it doing so, it showed it unparsed, with the a tags and not clickable, etc... So something is up. I'll look at it again and maybe I can figure it out, but I did it just like my example above and the link was the anchor tags around a url generated with internal().

Posted

Thanks. Wow, I knew about htmlsprintf, but then never needed it so far, so forgot all about it. I think my brain is overloaded with so many areas at once. I even looked in Lang.php and somehow still overlooked it as an option.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...