Jump to content

pwFoo

Members
  • Posts

    708
  • Joined

  • Last visited

Everything posted by pwFoo

  1. New FormHelper dev branch 0.0.7 removed hardcoded allowed file extensions (forgotten test string...) changed jsconfig handling (now js-code is prepended to $config->scripts I thinking about a honeypot feature to make forms (more) "secure" against bots... What do you think? Would it be a good idea? https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?p=41795 A field hidden by CSS | by JavaScript A field requiring a blank input A field requiring a specific input
  2. Tried to install TinyMCE, but after click "install" it changed to ckeditor. TinyMCE install link seems broken in dev.
  3. Updated version with improved clearValues and added unformattedFields (true = all || array with field names) option. The unformattedFields option is needed by FrontendContentManager for editing pages with textformatter active fields (for example TextformatterTextile).
  4. Thanks. So to be flexible I'll loop through all fields and get as needed.
  5. To handle textformatter I'll add an option to get the fields or some fields unformatted if needed (maybe difficult to decide...). At the moment I use $pageObj->getInputfields() to get all fields. Maybe should be changed to a loop through all fields to get it formatted or unformatted // unformatted, for example to get textile source for edit instead of parsed html code $pageObj->getUnformatted("field"); // or formatted $field->getInputfield($pageObj); Haven't found an way to "convert" a formatted field to an unformatted.
  6. Module need some improvements to work with inputtype (ckeditor, tinymce) and textformatters (TextformatterTextile, ...). In a earlier version it loads ckeditor or tinymce. But not tested with textformatters which need to load the textformatter module and call formatValue() method I think...
  7. Hi, searched for that topic because I try to load the textformatter modules like above- But I need to get the textformatters from the page field first. Tried this, but doesn't work. foreach ($field->textformatters as $textformatters) ... A dump of $field->textformatters is empty.How could I get the textformatters? *Update* I try to format a $field->value like this. $f = $modules->get('TextformatterTextile'); $text = $field->value; $new = $f->formatValue(new Page(), new Field(), $text); // $new is empty! echo $new; $field->value = $new;
  8. I found php-websockets and would do some tests... https://github.com/ghedipunk/PHP-Websockets
  9. Hi Ryan, thanks. Websockets sounds interesting, but You're could be right to wait until it's more effiecient and easy. So may be it's a future option. If I do some tests I'll report it here, but don't know if I have the time to do it To use php for notifications is fine, but also would love to use ajax notifications in the frontend. First tests no javascript was load by the notifiactions module. Notifications.message("Message to send"); Notifications.warning("Warning to send"); Notifications.error("Error to send"); So I'll wait for the js api documentation to see how it work.
  10. I use this code. try { $login = $session->login($user, $pass); if($login && $login->id) return true; else return false; } catch(Exception $e) { return $e->getMessage(); }
  11. At the moment it's seem to be ajax polling notification. Is additional a websocket connection planned / possible?
  12. Hi Ryan, thanks for your answer Notification demos work fine, but how I have to initialize the module to work in the frontend? Add notifications to the admin works fine. $notify = $users->get('<username>'); $notify->notifications->message("Just a test!"); $notify->notifications->save(); But haven't found out how to add the ajax messages to the frontend too. It' very interesting and a really nice feature. Great work!
  13. Updated git and module repo to promised reworked version 0.0.3! FCM 0.0.2 isn't compatible to 0.0.3. It's redesigned.
  14. Hi Soma, I know it's under development. I want to do some tests But I'll wait until it's usable.
  15. Tried the dev branch and also the SystemNotifications module. Is there a documentation how to use it? How to use it for frontend users?
  16. Thanks for answer. At the moment I do some tests with FormHelper and FrontendContentManager (rewritten yesterday). Bug reports or suggestions are welcome
  17. I redesigned FCM to be more flexible. New testing branch working like this (inside a demo module "conversation"). public function add ($parent, $redirect = null, $options = array('clearValues' => true)) { $fcm = $this->modules->get('FrontendContentManager'); $form = $fcm->createForm($parent, $options); if ($fcm->formProcess()) { $page = $fcm->add($parent); // Manipulate page object from outside... $page->name = $page->id . '-' . $this->sanitizer->pageName($page->title); $fcm->save(); if ($redirect === null) $redirect = $page->url; $this->session->redirect($redirect); } return $form->render(); } public function edit ($topic, $options = null) { $fcm = $this->modules->get('FrontendContentManager'); $form = $fcm->createForm($topic, $options); if ($fcm->formProcess()) { $page = $fcm->edit($topic); // Manipulate page object outside... $page->name = $page->id . '-' . $this->sanitizer->pageName($page->title); $fcm->save(); $this->session->redirect($topic->url); } return $form->render(); }
  18. FrontendUserRegister (dev / maybe unstable!!!) Simple user registration process. Create a new user with checked values if username & email isn't taken by a existing user and not empty a correct password is set Required FormHelper Version 0.0.5+ Download Processwire module page: http://modules.processwire.com/modules/frontend-user-registration/ Bitbucket Repo: https://bitbucket.org/pwFoo/frontenduserregister/ Usage // load module and output the register form echo $fur = $modules->get('FrontendUserRegister')->register("{$redirect_after_register}"); Planned features email activation Module isn't available anymore, but it's planed to replace FrontendUserLogin and FrontendUserRegister with the new FrontendUser module which is not released yet. A new support topic will be created after FrontendUser module is added to the PW module repo. Added new FrontendUser module
  19. Module updated to 0.0.5 Changed formProcess return values. Example at initial post is updated. if ($process === NULL) { // form not sent } elseif ($process == true) { // form sent... without or also with errors! Check with "$fh->form->getErrors()" } elseif ($process && $fh->form->getErrors()) { // form sent, but with errors! } elseif ($process && !$fh->form->getErrors()) { // form sent without errors! // Do something... } Because I need to return TRUE if form is sent without and also with errors...
  20. Hi Marty, Fredi use the backend interface in an overlay. So you should get a styled edit page (like backend admin). FCM is based on FormHelper module (generate and process forms). You can use it inside the frontend page without an overlay and with your own styles. At the moment it's tested with simple pages/ templates. create pages edit page fields (it's also possible to skip fields and so remove from edit form) upload, replace and remove images) It's untested with multi language or repeater fields for example.
  21. First dev release FrontendUserLogin FrontendUserRegister will be the next one...
  22. FrontendUserLogin Module to handle frontend user login / logout. Also should work with Persistent login for users (mode: automatically) out of the box Version 0.3.1Requires PW 2.5.5 (fields defined by array) Download Processwire module page: http://modules.processwire.com/modules/frontend-user-login/ Bitbucket Repo: https://bitbucket.org/pwFoo/frontenduserlogin/ Usage Readme file Module isn't available anymore, but it's planed to replace FrontendUserLogin and FrontendUserRegister with the new FrontendUser module which is not released yet. A new support topic will be created after FrontendUser module is added to the PW module repo. FrontendUser module
  23. It's also possible to edit any page... echo $fcm->edit($pages->get("/")); Next update url segment check will be removed.
×
×
  • Create New...