Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: flyingmembers - helmikuu 27, 2005, 07:09:13 AP

Otsikko: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: flyingmembers - helmikuu 27, 2005, 07:09:13 AP
I can't seem to get HTML to be placed within a post...do I need to surround it with a special tag?  Would love to have this function to insert Javascript also...
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Tristan Perry - helmikuu 27, 2005, 07:21:23 AP
Tags like <b>, <i> etc are allowed, however allowing javascript would be stupid. It'd make SMF insecure.
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: flyingmembers - helmikuu 27, 2005, 09:57:42 AP
Tau Online, thanks for your constructive email! :-\

Can anyone else advise?

Lainaus käyttäjältä: Tau Online - helmikuu 27, 2005, 07:21:23 AP
Tags like <b>, <i> etc are allowed, however allowing javascript would be stupid. It'd make SMF insecure.
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Tristan Perry - helmikuu 27, 2005, 10:00:05 AP
Lainaus käyttäjältä: flyingmembers - helmikuu 27, 2005, 09:57:42 AP
Tau Online, thanks for your constructive email! :-\

Can anyone else advise?

Lainaus käyttäjältä: Tau Online - helmikuu 27, 2005, 07:21:23 AP
Tags like <b>, <i> etc are allowed, however allowing javascript would be stupid. It'd make SMF insecure.
Sorry, I missed the first part of your thread. To insert HTML into a post, just wrap the text with the correct tags. For example to bold some text:

<b>Text</b>

etc.
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: flyingmembers - helmikuu 27, 2005, 10:07:49 AP
IS there a hack for inserting Javascript?
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Grudge - helmikuu 27, 2005, 10:28:30 AP
1.1 will allow admins to post HTML, of course you'd only ever allow HTML to be posted by admins, anything else would be suicidal
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: flyingmembers - helmikuu 27, 2005, 11:23:14 AP
Sorry what's 1.1?  Also, what if I compremised and inserted a PHP include instead?  The actual PHP code could then contain the Script?

I would really really love for someone to help me with this!
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Trekkie101 - helmikuu 27, 2005, 11:44:46 AP
1.1 is the next major version of SMF  :)

I dont think you can insert code in anyway, as Grudge said, it wouldnt be healthy, you have to use BBcode, it cant really be done.




Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Peter Duggan - helmikuu 27, 2005, 12:34:40 IP
Lainaus käyttäjältä: flyingmembers - helmikuu 27, 2005, 11:23:14 AP
Also, what if I compremised and inserted a PHP include instead?  The actual PHP code could then contain the Script?

While you could do that with a PHP include in a template, there's not much point because your JavaScript might as well go straight into the template. But PHP includes in posts wouldn't work at all because the page has already been transformed to (X)HTML by that stage.
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: flyingmembers - helmikuu 27, 2005, 01:31:45 IP
...but the problem is that I'm told that Javascripts won't go into the posts?
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Dem0n - helmikuu 27, 2005, 03:48:02 IP
Lainaus käyttäjältä: flyingmembers - helmikuu 27, 2005, 01:31:45 IP
...but the problem is that I'm told that Javascripts won't go into the posts?

In above post it was states this would make SMF Insecure. I don't know about you, but i wouldn't want my forums insecure, would you?
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Oldiesmann - helmikuu 27, 2005, 04:45:52 IP
Think about this... Suppose some joker comes onto your board and wants to annoy the heck out of your users, so they post this code:

<script type="text/javascript" language="JavaScript">
function alerts()
{
var foo="You can't get rid of this. Sorry!";
for(i = 1; i < 1000; i++)
{
alert(foo);
}
}
</script>
<a onload="alerts()">


This is an innocent example, but it can still be frustrating. This will cause an alert with the message "This is a javascript alert. You can't get rid of it." to appear 1000 consecutive times. Even if you managed to clear the alerts at the rate of 1 per second (which is very unlikely), it would take you 16 minutes and 40 seconds to clear all 1000 alerts. During this time, you would not be able to do anything else in the current browser window. No way to close the window, no way to stop the alerts... You'd have to kill your internet connection, forcefully kill that process or restart your computer to make them go away (would you sit there for almost 17 minutes clicking on them?). Killing the process is easy, but a lot of novice/casual computer users wouldn't have a clue how to do that. Like I said - this is an innocent example. There are a lot of things someone could do to you that are much much worse, and I'm not an expert on Javascript, so I don't know the full potential of the language.
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Trekkie101 - helmikuu 27, 2005, 04:51:58 IP
/me runs away with code and play prank on annoying members of my forum  :P
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: flyingmembers - helmikuu 27, 2005, 06:09:20 IP
So what if I could only add it for myself?  I.e. set it to admin staff only?

I'd really like to use this function!
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: [Unknown] - helmikuu 27, 2005, 08:07:23 IP
Lainaus käyttäjältä: flyingmembers - helmikuu 27, 2005, 06:09:20 IP
So what if I could only add it for myself?  I.e. set it to admin staff only?

I'd really like to use this function!

Let me say it again:

In SMF 1.0.2 and below, this is not available.  A tag to do this will (in the future) be available in SMF 1.1, which has not been released yet.  Please do not ask when it will be released, because we will not tell you.

If you allowed me to post JavaScript code on your forum, I could have control over your entire forum if not your whole server within a period of a few minutes.  Be careful.

-[Unknown]
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: flyingmembers - helmikuu 27, 2005, 08:16:32 IP
What a reply!  To note "you never said it again"....

You may be great at coding but your Public Relations suck big time.

Lainaus käyttäjältä: [Unknown] - helmikuu 27, 2005, 08:07:23 IP
Lainaus käyttäjältä: flyingmembers - helmikuu 27, 2005, 06:09:20 IP
So what if I could only add it for myself?  I.e. set it to admin staff only?

I'd really like to use this function!

Let me say it again:

In SMF 1.0.2 and below, this is not available.  A tag to do this will (in the future) be available in SMF 1.1, which has not been released yet.  Please do not ask when it will be released, because we will not tell you.

If you allowed me to post JavaScript code on your forum, I could have control over your entire forum if not your whole server within a period of a few minutes.  Be careful.

-[Unknown]
Otsikko: Re: HTML allowed? Javascript, HREF tags etc.,
Kirjoitti: Amacythe - helmikuu 27, 2005, 09:18:58 IP
LainaaWhat a reply!  To note "you never said it again"....

You may be great at coding but your Public Relations suck big time.

Excuse me?  If you search you will find that he has  said it before, just not in this thread.  As for his PR, you try answering a question a dozen times because others haven't bothered to look around (Search) before asking questions and see how thin your patience wears. 

/me rolls her eyes and stalks out of the topic