Previous Thread
Next Thread
Print Thread
Hop To
#219887 12/05/2008 6:49 AM
Joined: Nov 2006
Posts: 190
Likes: 5
J
Member
Member
J Offline
Joined: Nov 2006
Posts: 190
Likes: 5
Is there any easy way to use html in posts?

I have some users who wish to use tables to present information and, for the first time, allow them to use html. Administrators can select in the drop down under the Post box (text entry box) "Using UBBCode", "Using HTML" and "Using HTML and UBBCode". Regular users with this permission see to the left under the words "Post Options" "HTML is enabled. UBBCode is enabled."

But when they copy html from their html editor (like FrontPage or whatever) they get a lot of white space before any table (each hard return in the html code seems to be interpreted as a hard return and the result looks awful).

Is there a guide to using html as part of posts?

Thanks!

Joined: Jun 2006
Posts: 9,242
Likes: 1
R
Former Developer
Former Developer
R Offline
Joined: Jun 2006
Posts: 9,242
Likes: 1
Two things. Copying and pasting from an editor can create a bit of an issue since all carriage returns get turned into <br /> tags. Those tags can end up between table elements that they shouldn't be causing all sorts of layout issues. The only way to get a true copy/paste is to strip out all of the carriage returns except for the ones that are actually needed.

Secondly, it is a pretty big security risk. Most of your users probably aren't going to be an issue, but you'll get the oddball that will exploit it, add javascript to steal cookies, etc.

Joined: Nov 2006
Posts: 190
Likes: 5
J
Member
Member
J Offline
Joined: Nov 2006
Posts: 190
Likes: 5
Thanks.

Stripping out all the carriage returns is what I do now.

Regarding the security, yes that is wise. I am limiting html access to a specific group of known posters that are sort of topic facilitators (and less then 10 total).

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i just expand the custom tags, so that no one every posts in HTML but me..

tags are enhanced to be permissioned as well as to be category - sub-category, so the drop down menu isn't ridiculously large..

Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
Originally Posted by Sirdude
i just expand the custom tags, so that no one every posts in HTML but me..
I don't get what you mean.
How do you expand them?
Control panel option?(I can't find it)
Hack?


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
content tools -- custom tag editor

'expand' == create more

Joined: Dec 2003
Posts: 6,562
Likes: 78
Joined: Dec 2003
Posts: 6,562
Likes: 78
DUH!
I keep forgetting about that Option.
But to be honest I am not sure how to really use it. No documentation I can see here.


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
We actually wrote a tool that does UBB conversion for our site to post "script code" in color syntax style. Not really applicable to most other sites though as it is designed for the KiXtart scripting language and not just general postings. It also converts the special html characters that UBB doesn't like to their friendly posting formats.

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
yah, ntdoc -- i had that all coded up and ready to go for 7.3.1, but found out that the library (GeSHi) being used for the syntax hilite, didn't have the right license for Rick to be able to include it in ubbt standard frown

i was bummed, but kept the code laugh

so KiXtart is one of the among 100 or so languages that it higlights now. so, just do code:kixtart and voila wink

SD #220098 12/10/2008 12:39 AM
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
GeSHi is nice; it is a shame that it's not an apache license though


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Nov 2006
Posts: 3,095
Likes: 1
Carpal Tunnel
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095
Likes: 1
Originally Posted by Sirdude
so KiXtart is one of the among 100 or so languages that it higlights now. so, just do code:kixtart and voila wink

LOL - Well a bit too busy with many other projects to play with it right now, but sounds neat. Is this only on your site or special coding for UBB that you've done?

Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
it was ready to go as a part of 7.3.1 -- official.. but the license got in the way :sad:


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Is UBB.threads still going?
by Aaron101 - 04/01/2022 8:18 AM
Who's Online Now
1 members (Nightcrawler), 445 guests, and 142 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)