Jump to content

Nico Knoll

PW-Moderators
  • Posts

    1,835
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by Nico Knoll

  1. Maybe you should add something like this: public function ___install() { if(ProcessWire::versionMajor == 2 && ProcessWire::versionMinor < 2) { throw new WireException("This module requires ProcessWire 2.2 or newer"); } } Btw.: My template editor module now requires your Inputfield
  2. Won't work for me. I just can't write into it... (OS X 10.8 / Chrome)
  3. Needs two clicks. Otherwise maybe something wouldn't work after the upgrade and you couldn't make a backup before
  4. Yes it is. You have to got to "setup->templates->filters (the box at the top)->show system templates" and click on yes. Then you will find "user" in the template list.
  5. Hi, I wrote a new module this evening: Template Editor This module adds the possibility to edit and rename template files directly from the backend. Requirement: It's important to have this module installed and PW 2.2 running. Download: http://modules.proce...emplate-editor/
  6. So, had same free time: https://github.com/NicoKnoll/TemplateEditor (just beta)
  7. Hi, im writing a module and need a div to be in a form instead of an textarea. Is there a way? My code: $form = $this->modules->get("InputfieldForm"); $form->method = 'post'; //$form->description = ""; $f = $this->modules->get("InputfieldText"); $f->name = 'file_name'; $f->label = 'Name'; $f->attr('value', $filename); if($f->value == '"') $f->collapsed = Inputfield::collapsedNo; $form->add($f); $f = $this->modules->get("InputfieldTextarea"); $f->name = 'file_content'; $f->label = 'Content'; $f->attr('rows', '30'); $f->description = ""; $f->collapsed = Inputfield::collapsedNo; $f->value = $filecontent; $form->add($f); $f = $this->modules->get("InputfieldButton"); $f->type = 'submit'; $f->id = 'file_submit'; $f->value = 'Save template'; $form->add($f); return $form->render();
  8. And now you should add it here: http://modules.processwire.com/
  9. Its like turtle module in python today (which we have to use in school).
  10. Would be nice to have a module for this! Because in school the FTP ports are closed ( ... -.- ) so I only can change the template of the website at home... And with this wordpress like template editor it would wasy to do this in school, too.
  11. Looks like your prayers have been heard: http://processwire.com/
  12. https://github.com/NicoKnoll/AutoUpgrade
  13. Well, looks like you want to name instances of a class: # 1. Option $channel = new channel(); $tag = new channel(); # 2. Option $channel = new channel(); $tag = new tag(); In this case "channel" is one class and "tag" is another and you're creating instances of it with "new ...()".
  14. A cleaner way is to check it like this: //Note the change from $wire->pages to $pages... $p = $pages->get("/foo/bar/"); if (!($p instanceof NullPage)) { //Page was found, you can modify with API } else { //Page was not found... it is NullPage and has id = 0 }
  15. Maybe you could just "hook" the button so that you could expand it with custom modules.
  16. Would be something like the root path you can define for a ftp user.
  17. Maybe you could add an option that the user with limited edit access only views the editable pages as page tree in backend...
  18. Didn't tried it yet but it's sounds like something I was looking for a long time
×
×
  • Create New...