pwFoo
Members-
Posts
708 -
Joined
-
Last visited
Everything posted by pwFoo
-
A online demo would be great. Or a screencast to take a look at admin and frontend? I needa shop in the (near) future and would love a PW solution
-
Drupal modules / plugin have a good quality and most of it works fine out of the box, but I don't like to customize it or the generated html ooutput. Processwire modules are often "proof of concept" examples and some work is to do if you would use it. PW isn't a CMS to use it out of the box, but it's the best CMF
-
After some reading about honeypot I tested simple implementations. It should be quite simple. Define the fields $this->honeypot['text'] = array( 'module' => 'InputfieldText', 'options' => array('sanitizer' => 'text', 'value' => 'http://'), 'vars' => array('name' => 'hp_website', 'label' => __('Do not change if you\'re human!')), 'attr' => array ('id+name' => 'hp_website', 'value' => 'http://'), ); $this->honeypot['checkbox'] = array( 'module' => 'InputfieldCheckbox', 'options' => array('sanitizer' => 'text', 'value' => ''), 'vars' => array('name' => 'hp_sendmail', 'label' => __('Do not check if you\'re human!')), 'attr' => array ('id+name' => 'hp_sendmail', 'value' => ''), ); Add the fields to the form (for testing added to createForm before adding the submit button). $this->add($this->honeypot['text']); $this->add($this->honeypot['checkbox']); And check the values during processForm method. if ($this->value('hp_website') != 'http://') { $honeypot = $this->getField('hp_website'); $honeypot->error(__('Value was changed! Are you a spam bot?!')); } if ($this->value('hp_sendmail') == 1) { $honeypot = $this->getField('hp_sendmail'); $honeypot->error(__('Value was changed! Are you a spam bot?!')); } So if the text field modified or the checkbox was checked, you'll get an error and form process stops. Last step is to add css / js to hide the form fields to human visitors. What do you think about a honeypot feature? Should it be added to FormHelper module? Which fields (website or better email?) or types of honeypot should be added?
-
I used Drupal 6 and 7 and also liked it. For awhile I was searching for a simple clean anbd easy CMS, tested modx and found a note about PW... Changed to PW and I love it! No bloated html output and a awesome api. Build websites and write modules is so easy with PW!
-
Released version 0.1.0 minor changes updated compatibility to FormHelper 0.3.2 moved render() out of the login() method to make the form changeable via public FormHelper class variable $this->fh->... username sanitized by FormHelper (sanitizer set in username field array) I would like to make the module flexible and extendable, but at the moment no addons / plugins implemented...
-
Version 0.3.2 changed formProcess() return values to simply true, false or null (get input values via getInput() instead) Bug fix with getField() variable name
-
After some changes and improvements to FormHelper I'll start to update FCM too. Most work to realize a page add / edit is done by FormHelper (create, modify, render, process form and also care about file / image upload). FCM brings FormHelper together with a create / save page functionality. Page save vs. field save Current version of FCM update all the fields and finally save the hole page. That's fine to save the all the changes done before. But I think about a rewrite to a field save instead of a page save, because a "fieldSave" process module could be used stand alone to handle frontend page edit and also ajax based updates (an optional submodule...)? Any hints or suggestions about pro and cons? Permission check Access control was removed in the second dev version, but should be added optional to FCM again. It won't have it's one permission handling, but will use PW $page->editable() and $page->addable(). Your ideas and suggestions are welcome to improve the module
-
Version 0.3.0 released with bug fixes and improvements. I try to get closer to a final release... Added getForm() getField($fieldname) getInput() and changed class variables to protected. ToDo: file handling if form was send with form errors (file changes won't saved during next try...)Ideas, feedback and also pull requests are welcome
-
Processwire on 2 servers running behind a load balancer
pwFoo replied to mike131's topic in General Support
You should take a look at DRBD. -
I like this flexible gmap module. Is it possible to (auto) show also the gmap info box (address, website link, ...) provided by gmaps?
-
Great module, but rather I looking for something like your module which deals with page references and supports autocomplete (other inputfield for Page Autocomplete core module, without jQuery UI dependency *g*). But really great for simple tag style values Yes, that would be awesome!
-
Thinking about getField($fieldname) and getForm() instead of public Form variable... Maybe the next small update...
-
Initial post updated after release FormHelper 0.1.0. Many changes done and so it's not compatible to earlier versions! create form from page, template or array data Added possibility to update form fields (values, attributes) and field options (skip, unformatted, value, sanitizer) before render()-> "skip" a field have to be added by options() method before(!) createForm() -> use "value" to overwrite or clear the field value -> "unformatted" prefill the form with the unformatted page field value -> "sanitizer" defines the sanitizer to use. If isn't set You'll get the raw value! get field values sanitized if a sanitizer is set via value() method It's possible to chain createForm(), add(), update(), options() and render(), but this could be removed in future versions again... ckeditor regular and inline mode (requires JqueryCore and JqueryUI modules!) file / image upload / delete Example login from with modified submit button $formSubmit = array('vars' => array('name' => 'submit'), 'attr' => array('value' => 'Login')); $formFields = array( 'username' => array( 'module' => 'InputfieldText', 'options' => array('sanitizer' => 'username'), // possible options are sanitizer, value, skip and unformatted 'vars' => array('name' => 'username', 'label' => 'Username', 'required' => true), 'attr' => array('id+name' => 'username'), ), 'password' => array( 'module' => 'InputfieldText', 'options' => array('value' => ''), // set field to empty 'vars' => array('name' => 'password', 'label' => 'Password', 'required' => true, 'type' => 'password'), 'attr' => array('id+name' => 'password', 'type' => 'password'), ), ); $fh->createForm($this->formFields); $fh->update('submit', $this->formSubmit); New method value() to get sanitized values // get sanitized field value if a sanitizer is set via field options $sanitizedUsername = $fh->value('username'); // get raw value without sanitized (skip sanitizer is set!) $rawUsername = $fh->value('username', false);
-
Nice. Works fine with form api as frontend page edit, but needs JqueryCore and JqueryUI modules as dependencies. So I wouldn't use it as real frontend inline editor for logged in users because of the overhead of that two modules. Instead a edit link loads the editable page.
-
Get it... Regular and inline mode works fine, but needs JqueryCore and JqueryUI modules be loaded
-
Ok, problem caused because of a element I thought it's needed by the wysiwyg editor... echo "<p style='display: none' id='PageIDIndicator'>{$page->id}</p>"; But it is important for file upload. InputfieldFile.js /** * Progressive enchanchment for browsers that support html5 File API * * #PageIDIndictator.size indicates PageEdit, which we're limiting AjaxUpload to since only ProcessPageEdit has the ajax handler * */ if (window.File && window.FileList && window.FileReader && $("#PageIDIndicator").size() > 0) { InitHTML5(); } else { InitOldSchool(); }
-
By the way, there is missing some dependency handling via form api / fields. form with file / image field and without manual loaded jQuery module. Uncaught ReferenceError: $ is not definedInputfieldPageTitle.js?v=102:11 (anonymous function) InputfieldCKEditor.js?v=128:48 Uncaught ReferenceError: $ is not definedInputfieldCKEditor.js?v=128:48 (anonymous function) InputfieldFile.js:1 Uncaught ReferenceError: $ is not defined InputfieldImage.js?v=110:1 Uncaught ReferenceError: $ is not definedInputfieldImage.js?v=110:1 (anonymous function) JqueryMagnific.js?v=1:4 Uncaught TypeError: undefined is not a function So without jQuery form and upload works fine, because ajax upload fails *g* But also delete images won't work without jQuery module. Because I don't know how to handle the ajax upload I would be happy to get it disabled to get working file upload / delete with loaded JqueryCore module...
-
At the moment it would be great to disable automatic ajax uploads to get it work... Tried to set noAjax to field, but it have no effect. $imageField->noAjax = 1; Any hint?
-
Hello, I testing a page edit a form generated by form api (pure, unstyled). Edit fields and also upload images works fine without JqueryCore module. To delete images that way JqueryCore module is needed. Both works fine, but not together I think with jQuery loaded the image is tried to upload via ajax and not handled by own code? Because without jQuery also image upload and save to page works fine. Could someone give me a hint what is to do for frontend image upload? Started to debug the problem with javascript console... POST http://server/pw/test/undefined 500 (Internal Server Error)InputfieldFile.js:294 uploadFileInputfieldFile.js:329 traverseFilesInputfieldFile.js:339 (anonymous function) edit:1 Uncaught SyntaxError: Unexpected token < I think "edit" is the used url segment and problem seems the file html output instead of handling the ajax upload correctly... At the moment I#ve tested handling via ProcessPageEdit at line one. <?php if ($config->ajax) { return $modules->get('ProcessPageEdit')->execute(); }?>
-
Get working ckeditor (regular mode) with Processwire 2.5 in the frontend (jsConfig and JqueryCore is required!). To get the ckeditor loaded in inline mode it's important to not load JqueryCore! It won't work... After figured that out I noticed that the value isn't set correct .You get the default value every time! ["body"]=> string(8) ":IGNORE:" So the behavior of the ckeditor module is strange... By the way... shouldn't be added JqueryCore as dependency to InputfieldCKEditor module? Because it won't work without. But JqueryCore will also kill ckeditor in inline mode... Can't test it with TinyMCE because each try to install it redirects to the ckeditor installation page. So it seems a bug in PW 2.5.
-
Delete that post, please... Update Sorry, this post. Yes.
-
I try to simplify FormHelper to not duplicate simple form api features (add, remove and modify form fields via form object). FormHelper should help to create fields based on a data array, handle file upload and also sanitizing form values. So I remove some features (move field, ...) could easily done by form api.
-
FormHelper care about form handling (build form, process input, upload files,...). FrontendContendManaget (FCM) requires FormHelper to create a form based on an existing page or template and provide update / save methode. My login and register modules also based on FormHelper and create the form from array data.
-
Hi GuruMeditation, haven't tested it inside a modal yet. But I think it should be work / possible. FormHelper is needed by my FrontendContentManager (frontend edit / add pages ). But both modules are work in progress and (I think) unstable!