Hello Connie,
Output MessagesI added the $debug variable back into the code. Download v1.2 of the CMSMS Shop Skin Helper from my website, and set the debug variable to true (this is found in the source code around line 56). This will output a success or fail messages to the screen on each step.
http://www.studio-owens.com/code/cmsms-shop-skin-helper.htmAutomatic Script RunningHow does the script react to changes in the menue (in example new pages are added or deleted), I understand that the script must run to write these into the 3 files
The script doesn't react to changes in the menu, as it is very generic and can be used for any PHP application and not just CMSMS. That being said, you could integrate it into core so each time the menu is updated, the script fires and creates the new skins. However, this change would need to be made each time you updated the code, and it would negate your ability to receive technical support on the core. Therefore, it is easiest to use one of the three following methods to update the menus.
Method One - Setup a Cron Job1) run the script using a cron-job
1) A Cron Job will work fine. Since the Cron Job runs on a set schedule there will be a delay between when the pages are updated and the script fires.
Setting the debug variable to true would be great for running this script as a cron, as it would then send you the success or fail output messages when it runs.
Method Two - Include the File in the Site's Home Page2) include the script in the application (in my case it is a database-related script which outputs some text) and invoke it everytime the script is called?
2) timeToLive
You asked about this on my site, and I personally use this method for some of my clients. The timeToLive variable, and comments on its use, are found directly in the source code.
Open the file: cmsms_shop_skin_helper.php file and look around line 48:
/* timeToLive can be useed for automated updating of the skin files; not used in the example
install instructions; if you include this file at the top of your eCommerece home page then
timeToLive will cause the skin files to be re-generated every # of seconds; set timeToLive to a low
time if doing many CMSMS template changes; seconds to keep the skin files for;
600 = 10 minutes; 43200 = 12 hours */
$timeToLive = 10;
Set this variable higher to keep the cached skin files longer. The reason to cache the skins is a reduced load time. I had an old method (the old method can be found on my site's blog) that didn't cache the skins from CMSMS and it took way to much time to process.
After you set the timeToLive variable in the source code, include the skin helper file at the top of your site's home page, or in the PHP Application (for example, I typically choose the main page of osCommerce). Your PHP include would look something like this:
<?php include('cmsms_shop_skin_helper.php'); ?>
Make sure you set the debug variable to false if you are going to use the timeToLive feature. You wouldn't want messages output to the visitor each time the script fires.
Method Three - Manually Call the FileThis by far the easiest method. Simply call the file after you make all your page changes. I sometimes create a shortcut in CMSMS for the client to use.
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Site_Admin/Manage_ShortcutsSecured DirectoryHum... haven't run into this problem myself. I will ask some of the other developers that are using this script if they have run into this problem.