Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 26
  1. #1
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169

    Help with protecting resource doc and image files

    Good Morning!

    I am working on a project that has over 250 recipes with accompanying graphics. I am using listboxes and web object for functionality. The files are primarily html and jpgs. What I need to figure out is a way to protect the images and html pages when a user installs the program.

    Currently the first listbox is populated with folder names. In that folder are recipes that will populate the second listbox when selected. When a recipe is selected in the second listbox the web object then loads the html file. Below the web object I have tabs to load the graphics for the recipe in the web object.

    The application does what it is intended to do. However, I'm now ready to build the application and realize that all the htmls and images files are exposed on the user's hard drive.

    What I am asking of you is a way for me to protect the files so they aren't all available for the user to use outside of the application.

    I tried zipping the folders and having them unzip when the application or the page loads. But, the size of the files - particularly the image files are quite large and there's a significant delay while the files unzip - too much so for it to be a good solution. I think there is a way to only unzip the file that you need when you need it but I'm confused on how to accomplish it. Can you help me either figure out a faster way to use the zip plugin or even other solutions such as encrypting or something I don't even know? ;D

    I'm looking for suggestions on methods to protect the html and image files used by the application. I'm attaching a page with one category - with one recipe - with the label and envelope graphic to demonstrate the functionality. It's a good example project for using listboxes with a web object also.

    Please give me some guidance! Thank you for your help.

    Sue
    Attached Files

  2. #2
    Join Date
    Dec 2003
    Posts
    891
    It is nearly impossible to protect your project from a knowledgeable and determined person.
    However, I would think that your target user probably would not be in that catagory.
    I would just put the .html and image files into the Audio folder, then when building (I'm assuming you are building to a folder), just rename the resource folder to something else other than AutoPlay. On build, any file called in the project script will be zipped and renamed to *.dat (but not from the Docs folder, hence moving the files to Audio).
    They are still easily viewed IF the user knows this, but most will not and probably will not go out of their way to find out.

  3. #3
    Join Date
    Oct 2005
    Location
    American Dubai
    Posts
    629
    For better protection (like a project i'm building now for users to login/register at my International Services directory), I'd encrypt all my docs files, then password-zip them. Where they will be decrypted and unzipped in a temporary folder at app. runtime. This still though can be revealed.. as robo mentioned, you can never stop the users which are experienced, and determined, but you can only make it harder for them.

  4. #4
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169
    Thank you both for you suggestions! I'll be trying them today.

    Sue

  5. #5
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169
    Hi again!

    I did a test and moved my document folders to the audio folder and built the application with the rename resource files. But the list box does not work as intended ;(

    Is it possible to rename the renamed files BACK to the original folder and file names at run time and then rename them back to the build name when closing the application so the folders and files load correctly in the listbox?

    I know the zipping and unzipping works okay - except the file is so large that there is an unacceptable delay when the files are unzipping as the application opens.

    Any other suggestions or something I'm not thinking of?

    Thanks for any help or suggestions!!

  6. #6
    Join Date
    Dec 2003
    Posts
    891
    Assuming you replaced the AutoPlay\\Docs path to AutoPlay\\Audio in your fill list box function, then another suggestion is to use the global variable _SourceFolder.. for your paths to any file you have moved to the Audio folder.
    EX:
    old
    "AutoPlay\\Audio\\myfile.html"
    new
    _SourceFolder.. "\\AutoPlay\\Audio\\myfile.html

    if this doesn't work, post back with the filepaths you are using.
    Last edited by Roboblue; 04-13-2006 at 11:31 AM.

  7. #7
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169
    Thanks,

    I think one issue is because I'm using variables instead of file names.

    For example, on the page properties I'm using:

    DirPaths = Folder.Find("AutoPlay\\Audio\\Modules\\Recipes", "*", false, nil);
    if DirPaths then
    for i, v in DirPaths do
    ListBox.AddItem("listbox_Chapters",String.Replace( v, "AutoPlay\\Audio\\Modules\\Recipes\\", "", false), v);
    end
    end

    to load the directory names into listbox 1

    I'm uploading the version with the files in the audio folder. You can open and preview and it works fine. But, if I build and rename resource files and then launch the exe it doesn't populate the list box.

    Thanks for your assistance!!!!
    Attached Files

  8. #8
    Join Date
    Dec 2003
    Posts
    891
    I can't get it to work either. May have to ask the IR guys what's up.

    Try this in the Page On Show event, it'll be generic and not require you to fill in string.replace.

    DirPaths = Folder.Find("AutoPlay\\Audio\\Modules\\recipes", "*", true, nil);
    if DirPaths then
    for i, v in DirPaths do
    sPath = DirPaths[1]
    tPath = String.SplitPath(sPath);
    ListBox.AddItem("listbox_Chapters", tPath.Filename, DirPaths[1]);
    end
    end

  9. #9
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169
    I submitted a support ticket this morning. I'll wait to hear what they have to say. Appreciate your help!!

  10. #10
    Join Date
    Jul 2004
    Location
    NL
    Posts
    19

    New Change Mouse Cursor idea

    sorry my post was placed in this thread but it had to be a new thread.
    I will try again.
    Last edited by Stan Hamers; 04-13-2006 at 01:04 PM.

  11. #11
    Join Date
    Dec 2003
    Posts
    891
    sue
    By the way, remember that they can always right click on a webobject, or select text to save the content.
    Here is a sample of a workaround for that. You have to always have a verticle scrollbar for it to be effective, but you can add that to your html page. Here is some info

    You can add some simple styles to your site's style sheet to force a vertical scrollbar to always show and thus get rid of the page shift. The most obvious solution is to add an overflow: scroll rule to the html element. However, this rule adds a horizontal scrollbar as well, which web users definitely don't like. Here's an easy and valid way to force only the vertical scrollbar to appear, no matter what size the viewport is:

    html { min-height: 100%; margin-bottom: 1px; }

    This adds a tiny amount of vertical scroll — one pixel, to be exact — so users will not think they are missing any content that they need to scroll down to.

  12. #12
    Join Date
    Dec 2003
    Posts
    891
    Oh, by the way, the helper code I posted earlier is bad. Here is some good code

    DirPaths = Folder.Find(_SourceFolder.. "\\AutoPlay\\Audio\\Modules\\recipes", "*", false, nil);
    if DirPaths then
    for i, v in DirPaths do
    tPath = String.SplitPath(DirPaths[i]);
    ListBox.AddItem("listbox_Chapters", tPath.Filename, DirPaths[i]);
    end
    end

  13. #13
    Join Date
    Oct 2005
    Location
    American Dubai
    Posts
    629
    Quote Originally Posted by Roboblue
    sue
    By the way, remember that they can always right click on a webobject, or select text to save the content.
    Here is a sample of a workaround for that. You have to always have a verticle scrollbar for it to be effective, but you can add that to your html page. Here is some info

    You can add some simple styles to your site's style sheet to force a vertical scrollbar to always show and thus get rid of the page shift. The most obvious solution is to add an overflow: scroll rule to the html element. However, this rule adds a horizontal scrollbar as well, which web users definitely don't like. Here's an easy and valid way to force only the vertical scrollbar to appear, no matter what size the viewport is:

    html { min-height: 100%; margin-bottom: 1px; }

    This adds a tiny amount of vertical scroll — one pixel, to be exact — so users will not think they are missing any content that they need to scroll down to.
    I'd avoid this workaround, since users cannot fill forms, or follow links. This method is good when viewing a 'thank-you' page, 'main page', or so.

  14. #14
    Join Date
    Dec 2003
    Posts
    891
    That's true, but the example that it was created for was a recipe app that she didn't want anyone to take her text or images from the page. Could be used for an EBook with a page turn button or slider.
    For a browser, no. But it has it's uses.

  15. #15
    Join Date
    Mar 2004
    Location
    Michigan
    Posts
    169
    Thanks!
    Yup...you're correct this will work more as an ebook than a browser.

    I'm thinking of trying to do this a little differently since the renaming resouce files doesn't work. But, I'm still missing a piece or where to do a step....

    My original thought was to add all the recipes and images into a passworded zip file and unzip it when the app opened and rezip it when it closed. But, the delay was too long because of the size of the zipped file.

    My newest approach is to zip up the recipes and images within a folder at a time. For instance, there would be folders like Beverages, Appetizers, etc. then inside those folders the recipes and images for the category will each be in a passworded zipped file.

    When the user selects the folder from listbox 1 it would unzip the file in that folder and display the files in listbox 2. That works fine so far.

    But, I don't know how or when would be the best time to rezip them.

    Is there a function that would rezip the files when a new folder is selected?
    1. User visits the page - clicks on beverages - passworded zip in the beverages folder is unzipped into that folder - files are displayed in listbox 2 - that's working fine in my test.
    2. User then selects a second category (appetizers) - could it then zip up the files in the beverages folder and unzip the appetizers zip file? How and where would I do that at? I presume it should work in the On Select tab but I only want it to occur after the focus goes from a selected folder to a different folder - I think - or is there a better way?
    3. Would it be better to do when the page closes? If so, how would I recurse through the folders to rezip the files and delete the unzipped files? If there are 40 folders with many files in each would that cause a long lag in moving to a new page?

    For a rather simple application I sure have had the opportunity to learn a lot!! Thanks for all the hand holding!

    Sue

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts