Jump to content

Leaderboard

Popular Content

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

  1. 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.
    15 points
  2. A nice thread on Twitter about companies that block users from the EU because of GDPR: Source: https://t3n.de/news/dsgvo-erste-us-unternehmen-1078319/
    3 points
  3. Thanks for your effort @flydev, let me know if you need some updates in the SubscribeToMailchimp module. The module would not be what it is made for, if you cant use it with the loginregister or any other way a dev prefers. I just want it to stay lightweight and flexible.
    2 points
  4. I will install the Mailchimp module to see how it work. From what I already see, we could add a checkbox by hooking into LoginRegister::buildRegisterForm and we can do the newsletter registration stuff in LoginRegister::processRegisterForm stay tuned ?
    2 points
  5. @MarcoPLY feel free to ask your question in this thread or this , as I am building a companion module for LoginRegister, all feature are welcome.
    2 points
  6. Another day, another level in DSGVO-Madness (in Germany) https://www.golem.de/news/eu-datenschutz-kontrollbehoerden-koennen-dsgvo-kaum-durchsetzen-1805-134304.html (EN Version) https://t3n.de/news/dsgvo-angela-merkel-aenderungen-1078083/ (EN Version)
    2 points
  7. Also consider to use selector as an regular array https://processwire.com/blog/posts/processwire-3.0.13-selector-upgrades-and-new-form-builder-version/#new-selectors-as-regular-arrays
    2 points
  8. This module is meant to give a lt/lng position of an address so we can display a marker on a map. It is not an address field type. When you set the marker on the page that you edit, it will get the address for the lat/lng that you have set in the GUI by reverse geocoding it through the Google geocoding API. This returns the long address string that you can get in your template with $page->mylocationfieldname->address. To answer your question, there are ways to get a properly formatted address but all of them involve some work: 1. extend the module yourself to store address parts. Or read posts in this thread from here on and than use @BrendonKoz or @patman forks: 2. add fields to your template for postcode, street address, city, country. Fill them manually when you edit the page. Then you can render them in your templates. This should be the easiest way. 3. switch to the Map Marker Module which uses Google Maps and read from this post on where @adrian has extended the functionality to give you exactly what you want:
    2 points
  9. LimitRepeater Allows restrictions and limits to be placed on Repeater fields. For any Repeater field you can limit the number of items that may be added and also prevent the use of drag-sorting, toggling of published state, and the trashing of items. There is also an option to hide the clone button when the limit is reached. Usage Install the LimitRepeater module. Since v0.2.0 the module settings are configured at Setup > Fields > [your Repeater field]. The settings are contained within the "Restrictions" fieldset on the "Details" tab. Please note that the restrictions limits are applied in Page Edit with CSS/JS so should not be considered tamper-proof. Setting restrictions via a hook Besides setting restrictions in the field settings, you can also apply or modify restrictions by hooking LimitRepeater::checkRestrictions. This allows for more focused restrictions, for example, applying restrictions depending on the template of the page being edited or depending on the role of the user. The checkRestrictions() method receives the following arguments: $field This Repeater field $inputfield This Repeater inputfield $page The page that is open in ProcessPageEdit The method returns an array of restrictions for the Repeater field. An example of a returned array: Example hook Prevent non-superusers from trashing any items in "my_repeater_field": $wire->addHookAfter('LimitRepeater::checkRestrictions', function(HookEvent $event) { $field = $event->arguments('field'); $restrictions = $event->return; if($field->name === 'my_repeater_field' && !$this->user->isSuperuser()) { $restrictions['notrash'] = true; } $event->return = $restrictions; }); Upgrading from < v0.2.0 There are two major changes to be aware of when upgrading from earlier versions of the module. The settings are no longer defined on the module config page, but rather in the field settings of each Repeater field: Setup > Fields > [your Repeater field]. If you visit the module config page you'll find shortcuts to the settings for each Repeater field. In earlier versions you could apply restrictions to a particular role. This is still possible but is now handled by hooking LimitRepeater::checkRestrictions as this is a more flexible and powerful approach. If you were applying restrictions to a particular role or roles you'll need to add hook code to achieve the same effect after you upgrade the module. See the hook information above in this readme. https://github.com/Toutouwai/LimitRepeater http://modules.processwire.com/modules/limit-repeater/
    1 point
  10. Each year we cycle 1000km with our company to fight against cancer. To participate with 4 teams we have to collect 20.000 euros. Our graphic designers made some goodies en we also organise a spaghetti fundraiser. To help the sales we decided to make a webshop with our webteam. And of course we used our favourite CMS for the job! ? https://shop.typografics.be/ At this moment we raised more than 20.000 euros, so all our teams can participate. This is a very special project for us, unfortunately one of our colleagues has been diagnosed with cancer and currently is fighting against this terrible disease. Premium PW modules used in this project: PadLoper FormBuilder ProFields Variations With a few hooks here and there we managed to make it work. To handle the payments we made use of Mollie, we created our own payment module and will opensource this soon. You can read more about this project in our blog (in dutch) Unfortunately we're currently only shipping to Belgium We’re already brainstorming to make a 2.0 version of this webshop, so all your feedback is more than welcome.
    1 point
  11. It's annoying, right? You could thumbs-up the existing request for a change to this behaviour: https://github.com/processwire/processwire-requests/issues/186 And as a workaround in the meantime try this hook in /site/ready.php: $wire->addHookAfter('ProcessPageListActions::getExtraActions', function(HookEvent $event) { $page = $event->arguments(0); $actions = $event->return; if(isset($actions['copy']['ajax'])) { unset($actions['copy']['ajax']); $actions['copy']['url'] = "{$this->config->urls->admin}page/clone/?id={$page->id}"; } $event->return = $actions; }); If you find it's not working for you then it might be getting called before the equivalent hook inside ProcessPageClone, in which case you could try experimenting with the "priority" option for hooks: https://processwire.com/api/ref/wire/add-hook-after/
    1 point
  12. 1 point
  13. Hi @gebeer for me, your solution was just the first step to get it to work. I added your line to my .htaccess (by the way, there is another way of notation, both are working for me, I don't know the difference, so use SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 OR RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] But I had to do a further step in the rest.inc. Before your Auth-Code-Block, I had to insert: //Basic HTTP Authentication if (isset($_SERVER['HTTP_AUTHORIZATION'])) { list($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'])=explode(':',base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'],6))); } else if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) { list($_SERVER['PHP_AUTH_USER'],$_SERVER['PHP_AUTH_PW'])=explode(':',base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'],6))); } //and now your code if (isset($_SERVER['PHP_AUTH_USER'])) { ... } My server uses the REDIRECT_HTTP_AUTHORIZATION value. Now it works for me. Many thanks to your help.
    1 point
  14. HELLO! This is an old thread now, but just got a requirement into to do some shopify integration with PW, anyone done anything like this and created a module at all? If not I'll get on it. I mainly want to get product info from shopify to show in PW.
    1 point
  15. I @flydev sure think you for listening to us! What I ask in the post about the new module of MailChimp, is it possible to integrate with loginRegister module. This could be very helpful. The best is if we could have the possibility to add a check box in the registration form, to ask if want to subscribe for (eg) newsletter and connect directly with the MailChimp list. I see in the new MailChimp module (made by @daniels ) you can connect the form in this way // ... validation of form data $mc = $modules->get("SubscribeToMailchimp"); $email = $input->post->email; $subscriber = [ 'FNAME' => $input->post->firstname, 'LNAME' => $input->post->lastname, ]; $mc->subscribe($email, $subscriber); I try to see if I can make a hook, but the only thing that I sensed and should be done to ___processRegisterForm, where is the validation. I'm not really know how do it... ? Anyway, if you want to integrate inside the module this function will not need to do hooks. in this case, for not doing each one's own hook will be good if we can set form the backend the field to pass to MailChimp, eg I use also ask the country. Need some place where connect the $country to the MailChimp field. I hope this can be useful as an idea and to have explained myself well! ? Thank you!
    1 point
  16. For this job you have this module available :
    1 point
  17. Not IP, but language / gender + location
    1 point
  18. Thank you for the feedback @MarcoPLY I've not worked with loginRegister and hooks yet. If you or someone finds a solution, please share it in here ?
    1 point
  19. @horst, sorry to bother you with this (and sorry if it's a dumb question in the first place), but what's the current state of this module like? I'm in desperate need of "pixel perfect" pre-defined crops, and while the focus and zoom feature is really cool, it solves a different problem entirely. Reading some of the posts here I'm wondering if this module is still something I should go with, or do I just need to wait and hope that @ryan decides to add pre-defined crop areas to the core one day? Thanks! ?
    1 point
  20. Considering this it might be true in austria: https://euobserver.com/justice/141746.
    1 point
  21. PW's `$session` stores data in `$_SESSION` but it's "namespaced" in the array. E.g. `$session->value` != `$_SESSION['value']` I'd recommend using the PW `$session` if possible instead of mixing and matching with `$_SESSION`. In PW3 you can also use `$input->requestMethod()` for request method checks. https://processwire.com/api/ref/session/ https://processwire.com/api/ref/input/
    1 point
  22. 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
  23. What exactly is not working, and where? Install Tracy Debugger - it might help to narrow down what's going wrong.
    1 point
  24. Maybe the docs can explain that? ? https://www.google.com/search?q=site:processwire.com/api/ref+session
    1 point
  25. Hi folks I'm currently doing some work on a very customised system based on PW (naturally). Rather than do this to check a user has a role: if ($user->hasRole('admin') || $user->hasRole('editor') || $user->hasRole('role3') || $user->hasRole('role4')) { it's possible to do this: if ($user->matches('roles=admin|editor|role3|role4')) { Is there a similar way of doing this for permissions? I want to check in code if a user has one of several possible permissions before displaying something: if ($user->matches('permissions=perm1|perm2|perm3|perm4')) { ^^^ this doesn't work and I'd have to resort to $user->hasPermission('role') multiple times if there isn't a solution Not the end of the world of course, but this is neater/easier to read in the code.
    1 point
  26. @GhostRider @adrian Attaching new files for timeEndUnix. Please let me know if you find anything strange. Ps. Also added a fix for missing dates/events if they were set to not repeat. This will all be rolled into the next update as well. thanks for your help. rrule-gui.js MarkupRecurme.module
    1 point
  27. Congrats! Another good use of the Canvas theme If you allow just one remark: Usability-wise, I would never let text run as far as e.g. here https://www.clipmagic.com.au/services/develop/ Text runs all across 1120px. I would either use CSS column-count on certain pages, or use some kind of grid / layout solution that narrows down big chunks of text. https://baymard.com/blog/line-length-readability
    1 point
×
×
  • Create New...