Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/28/2019 in all areas

  1. We're finally launching a redesign of our website! Doesn't feel like it to us, but our previous design was already from 2013 ? https://ed-works.com/ We like to keep things simple, so the only third-party modules that we installed were Tracy debugger, Admin on steroids and Admin Theme Boss, which we tweaked a little bit to our taste. All in all, there's not much going on inside PW. Our main concern was to serve the frontend with responsive images with a close quality to the originals, and for this, it's important that PW allows us to use ImageMagick for resizing them. We also love to use PW's image tags to add classes to the images. In this case, we use them to display the images with three different sizes. We also had to change the templates to serve the projects to the homepage via Ajax. We hope you guys like our new baby ? Edit: I forgot to refer that we also changed our logo and tweaked our name to ED works.
    4 points
  2. Thanks, guys! I'm checking what's up with the server now. update: the server is up and the permissions are fixed. Remind me not to run terminal commands as root again ?
    3 points
  3. ProcessWire 3.0.125 has several useful new $sanitizer methods and options, as well as new ways to access them directly from the $input API variable. This makes dealing with user input even easier than it was before. This version also brings updates to our translation functions and improvements to our API documentation: https://processwire.com/blog/posts/pw-3.0.125/
    1 point
  4. This is certainly nothing, which can be answered in absolute terms. File system speed depends on the filesystem. A RAM disk is way faster than some old-ish HDD. The database might be local and mostly in RAM, but could be on another machine with network latency to consider. You'd need to test this on the actual machine you're working with under the expected load you're working with. If you're already doing much filesystem IO WireCache might perform better. If you filesystem IO is not saturated, but your db is queried a ton, then adding even more load to the db might not be the best choice. The latter is probably the more usual case for ProcessWire usage. Attention seems like one of the worst metric to judge the usefulness of features by. Afaik WireCache was added to allow for caching of actual data (like pagearrays), which is something MarkupCache simply could not do and cannot do. If you don't need that as a feature performance would be the only thing I would care for.
    1 point
  5. Yes, absolutely - same as sending email campaigns directly from the website vs going with an email-sending provider such as CampaignMonitor or MailChimp. This is a key decider for going with a notification-sending provider
    1 point
  6. Perhaps you can use TracyDebugger and output (bd) whatever you pass to isChanged in your hook?
    1 point
  7. Thank you @dragan @PWaddict and @elabx for your detailed and considered opinions. Much appreciated. I investigated all your suggestions and all of you asked why I chose PushAlert. Simple really, it was the first I found some time last year. I searched for others but none of the solutions you presented came up. PushAlert seemed to have the best plans and I've found their tech support to be responsive and helpful. OneSignal appears to be the biggest and has the most fully documented solutions. However, like @elabx, I was uncomfortable with the fact that you had to pay for GDPR security??? The leap from free to US$99/mo for what should be a right not a privilege didn't sit well with me. I guess they make their money from selling the marketing data rather from their sender clients? Ended up going back to PushAlerts and they have a published GDPR Compliance page covering all plans, including free. https://pushalert.co/gdpr On the flip side, you don't get the detailed reporting but then I doubt 99.9% of clients would want it. They want to know how many notifications were sent, how many were successfully received, how many CTA's clicked and how many unsubscribed. All this info is provided by PushAlert while still protecting subscriber confidentiality. Works for me! @elabx would you consider sharing your code with me? Why reinvent the wheel and your ideas are exactly what I'm looking for to adapt to PushAlert. Thanks again
    1 point
  8. I can confirm that I'm getting the same error from South Carolina right now.
    1 point
  9. Better do a check on ed-works: (Image removed) shows up since 23:00 gmt
    1 point
  10. I turned on debugging on and it returned the username. Must have been some cache. Thanks for your help.
    1 point
  11. Your cache function doesn't return JSON though, but rather a PageArray with the full user objects. I suggest only returning the JSON data you need to see if that makes a difference. That's correct. A solution is to use $pages->findMany() with the user template. $members = $cache->get('members', '+10 minutes', function($pages) { $member_pages = $pages->findMany('template=user, roles=member, sort=lastname, limit=3000, check_access=0'); return json_encode($member_pages->explode(['name', 'email'])); // Whatever fields/properties you need from the member pages });
    1 point
  12. I found the beginning of the solution. In ready.php, for example: $domainsToSwitch = [ 'domainEnOne.local' => 'default', 'domainEnTwo.local' => 'default', 'domainFrOne.local' => 'francais', 'domainFrTwo.local' => 'francais' ]; $host = config()->httpHost; if(array_key_exists($host, $domainsToSwitch)) { user()->language = wire("languages")->get($domainsToSwitch[$host]); }
    1 point
  13. @Robin S Good point, I need to update that phpdoc in that file and will. I think it'll be more convenient for users if I keep it up to date with Sanitizer, rather than removing it completely. At least I like my code editor being able to recognize them as function calls rather than errors. As far as I know, there's not anything we can do phpdoc-wise to cover instruction methods (like text50_entities), since there's basically an infinite possible combination of them. Though will be translating the blog post into regular documentation for these new additions.
    1 point
  14. I loved the minimalistic design (no images, just solid typography) on mobile. Scrolling navigation from dot menu didn't work for me. It did scroll, but usually to wrong position.
    1 point
  15. Hey @diogo I love the clean design and the opposite scrolling of text and images @ desktop resolution. However there are some flaws in the site. The mobile and tablet resolution does not show the images, and makes the whole site look boring, as it is only text. Links and text can not be distinguished, so you have to hover over the links. But this can't be done on mobile. If you click on a project at mobile resolution there is way too much white space above the text.
    1 point
  16. Hey @diogo - nice work! One thing I noticed is that it is loading quite slow for me. Several quite large images on the homepage.
    1 point
  17. Did you tried to debug the property directly? I am getting a User object just fine. I know it shows as a string in the Page object, but if you debug that property it returns a user object (at least from what I can tell in my installations)
    1 point
  18. Thanks @Robin S - really appreciate the quick fix. I actually have ~5000 siblings and it still seems to be working ok.
    1 point
  19. Just for reference, I think the easiest way to do aggregations at the moment is creating a regular finder and taking the resulting SQL as subquery and modifying it to your needs: And if you need it in your code (not in the RockFinder Tester) you need to set the SQL via $finder->sql:
    1 point
  20. @netcarver Thanks for chiming in. I just submitted a pull request on GitHub. Looks like I had submitted a bug report at the time, which this pull request resolves. I also added a password config option, and made some change to the read() method (but I don't remember what it's doing exactly).
    1 point
  21. @thetuningspoon I think you are on target here. There's a lot to be said for the InnoDB engine, and the row level locking vs table level should reduce contention and decrease latency with it. Redis, despite being single threaded, is writing to an in-memory key value store - so it's blindingly fast. I would be interested in seeing your updated code for the Redis session handler - if that's what you mean, as I need to update that module.
    1 point
  22. Since you're using Redirect / RedirectMatch, both of which are features of mod_alias, there's no way that I'm aware of to do this. What you should do is move this redirect after the "RewriteEngine On" part of the .htaccess file and use a RewriteRule (mod_rewrite): RewriteRule ^onsite2/$ http://domain.com/ [R=301,L] RewriteRule ^onsitefocusedthanks/$ http://domain.com/club/ [R=301,L]
    1 point
  23. Here's some more info: https://github.com/ryancramerdesign/ProcessWire/issues/1613 ryancramerdesign commented Language fields fallback to default when a localized version isn't available. This is one case where you may want to retrieve the localized value programatically. $value = $page->get('mytablefield' . ($user->language->isDefault() ? '' : '_' . $user->language->name));
    1 point
  24. To get a page by index number from a PageArray is easy: /* returns a page object */ $pagebyindex = $myparentpage->children->eq(integer $num); Now I needed a function which returns the Index of the page from the siblings. It took me a while to figure this out, and I like to share this here: /* returns an integer */ $indexbypage = $myparentpage->children->getItemKey($page); // or $indexbypage = $page->siblings->getItemKey($page); Found this information in http://cheatsheet.processwire.com/ under section PageArray/WireArray and here: http://processwire.com/apigen/ To get complete information about API this page is your (and my) friend. Have a nice day
    1 point
×
×
  • Create New...