1)
$module = 'mod_' . argv(1) . '.pdl';
else {
$o .= '
';
$o .= '
' . t('Edit System Page Description') . '
';
$files = glob('Zotlabs/Module/*.php');
if($files) {
foreach($files as $f) {
$name = lcfirst(basename($f,'.php'));
$x = theme_include('mod_' . $name . '.pdl');
if($x) {
$o .= '
' . $name . '';
}
}
}
$o .= '
';
// list module pdl files
return $o;
}
$t = get_pconfig(local_channel(),'system',$module);
if(! $t)
$t = file_get_contents(theme_include($module));
if(! $t) {
notice( t('Layout not found.') . EOL);
return '';
}
$o = replace_macros(get_markup_template('pdledit.tpl'),array(
'$header' => t('Edit System Page Description'),
'$mname' => t('Module Name:'),
'$help' => t('Layout Help'),
'$module' => argv(1),
'$content' => htmlspecialchars($t,ENT_COMPAT,'UTF-8'),
'$submit' => t('Submit')
));
return $o;
}
}