Jump to content

bernhard

Members
  • Posts

    6,671
  • Joined

  • Last visited

  • Days Won

    366

Everything posted by bernhard

  1. sorry but google didn't help, what is that IUC you are talking about?
  2. Nice article! I shared it on my facebook page. Thanks a lot for linking to my CRM/office tool Sekundenaktuell but admittedly with some performance issues of my datatables module that i have to fix this year...
  3. hi @gmclelland that's definitely too advanced for now thanks for your suggestion!
  4. i hope that is not offtopic, but just for reference here is a very interesting solution when dealing with videos: https://cloudinary.com/blog/introducing_the_complete_video_solution_for_web_and_mobile_developers if anybody has already used that service i would be happy to hear opinions.
  5. This is an interesting point that could fit very well, thank you. I'll try to include that in my post btw, the first two points are already finished.
  6. Still don't get what you are trying to do... which screen do you want to modify? How does it look like now and how should it look like? A screenshot would help...
  7. I'm totally fine with using it only via IDE - that's the way I've used it myself too. It's easy, fast and the most flexible solution we can get. Imho the important thing is that it makes forms secure by default and validates on front- and backend. Looking forward to trying the module. I have no specific need right now but I'm sure it will rise up soon. Some kind of quickstart guide would be great! Thanks
  8. hey @tpr, any news on your nette forms module (https://processwire.com/talk/topic/2089-create-simple-forms-using-api/?do=findComment&comment=97399) ? i've also worked with nette forms and liked it a lot. a little pw module with some helpers would be great (like setting it to uikit markup, adding a honeypot https://github.com/wodCZ/NetteHoneypot ) i'm happy to collaborate
  9. I'm writing on a processwire.com guest blogpost arriving on friday. any ideas what i should cover? Building a basic custom admin page Hello World Explanations The manual way Building a module with multiple pages and buttons Hello Page2! Add some HTML (eg buttons) Using internal components (modules) Add external styles and scripts (eg charts) Handling user-input (forms & inputfields) adding your first field: inputfieldmarkup creating a custom form to add pages benefits: structure, render only one field in panel, ajax load Organizing your code and your files module info views any ideas?
  10. I've once tried to modify adding of pages (I think it was related to the 1-step-adding; something like i added a link to add a new page and then wanted to modify some fields of that page) and found it was easier to create a custom endpoint for that process and redirect: public function executeAddmypage() { $page = new Page(); $page->parent = 123; $page->template = 'mytemplate'; $page->myfields = ... $page->save(); wire('session')->redirect(wire('pages')->get(123)->editUrl; } thanks for the idea, I'll add such an example with more detailed explanations to my guest blog post coming on friday ...if others don't come up with a better idea
  11. that's not totally true...
  12. hi @donald i've never used this module so i cannot provide any support that you requested in the other topic. why don't you just create your own contact form? I'm not talking about creating a module for that. only a template with a simple html form, a honeypot and some lines of code that send you an email and store the results in a page in the backend? all you need is a form: https://getuikit.com/docs/form and a template that handles the request (here it handles an ajax request with some json data): <?php $email = 'your@mail.com'; $subject = 'your email subject'; $html = "<html><body>"; $formdata = json_decode($formdata); foreach($formdata as $field) { switch($field->name) { case 'email': case 'name': case 'tel': $html .= "<p>" . $field->name . ": " . $sanitizer->text($field->value) . "</p>"; if($field->name == 'email') $email = $sanitizer->email($field->value); break; case 'message': $html .= "<p>" . $field->name . ":<br>---<br>" . nl2br($sanitizer->textarea($field->value)) . "<br>---</p>"; //${$field->name} = $sanitizer->textarea($field->value); break; case 'mail': // honeypot if($field->value) $subject = 'SPAM: '.$subject; break; } } $html .= "</body></html>"; $mail = wireMail(); $mail->to('your@mail.com')->from($email); $mail->subject($subject); $mail->bodyHTML($html); if($mail->send()) { ?> <div class="uk-alert uk-alert-success uk-alert-large"> <p>Thank you!</p> </div> <?php } else { ?> <div class="uk-alert uk-alert-danger uk-alert-large"> <p>Error!</p> </div> <?php } // save to log that can be viewed via the pw backend $p = new Page(); $p->template = 'maillogitem'; $p->parent = 1234; $p->title = date('d.m.Y') . ' - ' . $email; $p->body = $html; $p->save();
  13. maybe it would be nice to have a screenshot attached to get an instant impression?
  14. i've used mPDF standalone (my own module). and indeed i've had a project recently where i created reports with charts rendered by chartjs. i did a "hacky" solution where the charts are rendered, screenshot and integrated as PNG image by phantomjs. it's a bit slow but it was the best solution i could find - and the result looks very good
  15. hm.. good point. maybe. maybe not. with my tool one could change the pw version easily for example. exporting and importing data would need some scripting though. i guess duplicator would be a better option in most cases. maybe we can combine the tools i haven't tried it yet. i'll try it out as soon as possible and see how you did it and if something might be worthful to combine.
  16. How to install a customized ProcessWire instance in less than a minute All you need is to copy one file to your server, then upload a kickstartfile like this: <?php return [ 'pwurl' => 'https://github.com/processwire/processwire/archive/dev.zip', 'dbName' => 'kick', 'dbUser' => 'kick', 'dbPass' => 'Kix8s08$', ]; and if you want to customize your instance after installation you can create recipe files like this: <?php $this->installModule('TracyDebugger', 'https://github.com/adrianbj/TracyDebugger/archive/master.zip'); $this->installModule('AdminOnSteroids', 'https://github.com/rolandtoth/AdminOnSteroids/archive/master.zip'); $this->installModule('Repeater'); it needs a lot more cleanup and testing but any thoughts and ideas are welcome until i can finish it... BTW: it's not only about saving time - this could also be very helpful to share whole instances for debugging.
  17. this is a fabulous idea!!
  18. glad you like it and thanks for the compliment yeah... it's not as easy to find in the beginning (and often i'm still searching a lot around the code). but most of the necessary informations are not too hard to find if you look at the code. Inputfields for example have a baseclass here: https://github.com/processwire/processwire/blob/master/wire/core/Inputfield.php Also see somas tutorial about forms (i updated my initial post with the link: https://processwire.com/talk/topic/2089-create-simple-forms-using-api/ ) I'll see what i can do...
  19. hi dragan, you don't have any limitation when working with InputfieldMarkup. It just RETURNS markup, but of course you can create this markup via php or whatever you want. For example: $html = '<p>This is a test</p>'; for($i=0; $i<10; $i++) $html .= "<div>Line $i</div>"; $field = modules('InputfieldMarkup'); // using the functionsAPI it gets that short $field->value = $html; $form->add($field); but also in my example you could place any PHP code inside the renderChart method.
  20. thats nice! so what about making a PR on github so that ryan can accept the compressed profile? ...and i'm pretty close to release something even more awesome i have to see if the new online installer changed anything or if it still works.
  21. you need to use the classname of the inputfield that you are modifying. your field is inside a repeater, but it is not a repeater itself. if it is a textfield you have to use InputfieldText, if it was a checkbox it would have to be InputfieldCheckbox. Also $field->entityEncodeText = false; is only necessary if you want to use markup in your note
  22. i encourage you to take this challenge as soon as possible. it's really not hard and it will make your head think differently in some situations and make your code cleaner and easier to maintain. and in the end that will save you time have fun
  23. i don't think there is any noticable performance difference (just guessing). the main difference imho is reusability. for small things functions are totally fine. there is a reason why the _func.php file exists in the profile but if you use your function across several pw installations it's for sure better to pack them in a module, host them on some version control system and push updates to all of your sites easily whenever you want. that could get tedious when you have your code spread all over your sites and _func files...
  24. very nice in the second example: where does the content come from? a regular page that is linked? what kind of panel is this? is there a reason why you use an uikit panel instead of the built in pw-panel?
  25. ok didn't know there is a difference. if you do not do already i recommend using adrians awesome tracy debugger module. then you see that inside a repeader the field has a different name: $wire->addHookBefore('Inputfield::render', function(HookEvent $event) { $field = $event->object; bd($field->name); }); hope that helps and you find your solution on your own i'm busy
×
×
  • Create New...