Fork me on GitHub

Administration specific HTML permissions.  Bottom

  • I was looking around and I found that when posting a news topic, you can't use tags you don't allow your regular users to use. For example, I wanted to put a flash movie in my news article, so I used the embed code. It displayed as plain text.

    I looked for a way to enable the use of the embed tag, but I discovered that by enabling it for me, I enabled it for everyone, even anonymous users!

    My feature suggestion is to allow certain HTML tags to be used only by someone with administrative privilages. It would be simple for someone who knows how it works to create it so that you can choose "Allow tag for Administration," probably more difficult to add an option that would allow certain groups but not others the permissions.

    Thanks for your time.
  • It would not make much sense to allow certain tags for the admin only. In this case you would be able to see the flash movie while others will still see the HTML code as text.

    --
    "He is not dangerous, he just wants to play...."
  • aklix,
    What you want to do sounds reasonable, but the problem is, the filtering of the tags is done on display, not on the input, so it isn't really possible. It wouldn't be prudent to switch it to filtering on store either, because that can cause problems if you change a setting.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • But what if you switch your filter based on poster permissions, like have a switch using pnSecSecur (I forget what it's called) making it so that if secsecure is true of ADMIN (i'm really bad at remembering names) then it doesn't filter anything, but if it's false then it filters everything.

    Example:

    Code

    if (!pnSecAuthAction(0,'I have no idea','No clue',ADMIN_ACCESS){
         // Parsing Code Here
    }

    Actually now that I think of it, if I go through and find the right files I could mod it myself... maybe not I don't know. Would I mode it in a Utility Module or in the News module itself?

    Thanks for the help guys!

    I think I found what I need to do. I opened up funcs.php of the News module (News Module doesn't have an "ethical" setup as far as I can tell) and found genArticleInfo($row). On line 201, I just kinda removed pnVarPrepHTMLDisplay(*) (I kept the censor function).

    Please tell me now if I just opened a huge hole in my site. As far as I can tell, all that does is not clear the tags in a news article, and I'm only letting Administrators (which are very trusted people) post news articles. It works, even better because now they don't have to listen to the obnoxious background music of the flash movie when posting a new comment!

This list is based on users active over the last 60 minutes.