The SetSkin function abandons trying to load a skin after it finds one directory named for the skin which does not contain the skin .tmpl file. It should keep trying the other directories in the SkinLibDirs array. I recoded the SetSkin function and it is locaated at url: http://www.pmwiki.org/pmwiki/uploads/Cookbook/NewSetSkinFunction.php