-
Posts
6,629 -
Joined
-
Last visited
-
Days Won
358
Everything posted by bernhard
-
☁️ Duplicator: Backup and move sites
bernhard replied to flydev's topic in Module/Plugin Development
hi flydev thanks for releasing this i just tried it and i got multiple errors "call to undefined function _(...". i changed all occurences from _( to __( and it worked. what is this single underscore function that you are using for translations? same for the process module. also i get an "unrecognized path" for http://duplicator.dev/processwire/setup/Duplicator/?action=packages can you set the process module to be installed automatically by the main module please? the backup worked like a charm. the installer seems to be quite similar to my kickstart project. i think there is great potential to combine both tools! unfortunately i got an error on the last step: the problem seems to be the config.php /** * Installer: Database Configuration * */ $config->dbHost = 'localhost'; $config->dbName = 'localhost'; $config->dbUser = 'localhost'; $config->dbPass = 'localhost'; $config->dbPort = 'localhost'; /** * Installer: User Authentication Salt * * Must be retained if you migrate your site from one server to another * */ $config->userAuthSalt = 'localhost'; /** * Installer: File Permission Configuration * */ $config->chmodDir = 'localhost'; // permission for directories created by ProcessWire $config->chmodFile = 'localhost'; // permission for files created by ProcessWire /** * Installer: Time zone setting * */ $config->timezone = 'localhost'; /** * Installer: Admin theme * */ $config->defaultAdminTheme = 'localhost'; /** * Installer: Unix timestamp of date/time installed * * This is used to detect which when certain behaviors must be backwards compatible. * Please leave this value as-is. * */ $config->installed = 1512033277; /** * Installer: HTTP Hosts Whitelist * */ $config->httpHosts = array('localhost', 'localhost'); as you can see im on windows + laragon. i used the latest dev version of pw -
this looks ok to me. what is not working? https://processwire.com/api/multi-language-support/multi-language-fields/#getting-and-setting
-
Hi SeoGuy and welcome to the forum, I don't understand your question. New pages are always created in all installed languages. They are just inactive by default.
-
Payment base class + PaymentStripe + PaymentPaypal
bernhard replied to apeisa's topic in Module/Plugin Development
i was curious, this worked for me: https://jsfiddle.net/3L0cdjsj/5/ -- removed -- You can change the description (item_name) and the price (amount) and you can use a button in your own style that fits to your website. -
thanks, i'm using IUC already and it's very handy - just didn't know the short name
-
Payment base class + PaymentStripe + PaymentPaypal
bernhard replied to apeisa's topic in Module/Plugin Development
sorry, didn't know that you can't set that up dynamically?? crazy. ok sorry, then i was of no help -
thanks adrian! i didn't know that a dumps panel appears automatically when i do a " bd('test') " anywhere in my code. so i thought i have to activate the dumps recorder great new feature (y)
-
hi adrian, I hope i'm using tracy wrong in this case because the missing option is quite annoying for me. I'm debugging a lot via bd('mytest') calls in my project and when i reload i want to see all dumps based on that single reload most of the time. with the missing option i always have to clean the dump and then reload. if i dont clean the dump it gets messy and misleading sometimes (showing variable values from a previous pageload). thanks for your help
-
Payment base class + PaymentStripe + PaymentPaypal
bernhard replied to apeisa's topic in Module/Plugin Development
if you don't need the invoice number you could use a paypal.me link like i have in my signature. another option could be to use paypal buttons: https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/buy_now_step_1/ -
sorry but google didn't help, what is that IUC you are talking about?
-
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.
-
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...
-
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
-
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
-
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?
- 55 replies
-
- 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
-
How many languages processwire support?
bernhard replied to vanvt92's topic in Multi-Language Support
that's not totally true... -
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();
-
maybe it would be nice to have a screenshot attached to get an instant impression?
-
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
-
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.
-
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.
- 6 replies
-
- 17
-