Previous Thread
Next Thread
Print Thread
Rate Thread
#278244 08/17/2004 2:23 AM
Joined: May 2004
Posts: 43
User
User
Offline
Joined: May 2004
Posts: 43
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?

Sponsored Links
#278245 08/17/2004 4:05 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Could you provide a short example?

Do you mean that the posts being copied contain <br>'s all over the place?

smoknz28 #278246 08/17/2004 6:38 AM
Joined: May 2004
Posts: 43
User
User
Offline
Joined: May 2004
Posts: 43
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>[/]

#278247 08/17/2004 8:56 AM
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
And what if you set the post type to HTML only?

#278248 08/17/2004 8:58 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Ah, ok I see what you're referring to now. I think we can take care of it like so:


[deleted]

Last edited by Twisty; 08/17/2004 10:44 AM.
Sponsored Links
domain123 #278249 08/17/2004 8:59 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[]Anno said:
And what if you set the post type to HTML only? [/]

Wouldn't matter.

smoknz28 #278250 08/17/2004 9:28 AM
Joined: May 2001
Posts: 550
Code Monkey
Code Monkey
Offline
Joined: May 2001
Posts: 550
[]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.

smoknz28 #278251 08/17/2004 9:48 AM
Joined: May 2004
Posts: 43
User
User
Offline
Joined: May 2004
Posts: 43
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
Attachments
118692-TestHTML.txt (0 Bytes, 31 downloads)

domain123 #278252 08/17/2004 10:46 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
I don't think you understand what he's seeking. It isn't to make the HTML code activate.

smoknz28 #278253 08/17/2004 11:00 AM
Joined: May 2004
Posts: 43
User
User
Offline
Joined: May 2004
Posts: 43
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.

Sponsored Links
#278254 08/17/2004 11:16 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
Oookay, that's more info to work with and helps quite a bit in determining what you need. Try this instead...


[deleted again]


#278255 08/17/2004 11:56 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
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.

smoknz28 #278256 08/17/2004 12:11 PM
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
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.

#278257 08/17/2004 4:00 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
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.
Attachments
118702-strip.zip (0 Bytes, 6 downloads)

smoknz28 #278258 08/18/2004 2:46 AM
Joined: May 2004
Posts: 43
User
User
Offline
Joined: May 2004
Posts: 43
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!

#278259 08/18/2004 12:06 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
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)
Attachments
118721-strip.zip (0 Bytes, 4 downloads)

smoknz28 #278260 08/18/2004 12:13 PM
Joined: May 2003
Posts: 1,068
Junior Member
Junior Member
Offline
Joined: May 2003
Posts: 1,068
This looks handy, Twisty. I saved it for future use, thanks!

BlarC #278261 08/18/2004 4:19 PM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
You're welcome eric :]

smoknz28 #278262 08/19/2004 9:58 AM
Joined: Feb 2002
Posts: 2,286
Veteran
Veteran
Joined: Feb 2002
Posts: 2,286
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)


Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)
Gorlum #278263 08/19/2004 10:34 AM
Joined: Sep 2003
Posts: 488
Code Monkey
Code Monkey
Joined: Sep 2003
Posts: 488
[]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.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)