Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - HTML for Admins
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

HTML for Admins

 Post Reply Post Reply
Author
sanci View Drop Down
Newbie
Newbie


Joined: 05 September 2004
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote sanci Quote  Post ReplyReply Direct Link To This Post Topic: HTML for Admins
    Posted: 05 September 2004 at 10:52pm

The security risks that come with allowing the general public to use full blown HTML tags are evident "but" why not allow Administrators? Or is this already doable?

-sanci-

Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 13 September 2004 at 5:40pm
I agree.  I need that feature myself.  I am hoping to not have to write a seperate interface that bypasses the html stripping code and allow the admin to edit the html directly.  It would be so much easier if the Admin was simply allowed to edit the html, while denying all others.  The admin should be exempt form the normal html stripping.
Back to Top
theSCIENTIST View Drop Down
Senior Member
Senior Member


Joined: 31 July 2003
Location: United Kingdom
Status: Offline
Points: 440
Post Options Post Options   Thanks (0) Thanks(0)   Quote theSCIENTIST Quote  Post ReplyReply Direct Link To This Post Posted: 14 September 2004 at 11:38am

You can do most basic formating with forum codes that are then parsed to HTML, however not all HTML is supported, but you could use the RTE HTML mode for that I guess, or create/alter the message form with a condition check for admin and allow edit/update of HTML.

I will fidle with it a bit to see what can be done.

Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2004 at 12:14am

I tried the RTE html mode before but for some reason it converted all the brackets to > and < instead of preserving the html, so I stopped fiddling with it.  I'm not sure what I was doing wrong, but the RTE html mode didn't work for me or at least it didn't work as expected.

I need to edit the html directly to override the RTE's default handling of certain things for certain posts.  For example:

  • Text does not wrap around images* (when using the Image Upload botton).
  • There is no way to remove the font size=x tags once they are embedded into the post when using the RTE.  This means that it is impossible to revert back to the default font size in the CSS if it doesn't happen to be exactly the same as one of the size=x sizes.
  • The Admin can't put any html code that is prohibited by the forum software, but may be useful to insert.

I've been looking through the code to see if I can find a place (or places) that I could insert an IF THEN statement that turns off HTML stripping for Admins, but the code looks too complicated for such a simple manuever.  But I don't fully understand how the RTE is implemented, so I may be missing something really simple.

*Edit: I forgot to mention that it only does that when using the Insert Image via Upload button, not the Insert Image using a URL button.  The Insert Image via URL button allows you to select an alignment that will wrap the text, which appears to be missing from the Image Upload dialog box. 



Edited by wistex
Back to Top
wistex View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 30 August 2003
Location: United States
Status: Offline
Points: 877
Post Options Post Options   Thanks (0) Thanks(0)   Quote wistex Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2004 at 12:43am

Okay, I think I found a workaround that should work for most things, although, as the SCIENTIST said, you can't do all HTML codes.

In \includes\RTE_setup.asp change

Const blnHTMLView = false

to

Const blnHTMLView = true

and then in \includes\RTE_toolbar_2.asp change

If blnHTMLView Then Response.Write(vbCrLf & "      <img src=""" & strImagePath & "post_button_html.gif"" align=""absmiddle"" border=""0"" title=""" & strTxtToggleHTMLView & """ onClick=""HTMLview()"" style=""cursor: pointer;"">")

to

'********** MOD ***********
IF blnAdmin THEN
 If blnHTMLView Then Response.Write(vbCrLf & "      <img src=""" & strImagePath & "post_button_html.gif"" align=""absmiddle"" border=""0"" title=""" & strTxtToggleHTMLView & """ onClick=""HTMLview()"" style=""cursor: pointer;"">")
END IF
'********** MOD ***********

This will make it so that only the Admin can use the HTML View.

Note: DO NOT SAVE THE POST WHEN VIEWING IN HTML!!!

Make sure you switch back to WYSIWYG mode before you save it.  Otherwise it will convert your > and < to &gt; and &lt; and you will display code instead of the end result.  That was why I was having problems before.  I didn't know that.  Although, I guess if you WANT to post the code as code, it is a simple way to do so.

I'm glad I figured this out.  I was banging my head against the wall earlier trying to figure out how to fix the problems I was having.

Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.