Editing files with the atkFileEditor: Difference between revisions
Appearance
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
{{Examples|basic|[[Fabio Saitta]] <webmaster@saitta.it>}} | {{Examples|basic|[[Fabio Saitta]] <webmaster@saitta.it>}} | ||
Let your users edit ATK help file with 14 lines of code | '''Let your users edit ATK help file with 14 lines of code !!!''' | ||
ATK Rocks !!! | |||
<pre> | <pre> | ||
Revision as of 17:54, 25 August 2006
|
ATK Examples: Editing files with the atkFileEditor
|
Let your users edit ATK help file with 14 lines of code !!!
ATK Rocks !!!
<?php
atkimport("atk.atkfileeditor");
useattrib("atkfckattribute");
class help extends atkFileEditor
{
function help()
{
$this->atkFileEditor("help","C:\Programmi\Apache Group\Apache2\htdocs\atk_56\help\it",".inc");
$this->add(new AtkFckAttribute("filecontent",30,AF_HIDE_LIST));
$this->setSecurityAlias("module.class");
}
}
?>
notes:
$this->atkFileEditor("help","C:\Programmi\Apache Group\Apache2\htdocs\atk_56\help\it",".inc");
this is working with windows is you use unix do you have to code something like this:
$this->atkFileEditor("help","/usr/http/atk_56/help/it",".inc");
you have also to change language directory in the sample I select Italian language /it
For autorization use Security alias
$this->setSecurityAlias("module.class");
or define is your module.inc
registerNode("module.help",array("admin","add","edit","delete"));
where module is the name of your module and class is the name of security equivalence