From 2a4e8972e0edfa3156d9ce54d68ce0e54c0ec289 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 18 Apr 2016 20:38:38 -0700 Subject: module updates --- Zotlabs/Module/Pdledit.php | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Zotlabs/Module/Pdledit.php (limited to 'Zotlabs/Module/Pdledit.php') diff --git a/Zotlabs/Module/Pdledit.php b/Zotlabs/Module/Pdledit.php new file mode 100644 index 000000000..accfb6fa1 --- /dev/null +++ b/Zotlabs/Module/Pdledit.php @@ -0,0 +1,72 @@ + 1) + $module = 'mod_' . argv(1) . '.pdl'; + else { + $o .= '
'; + $o .= '

' . t('Edit System Page Description') . '

'; + $files = glob('mod/*'); + if($files) { + foreach($files as $f) { + $name = 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; + } + +} -- cgit v1.2.3