Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/20/2018 in all areas

  1. This week I got kicked out of my office, by weather, a furnace, and kids. So I don't have a blog post or a version update, though I do have a lot of work in progress that you'll see next week (including an item from last week's roadmap that I think you'll really like). It's been below freezing all week, and our furnace stopped working, so now there's no heat. Something called the heat exchanger cracked, and it looked like we were going to have to get a whole new furnace. But then we learned that the one we had was still under warranty, so the manufacturer is sending a new one, but it'll take a week to get here. Luckily we've got coats and a fireplace, but houses here in Atlanta really aren't built for the cold, so it's pretty frigid at a little over 50f (10c) indoors. I hadn't really planned on typing this much, but it's keeping my hands warm, so I'll keep going. It started snowing, which is something that doesn't happen often here. It was enough cold, snow and ice that the kids school was canceled for much of the week. So I've been having fun keeping an eye on them, but it's a challenge to keep a 7-year old and 4-year old occupied and away from TV. I grew up in Minnesota, so admittedly a part of me enjoys the cold and the snow. But unlike in Minnesota, snow in Atlanta pretty much shuts everything down. In this case, it's also been so darn cold that everyone is frozen after 10 minutes outside, so nobody wants to go out there. Today is the first day where things are starting to warm up, hopefully a trend. When I say the weather kicked me out of my office, I also mean literally. The day it snowed, water started dripping out of the office ceiling, right onto my head, which is... not what you want to see. There was no entry or access to the space in the ceiling for me to get up there and see what was going on. So I had to cut open the ceiling drywall to get up there and have a look. After making a big mess, I got up there and shined a flashlight around, the scene was surreal. It was a 2 foot high attic crawlspace full of snow, with some snowdrifts nearly a foot high. That answers the question of where the water came from… overhead lights produced heat, melted the snow, and it poured into the office. But how the heck did snow get into my ceiling? And how do I get it out of there before it all melts and destroys my office? As it turns out, the day it snowed was very windy. Structures around here have something called ridge vents at the peak of the roof. They run the length of the roof and vent hot air out during the summer. But if you get the right combination of wind and snow (like sideways and upwards blasting snow) it can get into the ridge vents, and into the attic… so I've learned. The conditions must have been perfect for it, because a whole lot of the snow got in. I've never seen anything like it, and hope I don't ever have to again. I ended up spending a day carefully crawling around on joists every 16-inches in those tight and completely dark quarters, trying to get the snow out of the ceiling and insulation. With a flashlight taped to my head, toting around buckets of snow on my hands and knees, I looked pretty ridiculous. Over a day I filled several big buckets full of snow and got it out of there. It was a pain to clear it out, but certainly much better than having it melt through my office ceiling. It's not been warm enough yet to know how much snow I missed (and will melt through), but with any luck, what's left will just evaporate. That was this week's adventures, which admittedly had nothing to do with ProcessWire, but that's why this isn't a blog post. Coming next week: a new PW version (with some exciting updates), a new blog post, and hopefully a new furnace.
    11 points
  2. It's a little bit more involved that just "opening a file manager on a URL", since you have to get the necessary information back to PW, tell it to download the image in question and add it to a page field. Here's a small module that can do that, but it's little more than a starting point (no checking of that image is already there, for example, no live updating the image fields in the page editor) and that requires a rest api plugin on Zenphoto's side.
    5 points
  3. Happily skiing the pow at -6C here in Canada - the more snow, the better Although having lived through a winter in Maryland where they are not prepared for the snow (the housing and the road crews), I do feel for what Ryan is going through!
    2 points
  4. Hey fellow forum members: everyone in the Atlanta region go help Ryan shoveling snow! Everyone else - visit The Store and buy a Pro moule for the disaster relief fund!
    2 points
  5. Hehe! You made my evening Ryan . Sorry for your troubles but it's good that you are seeing the funny side of it and making the most of the situation. I miss this side of Mr Cramer! . Perhaps it's a good thing that once in a while we let the code rest and let our hair down (pun not intended!). Hope you get your furnace and office sorted soon.
    2 points
  6. @jtborger You could try to hook before Pages2Pdf::___createPDF() and change the page orientation based on the pages template: wire()->addHookBefore('Pages2Pdf::createPDF', function($event) { $page = $event->arguments('page'); $pages2pdf = $event->object; if ($page->template->name === 'your template') { $pages2pdf->getPDF()->set('pageOrientation', 'L'); } }); I'm not sure if it works though and I did not test if the above code is correct. Maybe it helps you to get started Cheers
    1 point
  7. You can also use the following code in your site/ready.php: <?php if($page->template->hasField('name-of-your-ckeditor-field')){ $string = $page->name-of-your-ckeditor-field; //create string replace for blockquote $string = str_replace('<blockquote>', '<blockquote class="blockquote">', $string); //here you can add further manipulations.... //.............. //finally set the value back with manipulations $page->name-of-your-ckeditor-field = $string; } Replace "name-of-your-ckeditor-field" with the name of your field. In this case you can use the default blockquote button from CKEditor. Best regards
    1 point
  8. Nothing extra is needed to achieve this. If you create a page that has the same title as another page under the same parent then by default PW will automatically add a digit to the end of the page name to make it unique. Unless you have a need for something different it's best to just leave it at that. But if you want to prepend the page id to the page name you can do it with a hook in /site/ready.php: $pages->addHookAfter('saveReady', function (HookEvent $event) { $page = $event->arguments(0); if($page->template != 'blog-post') return; // Only for the blog-post template if(!$page->id) return; // Skip pages that are brand new and aren't yet populated with data // If the page name doesn't start with the page id if(strpos($page->name, (string) $page->id) !== 0) { // Prepend the page id to the page name $page->name = $page->id . '-' . $page->name; } });
    1 point
  9. It just seems like this never really worked as intended, or maybe stopped working as expected. However, I just installed kixe's module mentioned earlier, and when I tried this children name format, it works: date(Y-m-d) title id gives me 2018-01-20-here-we-go-again-1043
    1 point
  10. This seems to be a problem if I use a subdirectory like http://localhost/pwtest/kickstart.php instead of http://pwtest.localhost/kickstart.php. I will check this.
    1 point
  11. Hi @bernhard. I wanted to test your module, but it does not work on my system. Maybe it's windows related. I am on Windows 10, with latest PHP/APACHE/MYSQL. When I select "Load a Kickstartfile from URL" and enter the URL to your Example Snippet from Gitlab Repo it downloads ProcessWire and after this my directory looks like this: but then the script says: "404 page not found (no site configuration or install.php available)". I would like to test and help you fix this.
    1 point
  12. @ryan Call your insurance agent to file a claim. Wind driven rain is covered under base policies. Make sure you photograph everything for the adjuster. Even if the initial claim doesn't cover your deductible, you can file a subsequent claim (same policy/claim number) to cover any future damage (highly likely) without incurring another deductible.
    1 point
  13. Oh how I love my country. Just came home from a night out with the wife, a nice dinner followed by a glass of Macallan on a terrace. A jacket and scarf with just a shirt underneath is enough. Got home, all the heating we have is a couple of cats and a gas heater for when it's really cold (by our standards), which is turned off, but temperature is perfectly fine. This while the US is going through an ice age and people are getting blown away by the wind in the Netherlands. And after I click "Submit Reply", I'm going to change into a t-shirt, fill up a hot water bottle and go to bed, feeling blessed.
    1 point
  14. 1 point
  15. The short answer is no. The longer answer is: you could add a hidden date field on the parent template and a save hook for your child template that updates the parent's date field. Then you can sort your parents by that hidden field.
    1 point
  16. The Database class inherits from mysqli. You want to use WireDatabasePDO instead.
    1 point
  17. Hi anyway, in my link (and the sublink) you can see two possible solutions: Open the dropdown on 1st click, open the link on the 2nd Show some additional link via javascript on 1st click In both cases you don't need to change the page structure (2 pages in the tree for 1 page would theoretically be possible with hooking/redirecting, but definitely not a good idea). Other options would be to add the parent as sub-item like you showed (parent trigger + parent). You could do this via javascript or via php. The point is that you don't modify the pagetree in the backend but you define what happens on the frontend (display). See https://github.com/processwire/processwire/blob/master/site-default/templates/_func.php#L61-L118 for an example of a custom pagetree render function.
    1 point
  18. New dedicated documentation website is up at https://adrianbj.github.io/TracyDebugger It's very early days still, but finally there is a home for doing a good job on the docs. It's easy to navigate with a top navbar and sidebar menu and a search term option. Once I get the key Debug Bar and Configuration settings added, I really want to do a good job on the "Tips" section because I there are a lot of users out there who are a little lost on all the things that can be achieved. Hopefully lots of updates coming in the next few days! PS - if you're more artistic than I am and you hate the logo, please let me know
    1 point
  19. It sounds like one of the factors that determines which roadmap items get attention first is the level of interest within the community (makes sense). But it would be good to have a more accurate and transparent gauge of the interest in each roadmap item. A simple solution would be to have an official Roadmap sub-forum with a topic for each roadmap item (separate from the Wishlist sub-forum). The community could then indicate their interest in each item by "liking" it, and give feedback or ideas about implementation in topic replies. My vote for most desirable roadmap item: Add support for custom properties in file/image fields.
    1 point
  20. If you're trying to install ProcessWire on a Synology NAS using the WebStation service, please refer to notes below. I've created this mainly for web searches. I'm going to assume that you're at the installation screen and the first issue you'll have is trying to connect to a database. There's 2 things here you need to note MariaDB is running on Port 3307. You're probably used to running on port 3306 and this might even be what the installation screen pre-populates The Host field must be set to localhost:3307 and not just localhost
    1 point
  21. This should be extended to something like: function formatBytes($size, $precision = 2) { $base = log($size, 1024); $suffixes = array('', 'K', 'M', 'G', 'T'); return round(pow(1024, $base - floor($base)), $precision) .' '. $suffixes[floor($base)]; } echo formatBytes(24962496); // 23.81M echo formatBytes(24962496, 0); // 24M echo formatBytes(24962496, 4); // 23.8061M *Taken from http://stackoverflow.com/questions/2510434/format-bytes-to-kilobytes-megabytes-gigabytes
    1 point
  22. Modules > Core > ProcessUser > What fields should be displayed in the page listing?
    1 point
×
×
  • Create New...