-
Posts
1,360 -
Joined
-
Last visited
-
Days Won
49
Everything posted by flydev
-
Hi, I have a problem uninstalling modules on my PW-3.0.84 installation. When I try to uninstall a module, the module is automatically re-installed. Any idea ? Edit: It happen with every module...
-
Hi, It look like its a MySQL server configuration issue. You should check the value of MAX_USER_CONNECTIONS in your MySQL server config file. Do you have access to the server config file or are you on a shared hosting ? You can check the value from PHPMyAdmin :
-
Hi, Check this thread if it can solve your problem:
-
Front end ajax select filters based on pages data
flydev replied to Krlos's topic in General Support
You could also look at this code/module by @Soma for the live search feature: https://github.com/somatonic/AjaxSearch/blob/master/AjaxSearch.js Then its up to you to do your logic in the search.php template. To filter the data, check the doc/example : - https://datatables.net/examples/plug-ins/range_filtering.html - https://datatables.net/examples/api/multi_filter.html - https://www.google.fr/search?q=jquery+datatables+filter -
Attaching a form uploaded image in an email (solved)
flydev replied to ryanC's topic in Getting Started
If I am not dumb, WireUpload() doesn't create the destination dir in the given path if it doesn't exist and here is the first problem, you should create the dir before uploading the file (are you sure your files is uploaded in $config->paths->assets . "files/useruploads/" ?) , second - as adrian pointed out - is the attachment path. Check below your corrected code, it should work: <?php namespace ProcessWire; $email = filter_input(INPUT_POST, 'email', FILTER_VALIDATE_EMAIL); $email .= $_REQUEST['email']; if (isset($_POST['submit']) and isset($_POST['email']) and isset($_POST['comments']) and isset($_FILES) ) { //image upload begin $upload_path = $config->paths->assets . "files/useruploads/"; // create the dir if it doesn't exist if(!is_dir($upload_path)) wireMkdir($upload_path); $user_image = new WireUpload('user_image'); // References the name of the field in the HTML form that uploads the photo $user_image->setMaxFiles(5); $user_image->setOverwrite(false); $user_image->setDestinationPath($upload_path); $user_image->setValidExtensions(array('jpg', 'jpeg', 'png', 'gif')); // execute upload and check for errors $files = $user_image->execute(); //image upload end $to = 'me@email.com'; $subject = 'Feedback from my site'; $message = 'Name: ' . $sanitizer->text($input->post->name) . "\r\n\r\n"; $message .='Email: ' . $sanitizer->email($input->post->email) . "\r\n\r\n"; $comments = $sanitizer->entities($sanitizer->textarea($input->post->comments)); $message .= 'Comments: ' . $comments; $success = $email; $success .= $message; $mail = wireMail(); $mail->to($to)->from('me@email.com'); $mail->subject($subject); $mail->body($message); $mail->attachment($upload_path . $files[0]); $mail->send(); } ?> <html> <head> <meta charset="utf-8" /> </head> <body> <form id="option3form" action="./email-with-attachment" method="post" enctype="multipart/form-data"> <label for="name">Name: </label> <input type="text" name="name" id="name"> <label for="email">Email: </label> <input type="email" name="email" id="email"><br /><br /> <label for="comments">Comments: </label> <textarea name="comments" id="comments"></textarea><br /><br /> <p>Click the "Choose File" button below to upload your image.</p> <input type="file" name="user_image" /> <input type="submit" name="submit" value="Submit"> </form> </body> </html> -
@noelboss hey, glad you like it. Thanks for the fix ! I will merge your PR today. About the issue #1, I will try to implement it the next week-end. Lacking time here. For the Github scope option, I also need to make it more flexible. The thing is that with Github, if we don't specify the scope, we can only get a public email, and only if the user has set his email "public", which by default is set to hidden, so its impossible to use email address to identify users, and I assume that most users don't want to set their email public.. And about the issue you posted on Github, I think I have already made this modification on my local dev module. I will check that at the same time as the "firstname/lastname" order issue.
-
Attaching a form uploaded image in an email (solved)
flydev replied to ryanC's topic in Getting Started
Hi, sorry for the fast answer here, take a look at the WireMail's doc : https://processwire.com/api/ref/wire-mail/attachment/ -
@SamC I a using LiceCap to create screen animation. It works under OSX and Windows.
-
Yes
-
-
Hi Paul, lets try to get started with a basic flow. Create a file called mytable.php in the root directory (along side the index.php file) and paste the following code : Then In your template file put the following code : Hope it get you started.
-
Developing a website or whatever without Tracy is for masochists! Sorry I can't resist!
-
I don't have ProField here, you should test it now and report back
-
To enable markdown, you have to install the following core module : ... then you have to apply the Textformatter to your field. Go to the Details tab of your field, select the Textformatter(s) you need then save. Did you mean you clicked/installed the Front-end page editor ? If yes, simply uninstall the module PageFrontEdit. You might need to remove some markup depending on the option you choosen. And welcome
-
Is it possible to create an advance eCommerce website?
flydev replied to Samk80's topic in Getting Started
There exist two Pro modules which will help you to build this e-commerce website. Padloper (already mentioned) and Variations : https://variations.kongondo.com (check the tutorial and the video) Also there are two good reads on Snipcart, a tutorial and a case-study - a must read even if you plan to not use Snipcart: https://snipcart.com/blog/processwire-ecommerce-tutorial https://snipcart.com/blog/case-study-ateliers-fromagers-processwire Welcome to the forum @Samk80 and good day to you- 29 replies
-
- 6
-
- product configuration
- product filter
-
(and 1 more)
Tagged with:
-
@fbg13 Yes absolutely, just copypasted the previous post in case he was using the image field (and btw, the if condition do not make sense, thanks). But should be $form->login_submit->value as $form->login_submit return an object.
-
@The Frayed Ends of Sanity: modify your hook with the following code : $wire->addHookAfter('LoginRegister::buildLoginForm', function($event) { $form = $event->return; $form->description = false; // Remove the description foreach ($form->children as $field) { // loop form fields if($field instanceof InputfieldSubmit) { // if we reach the submit button then $field->value = 'My Submit'; // change the value } } $event->return = $form; }); Just look at the source code, and learn ProcessWire's hooks. With a little more experience you will be able to find those tricks alone We are happy to help here dude
-
Here is an alternative of editing the .htaccess file. You could use Jumplinks from @Mike Rockett and manage all of your 404 hits easily (as well all others redirects needed). OT: about the wp-login itself, you could create a page and a template for this, reproduce the WP login form and play a bit with the "hackers" by giving them a nice memes on login submission (last example: https://rockett.pw/jumplinks/examples)
-
[WIP] ProcessMailer - A module for managing and sending newsletters
flydev replied to abdus's topic in Modules/Plugins
I personally have the following module running to handle users to subscribe and unsubscribe to a newsletter. If your module could take into account @justb3a's module, it would be awesome. It already render the subscription form and create the proper user with the right role on submission. -
Guys, could be related to this ? (the last updated answer)
-
Where will I find more themes/templates for ProcessWire?
flydev replied to davede's topic in Themes and Profiles
A small addition to what @louisstephens suggested. You could also watch thoses videos to see how easily/quickly you can get a HTML theme working on ProcessWire. -
Once again, you can do that by hooking processProfileForm(). Lets say you added a field 'images' to the system user template and you added the 'images' field to the module configuration, e.g. : then in ready.php : wire()->addHookAfter('LoginRegister::processProfileForm', function($e) { $form = $e->arguments[0]; // get the form foreach ($form->children as $field) { if($field instanceof InputfieldImage) { foreach ($field->getAttribute('value') as $value) { wire('user')->images->add($value); } wire('user')->save(); } } }); To show the image on the frontend, you can hook renderProfileForm().
-
Hi and welcome to the forum. The H2 come from the code of the module on line 518 (link). As it look like there is no option to define your own markup (maybe yes, I am taking my first coffee..), you must change it by translating the file. To do so, first install the core's module LanguageSupport, then translate the module's file : Once saved, you should be able to see the change on your page. Did you mean you already added an image field to the system template user ? if yes, then you need to add the permission profil-edit to the user so he can modify his profile. If its not the case, let us know. If you encounter difficulties, just ask on the forum. Enjoy
-
use $value... not $options, check my edited post.
-
In your code $html = $pages->get(6090)->renderField('html_body', array('message' => $reasons, 'stripe_id' => $stripeId)); your option value is the second argument, shouldn't be the third ? $html = $pages->get(6090)->renderField('html_body', 'test', array('message' => $reasons, 'stripe_id' => $stripeId)); // given there is a 'test' markup file and you grab values with : $value['message'] ... not $options. <?php echo $value['message']; ?> <?php echo $value['stripe_id'] ?>