Print Page | Close Window

HTML for Admins

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=11704
Printed Date: 09 April 2026 at 1:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: HTML for Admins
Posted By: sanci
Subject: HTML for Admins
Date 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-




Replies:
Posted By: wistex
Date 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.

-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: theSCIENTIST
Date 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.



Posted By: wistex
Date 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. 



-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums


Posted By: wistex
Date 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.



-------------
http://www.wistex.com" rel="nofollow - WisTex Solutions
http://www.caribbeanchoice.com/forums" rel="nofollow - CaribbeanChoice Forums



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net