1 2 Previous Next 11 Replies Latest reply on Mar 2, 2012 2:25 AM by ericklans

    Customize filtered media pages

      hi,

      i have a rule, whit this rule we filtered the media types but when we access pages which include this media type the give us like attached picture.

      but i wan to change it with another webpage or text

      how can i do this ?

        • 1. Re: Customize filtered media pages
          asabban

          I am not sure if you can edit this text. The video player expects a video stream to play. Instead of sending a video stream MWG blocks the responds and sends an HTML site which contains an error message. The video player (most likely flash or HTML5) needs to be smart enough to see that there is an error coming back, and present this error to the user.

           

          I assume that developers of the video player do not implement the option that instead of the expected video something else is coming back, but only present a default error message in case something is wrong. Maybe someone else has an idea, but I assume there is not much we can do about this.

           

          Best,

          Andre

          • 2. Re: Customize filtered media pages
            Troja

            Hi Hakan,

            you can use HTML Opener to locate a string and then replase it with another string. Perhaps with a JPEG.  I don´t know if any flashplayer uses the same code on any website. I tested with youtube und Firefox Firebug.

             

            youtube1.GIF

             

             

            This is the source of a video file on youtube (embedded video player).

             

            div id="watch-video-container">

            <div id="watch-video">

            <script>

            <div id="watch-player" class="flash-player" style="background: none repeat scroll 0% 0% transparent;">

            <embed id="movie_player" height="390" width="640" bgcolor="#000000" allowfullscreen="true" allowscriptaccess="always" flashvars="account_playback_token=mtsHXP2sL2bwe4aJDeE9aDdv77B8MEAxMzI4ODgzMDE4&ptk=rnickeym ouse%252Buser&enablecsi=1&iv_close_button=0&is_doubleclick_tracked=1&hl=en_US&au tohide=2&csi_page_type=watch5ad&keywords=Supermoto%2Cmotorcycle%2Cpolice%2Cchase %2Ccar%2Cextreme%2Cpolice+chase%2CCHP%2Cautomobiles%2Ccars&cr=US&host_language=e n&cust_age=1003&iv3_module=http%3A%2F%2Fs.ytimg.com%2Fyt%2Fswfbin%2Fiv3_module-v fl7x7UpH.swf&tspto=12000&fmt_list=45%2F1280x720%2F99%2F0%2F0%2C22%2F1280x720%2F9 %2F0%2F115%2C44%2F854x480%2F99...cD6.png&supersizefeatured=1&oid=pQYPR34RX_o&tsp _buffer=10&ad_channel_code_overlay=invideo_overlay_480x70_cat2%2Cafv_overlay%2CV ertical_Overlay_47%2CVertical_Overlay_397%2CVidVert47%2CVidVert397%2CVertical_47 %2CVertical_397%2Cafv_user_rnickeymouse%2Cfvwrel%2Cyt_mpvid_AAS4nLBG3wJt1RTn%2Cy t_cid_11136%2Cytexp_909519.908421.916201.901027%2Cytps_default%2Cytel_detailpage &as_launched_in_country=0&logwatch=1&dclk=True&sk=fYPa3rT-MfCax4FdwE4GVxVO6mt5cU h1R&pltype=content&video_id=fuXARb_ZrO0&loudness=-18.8899993896" src="http://s.ytimg.com/yt/swfbin/watch_as3-vflzupnQw.swf" type="application/x-shockwave-flash">

            <noembed>&lt;div class="yt-alert yt-alert-error yt-alert-player "&gt;&lt;span class="yt-alert-icon"&gt;&lt;img src="//s.ytimg.com/yt/img/pixel-vfl3z5WfW.gif" class="icon master-sprite" alt="Alert icon"&gt;&lt;/span&gt;&lt;div class="yt-alert-content"&gt; You need Adobe Flash Player to watch this video. &lt;br&gt; &lt;a href="http://get.adobe.com/flashplayer/"&gt;Download it from Adobe.&lt;/a&gt; &lt;/div&gt;&lt;/div&gt;</noembed>

            </div>

             

            If you change the bold text you can add another content to the embedded youtube (flash) player. It´s looking like this afterwards.

             

            youtube2.GIF

             

             

            @Andre: Do you know a Ruleset how to look at the bold string and replacing it?

             

             

            Best,

            Thorsten

            1 of 1 people found this helpful
            • 3. Re: Customize filtered media pages
              asabban

              Hey Thorsten,

               

              sort of. Youtube is generating the "embed" object via JavaScript on the client, so MWG does not really see it. You may look for script tags and rewrite the JavaScript, but actually you can remove the complete div tag which holds the video player. The result will look like this:

               

              Auswahl_299.png

               

              Replacing the link in the JavaScript should be possible and may look a little cleaner, but actually I think you will have to do a lot of stuff with regex replacements to navigate within the JavaScript and replace content. If you pick a suitable picture I think you can make this div replacement look much better, probably good enough for end users :-)

               

              The rules are quite simple:

               

              Auswahl_300.png

              I hope it is quite readable. Let me know if you need more.

               

              However this probably won´t solve Hakans problem. I assume he is not rewriting Youtube, but is using the Media Type filter to block Videos. This means that the Flash Player is loaded and tries to load a video, but receives the block page (which is HTML) instead.

               

              I tested again with Media Type Filter and instead of using a block page I used a redirect action to redirect to a plain JPG:

               

              Auswahl_301.png

              The result actually looks promising:

               

              Auswahl_302.png

               

              Probably a rule like

               

              If MediaType = Video AND Application = Youtube Then Redirect to JPG

               

              can do the trick.

               

              Best,

              Andre

              • 4. Re: Customize filtered media pages

                thank you very much Troja and Asabban.

                I did Asabban's example and it works.

                 

                i want to do it for facebook applications and your policy include a lot of application.

                can you share your applicaiton control rule with all sub rules ? or can you tel me how can i do it for facebook sub applications ( for example chat, upload photo or others )

                 

                thanks again.

                • 5. Re: Customize filtered media pages
                  asabban

                  Hello,

                   

                  the application control rule set is something I am currently working on/playing around with. It is probably not finished yet, but in case you want to have a look and adjust it for your own needs I am happy to share it. Do you mind sending me an email adress as a PM? I will forward the rule set and some comments to you.

                   

                  Best,

                  Andre

                  • 6. Re: Customize filtered media pages
                    asabban

                    Hello,

                     

                    I forwarded the rules to your eMail address. Please make sure you read and accept the comments I added. Comments welcome :-)

                     

                    Best,

                    Andre

                    • 7. Re: Customize filtered media pages
                      Troja

                      Hi Hakan,

                      removing content from Websites mostly depends on the structure of the page. To avoid error messages for the user you have to build different rules for different websites.

                       

                      Removing Facebook chat can be done by removing two id tags. The chat is missing and the user gets no error message. If facebook is changing something you have also to modify the ruleset.

                      The ruleset uses the application control from mwg so you don´t have to worry about urls and so on.

                       

                      Cheers,

                      Thorsten

                       

                      Nachricht geändert durch Troja on 13.02.12 10:13:33 MEZ

                       

                      Nachricht geändert durch Troja on 13.02.12 10:15:17 MEZ
                      • 8. Re: Customize filtered media pages

                        Hi Troja,

                        firstly thanks for your help and sharing

                        i tried it but not working

                        lets generate a new  discussion with new title so we can share this problem with other people may be someone did it.

                        new  discussion link for facebook applicaitons
                        https://community.mcafee.com/thread/43026

                         

                         

                        thanks

                        best regards.

                        • 9. Re: Customize filtered media pages
                          ericklans

                          Hello!

                           

                          I'm looking for an information about Application control in WebGateway.

                          But in my MWG version isn't "Application Control"- template in Library of Rule sets.

                           

                          Please, send me application control rule.

                          1 2 Previous Next