Am I an idiot? Posting HTML?

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
SHOwned
Registered User
Posts: 48
Joined: Mon Aug 08, 2005 7:50 pm

Am I an idiot? Posting HTML?

Post by SHOwned »

I could have sworn there was a feature to allow the posting of HTML in signatures and such, am I an idiot and just can't find it or does it not exist?

phoenix-cms
Registered User
Posts: 34
Joined: Sat Mar 04, 2006 3:40 pm

Re: Am I an idiot? Posting HTML?

Post by phoenix-cms »

html has been removed for security reasons use the bbcode instead and even make your own bbcodes based on html code in the acp

Steve :)
working on a cms to be intergrated with phpbb 3 without any major code changing to keep with phpbb 3 guidelines

SHOwned
Registered User
Posts: 48
Joined: Mon Aug 08, 2005 7:50 pm

Re: Am I an idiot? Posting HTML?

Post by SHOwned »

phoenix-cms wrote: html has been removed for security reasons use the bbcode instead and even make your own bbcodes based on html code in the acp

Steve :)



Awsome thanks for the reply! I have been working on that actually. I plan to use PHPBB3 for my CounterStrike clan forum and am trying to get server stats in my sig. Here is the thing generated by the stats site:
<TABLE align="center" cellpadding="10">
<TR><TD valign="top">

<!-- Server Monitor (The main monitor) | START ------------------------------->
<!-- NOTE:
This first segment of code is only for the server monitor itself.
If you want to include the server usage graphs, then scroll down to
the marked code.
-->

<SCRIPT LANGUAGE="JavaScript"
SRC="http://share1.serverspy.net/cgi-bin/mon ... mid=149014">
</SCRIPT>
<!-- SERVERSPY GAME CODE END -->



<!-- Server Rank Image | START ------------------------------->
</TD><TD align="center" valign="top">
<!-- NOTE:
Use the image URL's below. You can arrange them anywhere on your site.
Most users like to present these along side their main server monitor.
-->

<A HREF="http://www.serverspy.net/site/serverranks/"><img src="http://www.serverspy.net/bin/srank.mpl? ... .215:27015" width="120" height="100" border="0"></A><br>

<!-- Server Rank Image | END ------------------------------->

<!-- Server Usage Stats (The Four Graphs) | START ------------------------------->

<!-- NOTE:
Use these image URL's below. You can arrange them anywhere on your site.
Most users like to present these along side their main server monitor.
-->

<br>I'm sorry, only <A HREF="http://www.serverspy.net/site/subscribe/">Exclusive Subscribers</A> have access to the Usage Stats.


<!-- Server Usage Stats | END -->
</TD></TR></TABLE>



I tried just pasting that entire thing into the HTML section of the custom bbcode and just made the bbcode: [csstats][/csstats]

It kinda worked but didn't display all of it. Just curious, but is that javascript in there what could be causing problems?

Thanks!

MercAngel
Registered User
Posts: 5
Joined: Tue Feb 08, 2005 12:46 am

Re: Am I an idiot? Posting HTML?

Post by MercAngel »

some thing like this

Reload the page to see what i mean

User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: Am I an idiot? Posting HTML?

Post by Highway of Life »

Hello SHOwned,

Well, first of all, it's improper coding practice to USE ALL CAPITALS IN YOUR HTML CODE.

For example,

Code: Select all

<TABLE align="center" cellpadding="10">
<TR><TD valign="top">

<!-- Server Monitor (The main monitor) | START ------------------------------->
<!-- NOTE:
This first segment of code is only for the server monitor itself.
If you want to include the server usage graphs, then scroll down to
the marked code.
-->

<SCRIPT LANGUAGE="JavaScript"
SRC="http://share1.serverspy.net/cgi-bin/monitor.js?mid=149014">
</SCRIPT>
<!-- SERVERSPY GAME CODE END -->



<!-- Server Rank Image | START ------------------------------->
</TD><TD align="center" valign="top">
<!-- NOTE:
Use the image URL's below. You can arrange them anywhere on your site.
Most users like to present these along side their main server monitor.
-->

<A HREF="http://www.serverspy.net/site/serverranks/"><img src="http://www.serverspy.net/bin/srank.mpl?a=71.208.155.215:27015" width="120" height="100" border="0"></A><br>

<!-- Server Rank Image | END ------------------------------->

