Announcement

Collapse
No announcement yet.

Whats everyone's take on allowing HTML ?

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Whats everyone's take on allowing HTML ?

    Hey guys,

    So I know that inherently HTML can be a dangerous thing to have active on your site, however while I know it is a potential security risk, I would like to allow my future users to embed google documents etc, which of course only functions with the use of HTML.

    I guess my question is, do you guys allow HTML on your site ? is it worth the risk vs functionality ? Or perhaps is there a way to embed without the need to have HMTL active ? (Not that I have found thus far)

    Thanks,
    P

    #2
    Just add a custom BBCode to allow them to embed google docs. Never allow them to post HTML, ever.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      Good point, I remember looking into the Custom BB Codes, will look at where to find the applicable code to add a BB Code for Google Embeds, Would one BB Code suffice for embedding any google document ? I ask as you have various types, Docs & Sheets etc.

      Comment


        #4
        Infact, just found this : https://vbmods.rocks/forum/vbulletin...nstall-bbcodes

        However when trying to embed a google doc or sheet, nothing happens, I just get this [ gd]1bhtK-AhiXqfWK5bGJcULvEO3zMahcFgnJEsT1YvYsuc[/ gd]

        I did just add Glenns spoiler code and all worked fine as expected, so I do not believe I am doing anything incorrect.

        Comment


          #5
          What's your replacement code? Do you see it in the view-source of the page?
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


            #6
            So from here: https://vbmods.rocks/forum/vbulletin...=3880#post3880

            For the Google Doc replacement code I did have
            <div align="center"><iframe src="https://docs.google.com/document/pub?id={param}&amp;embedded=true&single=true&gid=0 &output=html&widget=true" width="95%" height="500">IFRAME Not Available. <a href="https://{option}.google.com/document/pub?id={param}">Direct Link to Google Document</a>.</iframe></div>
            For the Google Sheet Replacement code I have

            <div align="center"><iframe width="95%" height="900" frameborder="0" src="https://spreadsheets.google.com/pub?key={param}"&hl=en&single=true&gid=0&output=ht ml&widget=true'>IFRAME Not Available. <a href="https://spreadsheets.google.com/pub?key={param}"&hl=en&single=true&gid=0&output=ht ml">Direct Link to Spreadsheet.</a></iframe></div>
            Currently I have two test documents

            Google Sheet: https://docs.google.com/spreadsheets...Or4/edit#gid=0
            Google Doc: https://docs.google.com/document/d/1...rI0xOchsg/edit

            When embedding the Google Sheet, I at least get some form of activity, but this comes in the guise of the attached screen shot. With the Google Doc, as per the attached screenshot, all I get is the BB Code with the part of the Google Doc link to enable it to embed, but nothing has happened.

            Looking at the page source, there are references to both the Google Sheet and Google Doc embedding, so something is going on, but no results. Now I'm certainly no expert so I will PM you a page source code for security reasons and you may see something stupid I am doing lol.
            Attached Files

            Comment


              #7
              I got your PM and I researched for the Google Docs embed code and the format seems to look like this:
              Code:
              https://docs.google.com/document/d/e/[COLOR=#FF0000]{googleDocIdHere}[/COLOR]/pub?embedded=true
              So your replacement code should be:
              Code:
              <iframe src="https://docs.google.com/document/d/e/{param}?embedded=true"></iframe>
              And use it like:
              [gd]2PACX-1vTllzA4Xii8FAueFhMmwhYeGl4tqQNxG-pJeAHhcZLpl2dxxZKLk7MpUQFuuwLCAd2_wWAwCStmqOlS[/gd]

              Get the id between /d/e/ and /pub from the Google Docs URL you got when publishing the document to the web (File > Publish to the web > Embed).
              Helpful? Donate. Thanks!
              Buy me a coffeePayPal QR Code
              Fast VPS Host for vBulletin:
              A2 Hosting & IONOS

              Comment


                #8
                Hey Glenn,

                Thanks for that, I will give that a blast, can I assume that the Google Sheets would follow the same rule ? I will let you know how it plays out or if I need to add size parameters.

                Oh and enjoy a Coffee on me

                Cheers,
                P

                Comment


                  #9
                  Hey Glenn,

                  So a little more luck this time using the below

                  [gd]2PACX-1vTllzA4Xii8FAueFhMmwhYeGl4tqQNxG-pJeAHhcZLpl2dxxZKLk7MpUQFuuwLCAd2_wWAwCStmqOlS[/gd]

                  This sheet is 100% published, and this time I am at least getting an embedded window, but I still get an error that ''docs.google.com refused to connect''. See my screenshot attached. Tried embedding a google doc from a completely different account (Just in case) but the same result.

                  Any ideas ?
                  Attached Files

                  Comment


                    #10
                    Here isthe code for word documents which i use on one of my live sites which works well
                    Code:
                    <div align="center"><iframe src="https://docs.google.com/document/pub?id={param}&amp;embedded=true&single=true&gid=0&output=html&widget=true" width="95%" height="500">IFRAME Not Available. <a href="https://{option}.google.com/document/pub?id={param}">Direct Link to Google Document</a>.</iframe></div>
                    Instead of getting the link from the publish to web link or embed link there instead use the share link at the top of the page asshown in the pho
                    Click image for larger version  Name:	Share link.png Views:	1 Size:	1.6 KB ID:	17641
                    also this
                    Click image for larger version  Name:	share now.png Views:	1 Size:	20.1 KB ID:	17642

                    https://docs.google.com/document/d/1L1XNpFBKzOlR64nqQ1zd9gQieK56CwFCcK-aURqTO1g/edit?usp=sharing
                    highlighted in red is the code you insert between the bbcode
                    Wise men say nothing Fools never listen

                    Comment


                    • willie53
                      willie53 commented
                      Editing a comment
                      Try the code and see it yourself

                    #11
                    Hey willie53 , that works great thanks ! Though one thing I have noticed and maybe it is because I am out of touch with Google docs and embedding, but when I make changes to the documents (Which are set to publish automatically'' I am finding when refreshing my forum, these changes are not reflected. I have to un-publish the Google docs manually, and re-publish and then the changes come through. Do you experience this ?

                    Comment


                    • willie53
                      willie53 commented
                      Editing a comment
                      it usually takes between 5 and 10 minutes to update

                    #12
                    That is fair enough, thanks for letting me know.

                    Comment

                    Users Viewing This Page

                    Collapse

                    There is 1 user viewing this forum topic.

                    • Guest Guest

                    Latest Posts

                    Collapse

                    Working...
                    X
                    Searching...Please wait.
                    An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

                    Please push the back button and reload the previous window.'
                    An unexpected error was returned: 'Your submission could not be processed because the token has expired.

                    Please push the back button and reload the previous window.'
                    An internal error has occurred and the module cannot be displayed.
                    There are no results that meet this criteria.
                    Search Result for "|||"