UBB.Dev
Posted By: SG_dup1 Line Breaks - 08/17/2004 9:23 AM
I create HTML posts using a web design package first, then copy the code and transfer over to a post. The main trouble I have is, once in the preview, Infopop treats carriage returns as line breaks, and the post is thrown everywhere in a very long line downwards. Is there any way to stop this happening without manually removing the carriage returns?
Posted By: Twisty Re: Line Breaks - 08/17/2004 11:05 AM
Could you provide a short example?

Do you mean that the posts being copied contain <br>'s all over the place?
Posted By: SG_dup1 Re: Line Breaks - 08/17/2004 1:38 PM
It's mainly in table forms, but I cannot use HTML here, so can't provide an example. A simple examle would be something like this:

[]<div align="center">
<table width="35%" border="0">
<tr>
<td bgcolor="#0000FF"><div align="center"><font size="+2"><strong><font color="#FFFF00">FAPL
ROUND 1</font></strong></font><font color="#FFFF00"><br>
<strong>14th August 2004</strong></font></div></td>
</tr>
</table>[/]

This would show up as a post, line-by-line. The above example does not show the spaces before the lines though. However, to stop that happening, I have to post it like this:

[]<div align="center"><table width="35%" border="0"><tr><td bgcolor="#0000FF"><div align="center"><font size="+2"><strong><font color="#FFFF00">FAPL ROUND 1</font></strong></font><font color="#FFFF00"><br><strong>14th August 2004</strong></font></div></td></tr></table>[/]
Posted By: Anno Re: Line Breaks - 08/17/2004 3:56 PM
And what if you set the post type to HTML only?
Posted By: Twisty Re: Line Breaks - 08/17/2004 3:58 PM
Ah, ok I see what you're referring to now. I think we can take care of it like so:


[deleted]
Posted By: Twisty Re: Line Breaks - 08/17/2004 3:59 PM
[]Anno said:
And what if you set the post type to HTML only? [/]

Wouldn't matter.
Posted By: Anno Re: Line Breaks - 08/17/2004 4:28 PM
[]Twisty said:
[]Anno said:
And what if you set the post type to HTML only? [/]

Wouldn't matter. [/]

Well, it matters on our board. It seems to work as supposed then.
Posted By: SG_dup1 Re: Line Breaks - 08/17/2004 4:48 PM
Hmm, that still didn't solve the problem. Attached is one piece of code I use for running a competition. If it's posted using HTML as it is, then there's huge gaps of nothingness, which is why I have to join everything together. I have numerous similar posts to make each week, so if this problem can be solved, it would definitely make my life much easier

Attached File
118692-TestHTML.txt  (31 downloads)
Posted By: Twisty Re: Line Breaks - 08/17/2004 5:46 PM
I don't think you understand what he's seeking. It isn't to make the HTML code activate.
Posted By: SG_dup1 Re: Line Breaks - 08/17/2004 6:00 PM
Yeah, the code works fine, but test it out for yourself. It shows up as a mile long post with complete screens of nothing inbetween.
Posted By: Twisty Re: Line Breaks - 08/17/2004 6:16 PM
Oookay, that's more info to work with and helps quite a bit in determining what you need. Try this instead...


[deleted again]

Posted By: Twisty Re: Line Breaks - 08/17/2004 6:56 PM
Nope that's not gonna work either because then line breaks won't be inserted for non-HTML text.

This is gonna be verrry tricky, if not downright impossible.
Posted By: ericgtr Re: Line Breaks - 08/17/2004 7:11 PM
Another option is to use the Generic Threads Page mod (do a search for 'generic' in the modification index to find your version) this is much easier to format but won't be as easy to update regularly.
Posted By: Twisty Re: Line Breaks - 08/17/2004 11:00 PM
Alright, because I refuse to admit defeat I did the next best thing which will still save you time & effort.

It's a li'l script I whipped up that will convert your HTML code so that you can paste it into the post and have it appear correct.

Just upload it to your threads folder and bookmark it, or better yet, make it a javascript popup and place the link in your addpost template so it'll be nice and handy.

Attached File
118702-strip.zip  (6 downloads)
Posted By: SG_dup1 Re: Line Breaks - 08/18/2004 9:46 AM
That is absolutely brilliant, thanks very much. I now wonder what I'll do with the spare 10 hours or so every week that I now have

Cheers!
Posted By: Twisty Re: Line Breaks - 08/18/2004 7:06 PM
I updated the script to v1.0 to save you even more time

This version allows one to copy the processed HTML to the clipboard via javascript, thus it's really fast and hassle-free.

Here's a demo...

http://www.mameworld.info/ubbthreads/strip.php

(script attached)

Attached File
118721-strip.zip  (4 downloads)
Posted By: ericgtr Re: Line Breaks - 08/18/2004 7:13 PM
This looks handy, Twisty. I saved it for future use, thanks!
Posted By: Twisty Re: Line Breaks - 08/18/2004 11:19 PM
You're welcome eric :]
Posted By: Ian_W Re: Line Breaks - 08/19/2004 4:58 PM
What I do if I wish to post html into a thread is to - copy the code into FrontPage 2003 - the click on tidy html - to remove everything (white space included) - then all the test is in one very long line.

I then enter this into the message, and the html is displayed just fine (watch out for &nbsp instead of space though for blank cells)
Posted By: Twisty Re: Line Breaks - 08/19/2004 5:34 PM
[]Ian_W said:
(watch out for &nbsp instead of space though for blank cells) [/]

Yeah, I change the &nbsp's to <br />'s in my script for that very reason.
© UBB.Developers