<!-- Server Usage Stats (The Four Graphs) | START ------------------------------->

<!-- NOTE:
Use these image URL's below. You can arrange them anywhere on your site.
Most users like to present these along side their main server monitor.
-->

<br>I'm sorry, only <A HREF="http://www.serverspy.net/site/subscribe/">Exclusive Subscribers</A> have access to the Usage Stats.
</TD></TR></TABLE>  
Is going to only parse as:

Code: Select all

<table align="center" cellpadding="10">
  <tr>
    <td valign="top"><script language="JavaScript" src="http://share1.serverspy.net/cgi-bin/monitor.js?mid=149014"></script>
    </td>
    <td align="center" valign="top"><a href="http://www.serverspy.net/site/serverranks/"><img src="http://www.serverspy.net/bin/srank.mpl?a=71.208.155.215:27015" width="120" height="100" border="0"></a><br />
      <br>
      I'm sorry, only <a href="http://www.serverspy.net/site/subscribe/">Exclusive Subscribers</a> have access to the Usage Stats. </td>
  </tr>
</table>
  
Note the proper use of Capitalization.
Break tags should be self-ended to be XHTML compliant. i.e. <br /> instead of <br>

I tested your code, and it works as intended.

Although, the code should really only be:

Code: Select all

<table align="center" cellpadding="10">
  <tr>
    <td valign="top"><script language="JavaScript" src="http://share1.serverspy.net/cgi-bin/monitor.js?mid=149014"></script>
    </td>
    <td align="center" valign="top"><a href="http://www.serverspy.net/site/serverranks/"><img src="http://www.serverspy.net/bin/srank.mpl?a=71.208.155.215:27015" width="120" height="100" border="0"></a></td>
  </tr>
</table>  
Image

Yoda_IRC
Registered User
Posts: 158
Joined: Tue Mar 01, 2005 10:19 pm

Re: Am I an idiot? Posting HTML?

Post by Yoda_IRC »

Highway of Life wrote: Well, first of all, it's improper coding practice to USE ALL CAPITALS IN YOUR HTML CODE.

Didn't it used to be the other way around?
Highway of Life wrote: For example,

Code: Select all

<TABLE align="center" cellpadding="10">
<TR><TD valign="top">[SNIP]
Is going to only parse as:

Code: Select all

<table align="center" cellpadding="10">
  <tr>
    <td valign="top">[SNIP]
Note the proper use of Capitalization.

I was unaware it was compolsory for a web browser to perform that kind of conversion. As far as I was aware can't the tokenizer just ignore the case and therefore would not produce what you stated. Both uper and lower case would parse the same, with of course tokens not text being output (assuming it works similar to compiller building).
Highway of Life wrote: Break tags should be self-ended to be XHTML compliant. i.e. <br /> instead of <br>

Won't that break HTML standard? doesn't the / end the tag instantly and thus the standard says > is not part of the tag?


Personally I would avoid embedding this in phpBB post and write it as a server side script that generates an image (to get around the limit of only certian extensions can be used in an img tag use Apache mod_rewrite (if you use IIS then you are beyond all help anyway))

User avatar
pc-tutorials
Posts: 27
Joined: Mon Aug 14, 2006 6:47 am
Location: Steenbergen, The Netherlands
Contact:

Re: Am I an idiot? Posting HTML?

Post by pc-tutorials »

Yoda_IRC wrote: Won't that break HTML standard? doesn't the / end the tag instantly and thus the standard says > is not part of the tag?

No, it won't. Because HTML says most tags have an end tag, and some optionally. So you can use <br></br> if you like. There is a short syntax for this, <br />. That was already in HTML, so you aren't breaking any rule
for($i=1;$i>0;$i++){
echo "Bug detected, fix in progress";
}
----------------
Sorry for bad English, I'm not native :)

User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: Am I an idiot? Posting HTML?

Post by Highway of Life »

Right, but for valid XHTML, all tags must be closed...

Example...
<strong></strong>
<em></em>
<a></a>
<dl></dl>

And single tags must be self-ended:
<img />
<meta />
<hr />
<br />

in HTML, its not as important to either close tags, or for the use of capitalization, but since the internet is moving in the direction of XHTML/XML, it's best to start using proper coding practices, which includes closing tags and lowercase capitalization.
Image

Post Reply