[pmwiki-users] Skin Change list
H. Fox
haganfox at users.sourceforge.net
Fri Mar 3 17:37:10 CST 2006
On 3/3/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Fri, Mar 03, 2006 at 08:40:23AM -0500, Susan wrote:
> >
> > http://www.pmwiki.org/wiki/Cookbook/SkinChange
> >
> > Gives a section of php code to put in /local/config.php that will build
> > a list of skins automatically.
>
> Actually, I think that code may be a little bit of overkill -- one can
> do a similar thing much more quickly with:
>
> include_once('cookbook/skinchange.php');
> if (!$Skin && preg_match('/^[-\\w]+$/', $sk)
> && is_dir("$FarmD/pub/skins/$sk")) $Skin = $sk;
What does this do? How does it replace
if ($dh = opendir("$FarmD/pub/skins")) {
while (($file = readdir($dh)) !== false) {
if ($file == '.' || $file == '..') continue;
if (is_dir("$FarmD/pub/skins/$file")) $PageSkinList[$file] = $file;
} closedir($dh); }
include_once('cookbook/skinchange.php');
? Doesn't the list of skins, automatically generated or not, need to
be defined *before* including skinchange.php?
Hagan
More information about the pmwiki-users
mailing list