|
Joined: Nov 2006
Posts: 190 Likes: 5
Member
|
Member
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
Former Developer
|
Former Developer
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
Member
|
Member
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
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,566 Likes: 78
|
Joined: Dec 2003
Posts: 6,566 Likes: 78 |
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
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,566 Likes: 78
|
Joined: Dec 2003
Posts: 6,566 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
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 i was bummed, but kept the code so KiXtart is one of the among 100 or so languages that it higlights now. so, just do code:kixtart and voila
|
|
|
|
Joined: Jun 2006
Posts: 16,301 Likes: 116
|
Joined: Jun 2006
Posts: 16,301 Likes: 116 |
GeSHi is nice; it is a shame that it's not an apache license though
|
|
|
|
Joined: Nov 2006
Posts: 3,095 Likes: 1
Carpal Tunnel
|
Carpal Tunnel
Joined: Nov 2006
Posts: 3,095 Likes: 1 |
so KiXtart is one of the among 100 or so languages that it higlights now. so, just do code:kixtart and voila 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
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:
|
|
|
2 members (Ruben, ahmed047),
776
guests, and
161
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|