TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 196,030
  • Total Topics: 21,334
  • Online today: 264
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 112
  • Total: 112

HTML blocks?

Started by kmccann, June 05, 2007, 03:59:51 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kmccann

Hi,

I wanted to create a block with basic HTML, so I chose the HTML + BBC option, assuming it would support HTML. However, the HTML is displayed, not rendered. Why is that? I read this posting:

http://www.tinyportal.net/index.php?topic=16013.0

So is it safe to assume that I'll always have to create php blocks and wrap my HTML content in an echo? If so, why is the "HTML + BBC" block type named like it is?

Maybe I'm just missing something, like how to enable HTML in blocks?

Thanks,
Kevin

pvcblue

Hi can you post the code you put in the block?? It may have the wrong tags.

kmccann

It's very basic HTML. See:

http://smfsite.in2pool.com/index.php

Look at the top block on the right. Note that the HTML in the block has no empty lines, but it is displayed with empty lines between each line of content. Doing a View Source, I see that

- open and closing HTML tags are converted to lt; and rt;
- new lines (or CRs) are converted to two BR tags.

Bizarre.

The same problem exists with the Google Ads block (second one down on the right hand side).

- Kevin

pvcblue

that still isnt showing the original code you used, I need to see that to try and duplicate the effect or see if you have something wrong in the code.

kmccann

Well, it's basically what you see in the blocks, but no blank lines. I'll put it in this message below, although when doing a preview of my message teh B tag is rendered (and therefore makes "Here is soem basic HTML" bold:



Here is some basic HTML
<p>
<ul>
<li> Does it work? </li>
<li> If not, why not? </li>
</ul>



Maybe you can look at the source.

Thanks,
Kevin

Reality12

try making it a script block.

IchBin

If you're using the editor to put your html in. That is, if you're actually typing out the html make sure you viewing the source when using the editor and not the editor wysiwig. I just put that code in a bbc/html block and it worked fine.

Other than that try a script block.

--edit--
Alex beat me to it. :)

kmccann

#7
Alex:

That was basically my initial question ... does the HTML + BBC block type actually support HTML.

BTW, I put the exact code in a text file here:

http://smfsite.in2pool.com/htmlcode.txt


IchBin:

Are you saying I should just do a View Source in the editor, then paste in my code? I'll try that.


Thanks,
Kevin

IchBin

As I said, I just put that exact code you posted above in a bbc/html block and it works fine.

kmccann

Gotcha. I turned on View Source nad pasted the content. It's now rendering. I still have the problem of having new lines in the code transformed into double BR tags. I guess I'll have to avoid having them in the code.

Thanks for your help.

- Kevin

This website is proudly hosted on Crocweb Cloud Website Hosting.