We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 5393
    • 63 Posts
    Hi,

    in my website there is a flash game in the member page and I would like to control the access to it. however, I try to control the access right by putting the first page of the game, a HTML file, into static resources and set it access right. however, during testing, I find that the website could load the HTML page but the swf file embedded inside is missing. why is that?

    Thanks
    Ernest

      • 28042 ☆ A M B ☆
      • 24,524 Posts
      The path to the swf file is not correct. You will most likely need to use an absolute path to load it. Usually in MODX a relative path is "relative" to the main index.php file, but in this case it may be relative to the HTML file that the static resource is pointing to. You may have to do some trial-and-error to get the correct path.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 5393
        • 63 Posts
        Quote from: sottwell at Apr 29, 2014, 07:15 AM
        The path to the swf file is not correct. You will most likely need to use an absolute path to load it. Usually in MODX a relative path is "relative" to the main index.php file, but in this case it may be relative to the HTML file that the static resource is pointing to. You may have to do some trial-and-error to get the correct path.

        is it possible to set the access right to the whole folder which has swf, html and xml files in modx?

          • 5393
          • 63 Posts
          i ask the previous question because inside my folder there are many swfs and xml files all linked together somehow. If I need to change the file path from relative to absolute, I need to do a lot of work to update the whole folder. what is the quick way to protect this directory in a quick and efficient way?