Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   <nohtml> (https://forums.graalonline.com/forums/showthread.php?t=75146)

cbk1994 07-06-2007 05:47 PM

<nohtml>
 
I recall someone suggesting this, but I'd really like this.

In GuiMLTextCtrl, I need to be able to use HTML, but there are certain parts I can't have it used. This is a chat message system, and right now players can use HTML in their chat! Uh oh! However, I need HTML to set colors!

What if I could do something like this:

PHP Code:

chatMessage.text "<font color=\"#FFFFF\"><nohtml>" clientr.message "</nohtml></font>"

That would be PERFECT for what I need.

Please implement this, or provide some alternative!

Thanks,
Chris Zakuto

Moondeath_2 07-06-2007 06:48 PM

Quote:

Originally Posted by cbkbud (Post 1326166)
I recall someone suggesting this, but I'd really like this.

In GuiMLTextCtrl, I need to be able to use HTML, but there are certain parts I can't have it used. This is a chat message system, and right now players can use HTML in their chat! Uh oh! However, I need HTML to set colors!

What if I could do something like this:

PHP Code:

chatMessage.text "<font color=\"#FFFFF\"><nohtml>" clientr.message "</nohtml></font>"

That would be PERFECT for what I need.

Please implement this, or provide some alternative!

Thanks,
Chris Zakuto


I knew them disabling it would intefere with developing somewhere, I don't see why they just have a filter agaisnt certain html functions. x_x

Inverness 07-06-2007 09:50 PM

Why can't you just not allow players to send messages with the angle brackets in them?

cbk1994 07-06-2007 10:12 PM

Quote:

Originally Posted by Inverness (Post 1326210)
Why can't you just not allow players to send messages with the angle brackets in them?

I could, but then we run into:

Guy1: >.< that sucks
Guy2: >_>
Guy3: That way --->
Guy4: <3

we run into all of this stuff, and if we absolutly must we'll make a parser to run through, but it seems so much easier for something like <nohtml>

Thanks :)

Admins 07-06-2007 10:22 PM

It's not that simple, people could add </nohtml> tags in their text or so :)
You can disable tags

cbk1994 07-06-2007 11:34 PM

The problem with disabling the tags is that I need to use the <font> tag.

What if there was something like <∫> </∫>, or some other special character that we could disable without upsetting players?

¨¥†®ƒ∆¬ß

Any special character would work. We really need to be able to do this, do you have any other suggestions?

Edit: Or if we could set the toggle character, that would rock. For example, we could make the toggle be <pT4iLk7> </pT4iLk7> so that players would have a helluva time trying to find what it is.

Inverness 07-07-2007 01:07 AM

Use a custom profile for the font and set the fontcolor in it.

Admins 07-07-2007 01:09 AM

May be a function for removing any tag from a string would be the best, or you manually scan for "<" characters

Inverness 07-07-2007 01:19 AM

Quote:

Originally Posted by Stefan (Post 1326258)
May be a function for removing any tag from a string would be the best, or you manually scan for "<" characters

Well the HTML parser already removes the HTML tags, why not just make a function like that except without actually applying whats parsed.

JkWhoSaysNi 07-07-2007 01:21 AM

Does the GUIMLTextControl support HTML entities?

Then you could just replace < with &lt; and problem solved.

Admins 07-07-2007 01:44 AM

In the new version yes

Moondeath_2 07-07-2007 03:53 AM

Quote:

Originally Posted by JkWhoSaysNi (Post 1326265)
Does the GUIMLTextControl support HTML entities?

Then you could just replace < with &lt; and problem solved.

But what's the fun of that? :\

Tigairius 07-07-2007 03:54 AM

parse each word in the message and if a parse contains "<" do
if (parse != "<3") return;

cbk1994 07-07-2007 04:16 AM

Quote:

Originally Posted by Inverness (Post 1326256)
Use a custom profile for the font and set the fontcolor in it.

You can't make sections of the text use one profile.

For example the text might be:

Jave: Okay, move into the battleground!
Private Message (drakehighlander): You really sucked that one up!
Axis wins the current battleground!
Staff Mass: We are closing the server in approximatly five minutes for a mass reset.
JFX: WTF I JUST GOT ALL THESE GUNS



So yah, we really need to be able to use multiple colors.

Switch 07-07-2007 10:54 PM

How about Stefan makes it so that i shows what would be inside the HTML tags like "<" and ">" instead of not showing ANYTHING?
">_<" turns into ""
But with what I said it would be
">_<" turns into ""
And for REAL HTML,
"
<body>
<blah>blah</blah>
</body>
"
turns into
"
"
But we could make it so that it shows what's inside the tags and all of the stuff.
Good way to solve no?
I know it may be a bit confusing though xD


All times are GMT +2. The time now is 03:46 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.