Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/14/2018 in all areas

  1. --- Please use RockFinder3 ---
    3 points
  2. So now it works. No clue why, im getting through the git changes and compare it with that im having right now ? Thanks for all your great answers sorry that im beeing so harsh Thanks for your time. this is the code that works just fine <input class="checkout" type="submit" name="submit"> </form> </div> <?php if ($input->post->submit) { foreach($input->post as $key => $value) echo htmlentities("$key = $value") . "<br />"; echo "<p>Data successfully submitted {$sanitizer->text($input->post->prnumber)} amount: {$sanitizer->text($input->post->quantity)}</p>"; } AAAAAAAAAAAAAAAAHHHHHHHHHHHHHHH..... That was the issue ..... oh my god.... ??
    3 points
  3. Generators are PHP 5.5+ so it won‘t fit for ProcessWire, which is still running down to PHP 5.3. But the new $pages->findMany() works similarly to how generators work.
    2 points
  4. you should add a name or id to your submit button.
    2 points
  5. When you first started this thread you were using Javascript ajax to send your post request... So someone showed how to use $config->ajax to check for request. In your latest example you are using a normal html form submit. To test for submit in that case you would use if ($input->post->submit). Javascript ajax and normal html form submit are sent in two different ways to server.
    2 points
  6. @SIERRA You could try this this module made by @adrian before going further : https://gist.github.com/adrianbj/e391e2e343c5620d0720
    2 points
  7. hi @stand-ground and welcome to the forum, Because these options are a site-wide config setting and site-wide config settings are placed in the config file, which is stored as /site/config.php - That's how pw is built.
    2 points
  8. ProcessWire version 3.0.102 on the dev branch contains more than a dozen commits and PRs. I'll save the blog post till next week, as I continue reviewing pull requests and covering issue reports as they come in. But core updates are really going smoothly while the progress and fun continues, with ProcessWire getting better every week, thanks to your reports and PRs. This week I briefly had to do a small WordPress-to-ProcessWire conversion, but the site wasn't quite big enough to warrant automating the content conversion like I usually would. So I did a copy/paste job for the content, which I always kind of enjoy, so long as there isn't too much of it. But it was the first time that I had really used the new copy/paste images feature that we recently added to our CKEditor (outside of testing it during development). And I have to admit this feature is really handy for a case like this. Being able to “Copy Image…” (from another site), and paste at the location I want it to go in CKEditor …while the image uploads and inserts itself into my images field automatically… is pretty awesome. No more downloading images from the old site, on to my computer, then uploading to the new site, then placing them in CKEditor. What used to be several steps now feels like a single natural step. The new copy/paste process is so much simpler, and was a huge time saver this week. I mention it here because it's easy to forget that it's there at all (just like the drag-n-drop into CKEditor option). So if you haven't had a chance to try out the copy/paste image option in CKEditor, give it a try. It's a good thing to know about for those times when the need presents itself, because it'll save you (or your clients) a ton of time. More details about this feature can be found in the post for core version 3.0.87 (if you haven't read it already) where we covered the additions of drag-n-drop and copy/paste images uploads into CKEditor.
    2 points
  9. Not a question, but just something I discovered that I wanted to share on the forum since I haven't seen it discussed anywhere. If you are familiar with the "autojoin" option on individual ProcessWire fields, enabling this feature means that every time a page with that field on it is loaded into memory, the field will be included with it immediately. (Normally just the page's name and meta data is included, and getting a specific field from the page requires a separate trip to the database. This is to conserve memory) Normally this is fine and it keeps things simple, but occasionally you may be loading a lot of data in a consistent fashion (for, example, to populate a table) and know exactly which fields you need. With the autojoin option on fields, you would have to enable autojoin for all pages at all times, which you probably don't want. With the following code, you can do a $pages->find() and specify exactly which fields you want to autojoin with it: $pages->find("template=whatever", ['loadOptions' => ['joinFields' => ['filed1','field2','field3']]] ); I tested out in debug mode on one of my projects, and it seemed to significantly reduce the number of SQL queries required for an html data table I was building. Hope that helps someone!
    1 point
  10. You can't add a Field object to a form, but rather an Inputfield object. Field::getInputfield() would come in handy here.
    1 point
  11. @digitex I haven't used this module yet, but I guess what you're looking for is this hookable method: https://github.com/somatonic/Pollino#hooks-to-modify-output
    1 point
  12. Hi Guys, Here's is our most recent website built in collaboration with the Design studio DITHO from Cologne, who designed and coordinated all the process. For now the website is only in German, but there will be a English version soon. https://bedrohte-ordnungen.de/ "Bedrohte Ordnungen" (Threatened Orders) is the display of an ongoing research by the University of Tübingen. Best described on their own words. Here on a hopefully accurate translation Here's a nice showcase video made by DITHO: This is a quite complex website. It's also quite heavy on images, videos and CSS animations, so old computers might struggle a bit to process it. All the website is dynamic and inside PW, including those animations. This is probably the most interesting part of how the website was built, since all the animations were created by DITHO themselves in ProcessWire thanks to a system that I created for them using a repeater field. You can have an idea through these screenshots: The content blocks of each case represent a question each and repeat throughout all the presented cases. Each question has a main content and most have also a hidden block that can be opened by clicking a button. They are created in PW using the very recent FieldGroups https://processwire.com/blog/posts/processwire-3.0.73-and-new-fieldset-types/: The only two third party modules used were AdminOnSteroids by @tpr and the very useful ColorPicker by @Soma. There would be more to talk about, but I don't want to extend myself too much. Hope you guys like it! Just a shout out to DITHO to say again how much fun this collaboration has been
    1 point
  13. If you set trailing slash to "NO" but facebook requests the page via trailing slash that would lead to a 301, so you need to try both settings. You could also try a browser extension (mine is called redirect path) to see if you have any unwanted redirects on that page.
    1 point
  14. It's certainly not intentional. https://github.com/LostKobrakai/Migrations/blob/master/classes/ModuleMigration.php There's what a module migration does. I'd expect that $this->modules->install($name) would also take care about installing any permissions of modules. — I just quickly checked the source and it seems this method should handle that.
    1 point
  15. Then I think I'm gonna post it as an issue on GitHub since non-superusers shouldn't see the field names.
    1 point
  16. +1 on SamC suggestion, laragon is great! Im also using vagrant and https://box.scotch.io/ now. full ubuntu enviroment out of the box, in combination with https://github.com/deveres/vagrant-manager-windows
    1 point
  17. For a long time I used to use the recommended Google way by just placing their snippets. Then some clients wanted to have their sites faster. Less requests. Less files. As fast and as clean as possible. I moved over to hosting fonts on their servers. But... this only works in some cases. Sometimes you can't use this method as you are not allowed to do so or don't get the files you need. If possible I add the fonts to the server. Do I take care of updated or removed versions? Not that much to be honest. Recently I just stopped using webfonts at all for smaller projects (or landing pages, micro sites). If there is absolutely no need for a special font I use system fonts. html { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; } It works pretty well so far. You won't get an FWA award for those sites but who cares.
    1 point
  18. HI @hellboy and welcome to ProcessWire ? In your function sendMail() you write : data: {test: "test"} The first test in this case wouldn't be a string but a variable. Try to change that into: data: {"test":"test"}
    1 point
  19. I've added 3 new methods to the module: getArray(), getValues() and getPages() and officially released the module as BETA with a dedicated thread: I also added docs for all available methods with examples, here are the new ones: @joer80 see here for what you requested: https://gitlab.com/baumrock/RockFinder/tree/master#custom-sql-aggregations-groupings-distincts @Guy Verville I cannot reproduce your issue - please provide more information with exact steps to reproduce. Please use the other thread for all further discussion.
    1 point
  20. I'm missing a question: 4. If you are using Google Webfonts, do you use the preferred method by google (loading from Google servers) or hosting them locally? and probably: 5. When using local copies of Google Fonts, do you observe the font list for availability and if the local files are still up-to-date? (used monospaced Droid font in the past which is no longer available for free) Until last weeks I've used to use the recommended method and let Google serve client-optimized css declarations, but with upcoming GDPR I've changed my mind and reworked all my sites to host the required fonts locally. Of course I've started using the already mentioned webfont-helper but ended with an own PW module which takes the Google font string (like 'Didact+Gothic:regular|Syncopate:regular|Playfair+Display:italic'), downloads all required variants and creates the required CSS which makes transition rather smooth (if anyone volunteers to make a well documented PW module out of it, please send me a PM). That way I (or my customers) may continue manage required fonts from the Admin. And, to at least answer one of the original questions: Since my projects are rather simple with mostly a single CSS file (may be built from LESS) which is included within the <head>, so it was rather simple to use relative paths for now. For more complex sites I'd probably use absolute paths as well.
    1 point
  21. Hi, @flydev! Recaptcha v3 came out, would you mind taking a look?
    1 point
  22. So to get it working, nothing fancy, all easy. In this example, only the email user field is used. Thanks @daniels for this module ? Assuming the checkbox field is called "subscribe_newsletter" and added to the "Registration form fields" in LoginRegister settings, in ready.php : wire()->addHookAfter('LoginRegister::processRegisterForm', function($event) { $form = $event->arguments[0]; foreach($form->getAll() as $f) { $name = $f->attr('name'); if(strpos($name, 'register_') !== 0) continue; if($name == 'register_subscribe_newsletter' && wire('input')->post->register_subscribe_newsletter == 1) { $mc = wire('modules')->get("SubscribeToMailchimp"); $email = wire('input')->post->register_email; // Do not forget to saninitize the email field $mc->subscribe($email); } } }); Result:
    1 point
  23. I know this doesn't solve the issue but I gave up on XAMPP (on windows), was too much hassle in the end, upgrading PHP versions etc... @bernhard pointed me in the direction of Laragon and I've never looked back since, it's a great solution and super easy to upgrade and set up your virtualhosts. I would really suggest giving it a try (maybe not now though as the site seems to be having problems).
    1 point
  24. @mattcohen I'd be interested to look at this site once you're done, always looking to try out new vape gear!
    1 point
  25. Then kindly refrain from using the term for anything other than its actual use.
    1 point
  26. Nice tip! You can also turn autojoin on and off for selected fields whenever you need via API methods $field->addFlag(Field::flagAutojoin) and $field->removeFlag(Field::flagAutojoin).
    1 point
  27. Maybe enabling test mode in the installer could bring more data https://github.com/processwire/processwire/blob/master/install.php
    1 point
  28. 1 point
  29. tpr's solution is better than the one I posted. To take it a step further, those _x() functions never even need to execute. They can simply be contained in a PHP comment, as they only need to be visible to the language parser, which parses the files directly and doesn't execute the with PHP. So you could do this: /******************************************* Intentionally commented out ​// Search_x('Search site', 'Search'); _x('No matches', 'Search'); // Forms _x('From', 'Forms'); _x('From email', 'Forms'); _x('To', 'Forms'); ... *******************************************/ Of course the actual t() function should not be commented out though.
    1 point
  30. I'm using almost the same setup, but my "t" function handles context too. The good thing is that _strings.php can be copied to your next projects too. function t($text, $context = 'General', $textdomain = '/site/templates/_strings.php') { return _x($text, $context, $textdomain); } _strings.php: // Search _x('Search site', 'Search'); _x('No matches', 'Search'); // Forms _x('From', 'Forms'); _x('From email', 'Forms'); _x('To', 'Forms'); ...
    1 point
  31. You can change it in the setting of the Page List Process Module.
    1 point
×
×
  • Create New...