3 Replies Latest reply on May 2, 2013 8:54 PM by digitalemu

    Bad Word Checking in Kiosk GO solution

    digitalemu

      Title

      Bad Word Checking in Kiosk GO solution

      Post

           Hi guys. 
           I'm a little stumped here and thought I might jump on the forums for a little help. 

           I am creating a Kiosk solution for a client that will be used only on GO for iPad which will be locked to the app. 

           My issue is that the clients workers need access to the web, but it needs to be policed. 


           I have completed the system that begins the checking process and ends it... however, the part of the script that "checks" the URL is a simple

           If(PatternCount(iPad::URL;"BADWORD1") ≥ 1; 1;
           If(PatternCount(iPad::URL;"BADWORD2") ≥ 1; 1;  etc, etc... type system. 

           Which, as you can see, is not a long term solution. 

           What I would like to do, is create a system that will "check" the URL (or html content) of the page being visited against a list of "bad words" generated by the client themself. 

           And this is where I am stuck. 
           How do I have a system that checks PART of a URL against an entire list... 
           Any suggestions would be awesome guys... thanks. 

        • 1. Re: Bad Word Checking in Kiosk GO solution
          philmodjunk

               An interesting problem...

               Two approaches come to mind:

               In a script:

               Set Variable [$URL ; value: iPad::URL ]
               Set Variable [$BadWordList ; value: List ( BadWordTable::Word ) ]
               Loop
                  Set Variable [$K ; value: $K + 1 ]
                  Exit Loop if [ $K > ValueCount ( $BadWordList ) ]
                  Set Variable [$Flag ; value: $Flag + PatternCount ( $URL ; GetValue ( $BadWordList ; $K ) ]
               End Loop
               IF [ $Flag // You have a URL that contains a word on the list ]

               This step up allows you to build a user updateable list of forbidden words in the BadWordTable and you can link it to the table on which your layout is based by the X operator so that list returns a list of all words listed in that table.

          • 2. Re: Bad Word Checking in Kiosk GO solution
            schamblee

                  I think this is a good idea. I created a sample app using PhilModJunk script above.

            https://www.sugarsync.com/pf/D9559058_790_084585343

            • 3. Re: Bad Word Checking in Kiosk GO solution
              digitalemu

                   That's just straight up fantastic guys. What a perfect solution. 
                   I knew the answer was in a loop, but having the script work its way down the list without needing to go to another layout and search... that's just awesome. 

                   Thankyou both heaps!