Popular Content

Showing most liked content since 12/22/2017 in all areas

  1. 41 points
    Merry Christmas and Happy Holidays to everyone! This week and next week are shortened here due to reduced school and work schedules for the holidays (as I imagine they are in most places), so there won't be a new blog post and PW version for today. With the kids home from school all day, work shifts to building stuff with legos rather than code. But there are still several interesting PW updates in progress and I look forward to writing about them in next week's blog post. The new version (3.0.87) and related blog post will likely be a day early next week (on Thursday) rather than on Friday. Thanks for reading and I hope that you and your families have a great and relaxing holiday!
  2. 30 points
    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.
  3. 22 points
    Hi y'all! Long time no see. Here's a little module aiming to help you build accessible websites ProcessWire Accessibility Tools Download: http://modules.processwire.com/modules/pwat/ Github: https://github.com/marcus-herrmann/PWAT A small, but hopefully growing toolkit for creating accessible ProcessWire sites. Right now it consists of the following little helpers: tota11y visualization toolkit by Khan Academy A toggle button to see view site in grayscale. The w3c recommends checking your page without colours to see if your design still works (accompanied by a colours contrast check, which is part of tota11y) A link to test your webpage with WAVE, webaim's Web Accessibility eValuation Tool. By the nature of this tool, the website under test must be available online, local hosts won't work. Installation Once you have downloaded PWAT, go to your module Install page and click "Check for new modules". Find "ProcessWire Accessibility Tools" and click "Install". During installation, PWAT creates a new role 'pwat_user'. To use the Accessibility Tools, you have to grant user this role. Following, you can start configuring the module. Usage PWAT starts with only the tota11y script activated. On the configuration page you can decide whether PWAT is visible on admin pages if tota11y is active if the grayscale toggle is active if the link to WAVE will be visible Credits The amazing tota11y visualization tool by Khan Academy Inspiration: Paul J. Adam's bookmarklets Inspiration: WordPress wa11y Plugin Best, marcus
  4. 17 points
    I'm very happy to share my newest module called "ProcessWire Kickstart" that I developed during the holidays Maybe some of you already saw the preview thread about this... What it does: This module makes it possible to install ProcessWire in a fully automated process. You can define all necessary settings in one single php file and you can even define "recipes" that get executed after installation. This means you can install modules, adopt settings and do whatever you want with your new site using the PW API (like creating pages and so on). You could also place a kind of frontend boilerplate on your git account and grab that after installation and place it in your templates folder. I ran out of time so maybe someone could try that out and show how he did it Additional to that there is a ProcessModule to install in your ProcessWire admin which makes creating and testing recipes super easy. Note: Alpha realese until this module gets some more testing. Please be careful with this tool since it does some heavy file system manipulations (unzipping, moving and DELETING whole directories...). Use at your own risk. Usage: Just grab a copy of the kickstarter, place it on your server, visit yournewsite.com/kickstart.php, adjust settings (like username+password) as needed and hit "install". If your mysql user does not have the rights to create a new database then you have to create a database before running the installer! Download: via SSH: cd /var/www/yournewsitedirectory wget baumrock.com/kickstart.php Manually: Klick baumrock.com/kickstart.php and upload the file to your server Note: baumrock.com/kickstart.php returns the current master file from the gitlab repo and changes the namespace of the script so that it can install itself via recipe. If you don't need to install the kickstart processmodule via recipe you could also download the kickstart.php file from gitlab. Screenshots/Walkthrough: The initial Screen: You can either upload a file via the left panel or take my example file from the gitlab repo: This way you can create your own kickstartfiles and host it on your own accounts. When the file is loaded you can easily edit all necessary informations, like username, password and the url where to grab ProcessWire from. I just tried it with an old version as well... 2.7 worked just fine (having the old installer that recently was updated) but an ancient 2.2.4 version failed. I don't think anybody will ever need to install lots of old versions of pw with this tool but I wanted to mention it here. Hit "install" and lean back - on my VPS it takes 15 seconds to install my very own custom version of processwire with all modules that i need After logging into your admin you'll see that all modules from your recipe are installed: Recipe Editor: As recipes are executed after processwire was installed you have all your API magic available there. Running this scripts is only possible inside of a working processwire installation, so I created a module to help you with that task. See the comments of the sample recipe for more information! I hope this tool helps you to save lots of time and create lots of awesome ProcessWire websites I would be happy to see how you use this and please share useful recipes here in the thread so that everybody can profit. Maybe you just want to throw in an idea what could be done (for example I can imagine a recipe that checks file permissions on the system after installation)... Some parts of the code and maybe also part of the idea are taken from @Soma 's old and still great online installer, thx for that!
  5. 15 points
    https://github.com/thuijzer/processwire-FieldtypeBusinessHours Fieldtype Business Hours ProcessWire Fieldtype for entering business hours (opening hours) Input format Leave a day empty when closed on that day Times are in 24 hour format. 9:00-12:00 9:00-12:00, 13:00-17:30 16:00-2:00 Usage in templates Days are from 1 to 7 where 1 is Monday and 7 is Sunday (ISO-8601) echo $page->field_name->isNowOpen() ? 'Now open' : 'Now closed'; if($page->field_name[1] == null) { echo 'Closed on Monday'; } if($page->field_name[2]->inRange('11:00')) { echo 'Tuesday at 11:00 open'; } echo $page->field_name[1]; echo $page->field_name[1]->getEntries()->getFrom()->format('H:i');
  6. 15 points
    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.
  7. 14 points
    In this post, we take a look at all that was covered in 2017, and our roadmap for 2018, which includes plans for the year ahead. https://processwire.com/blog/posts/processwire-2018-roadmap/
  8. 14 points
    If you've ever needed to insert links to a large number of files within CKEditor you may have found that the standard PW link modal is a somewhat slow way to do it. This module provides a quicker way to insert links to files on the page being edited. You can insert a link to an individual file, or insert an unordered list of links to all files on the page with a single click. CKEditor Link Files Adds a menu to CKEditor to allow the quick insertion of links to files on the page being edited. Features Hover a menu item to see the "Description" of the corresponding file (if present). Click a menu item to insert a link to the corresponding file at the current cursor position. The filename is used as the link text. If you Alt-click a menu item the file description is used as the link text (with fallback to filename if no description entered). If text is currently selected in the editor then the selected text is used as the link text. Click "* Insert links to all files *" to insert an unordered list of links to all files on the page. Also works with the Alt-click option. Menu is built via AJAX so newly uploaded files are included in the menu without the page needing to be saved. However, descriptions are not available for newly uploaded files until the page is saved. Installation Install the CKEditor Link Files module. For any CKEditor field where you want the "Insert link to file" dropdown menu to appear in the CKEditor toolbar, visit the field settings and add "LinkFilesMenu" to the "CKEditor Toolbar" settings field. http://modules.processwire.com/modules/cke-link-files/ https://github.com/Toutouwai/CkeLinkFiles
  9. 14 points
    For our final dev branch version of 2017, we've added a couple new features that I think you'll find useful. For starters, we've added drag-and-drop (and paste) image upload support to our richtext editor (CKEditor), which is really handy. We've got all the details and a short screencast here as well. https://processwire.com/blog/posts/pw-3.0.87/
  10. 13 points
    A module for managing files and folders. Supports creating, opening (e.g. viewing, playing, editing), renaming, moving, copying, deleting and searching for files. You can also view and change (not supported on Windows) file and directory permissions. https://github.com/matjazpotocnik/ProcessFileManager The author of FileManager component is (c) 2006 - 2018 Gerd Tentler, http://www.gerd-tentler.de/tools/filemanager/. I modified it to work with ProcessWire as a module. Please see license files on usage in commercial projects!
  11. 13 points
    Woah! Put down your counter arguments. Now I've got your attention, hope you all have a great Christmas
  12. 11 points
    I mentioned last week that we'd look at the roadmap this week. I'm actually still working on that, so will post the 2018 roadmap next week instead. But I do have a version update this week which adds some useful tools to our images field in the admin (InputfieldImage), and I think this is one that both you and your clients will find really handy. https://processwire.com/blog/posts/pw-3.0.88/
  13. 10 points
    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
  14. 10 points
    Hey thmsnhl, I'm using ProcessWire for a few projects at work as well as for my personal projects. Originally coming from Ruby On Rails I also encountered problems with our database synchronization when it comes to team development on a single project. Depending on the project we solved this using Field/Template Export/Import while also only working on certain parts of the page. Most projects are already finished in terms of template/field structure so there is no need to have an always up-to-date local database snapshot. If the project is not finished in terms of template/field structure we usually sit together and draft a "this-solves-everything"-kind of template/field and synchronize this to our local databases once and then just code ahead. Other frameworks solve this by using Migrations and although ProcessWire does not support Migrations in the core (as of now) you can use this module: https://modules.processwire.com/modules/migrations/ (Here are a few code samples and documentation: https://lostkobrakai.github.io/Migrations/). This module does not directly add tables and columns to the database like RoR migrations do but instead allows you to do nearly everything you can do in the Admin UI using code. You can for example create templates, move fields around, install modules, setup users etc. It can be a bit tedious at first to learn all the new APIs this module offers but the benefits, especially for large projects, speak for themselves. These migrations can be safely checked into your git repository and whenever one of your teammates encounters a problem with his out-to-date database he can simply run the migrations files. So instead of adding templates and fields on production you write them in code and deploy your changes to production, then you migrate either using the CLI utility or the admin backend. You can also integrate this into your build toolchain (like Amazon CodeStar). Check this code example I bet it feels quite familiar: <?php class Migration_2018_01_16_12_32 extends Migration { public static $description = "Add postalcode to a hotel"; public function update() { $this->insertIntoTemplate('hotel', 'postalcode', 'title'); $this->editInTemplateContext('home', 'postalcode', function($f){ $f->label = "Hotel Postalcode"; $f->columnWidth = 50; }); } public function downgrade() { $t = $this->templates->get('hotel'); $t->fieldgroup->remove('postalcode'); $t->fieldgroup->save(); } } This adds a `postalcode` field right after the title field to the hotel template. And it removes this field when you rollback your migration. This is how we tackle this problem.
  15. 10 points
    Assuming you want to walk the whole tree top down with your next button, here's a snippet for site/ready.php that adds getPrevPage/getNextPage methods to Page objects: wire()->addHook("Page::nextPage", null, "getNextPage"); wire()->addHook("Page::prevPage", null, "getPrevPage"); function getNextPage(HookEvent $event) { $startpage = $event->object; if($startpage->children()->count() > 0) { $event->return = $startpage->children()->first(); return; } while($startpage->parent->children()->last() == $startpage) { $startpage = $startpage->parent(); if($startpage->parent instanceof NullPage) { $event->return = wire("pages")->get('/'); return; } } $event->return = $startpage->next(); $event->replace = true; } function getPrevPage(HookEvent $event) { $startpage = $event->object; if($startpage->parent() instanceof NullPage) { $startpage = $startpage->children()->last(); } else { if($startpage->parent()->children()->first() != $startpage) { $startpage = $startpage->prev(); } else { $event->return = $startpage->parent(); return; } } while($startpage->children()->count() > 0) { $startpage = $startpage->children()->last(); } $event->return = $startpage; $event->replace = true; } Then, in your template, you can add prev/next links like this: <p> <?php $prevUrl = $page->prevPage()->url; $nextUrl = $page->nextPage()->url; ?> <a href="<?= $prevUrl ?>">&lt; PREV</a> <a href="<?= $nextUrl ?>">NEXT &gt;</a> </p> Both methods loop around home when the first/last page in the tree is reached.
  16. 10 points
    To get you started, I give you an example of an ajax request triggered by a noUiSlider's event which update the markup. Do not hesitate to ask if you don't understand something. Javascript code : // slider element var slider = document.getElementById('noUiSlider'); // create the slider object noUiSlider.create(slider, { start: [0, 100], step: 1, // avoid float values range: { 'min': 0, 'max': 100 } }); // change the value when noUiSlider values are updated slider.noUiSlider.on('update', function( values, handle ) { if ( handle ) { $("#noUiSlider-data").data("max", values[handle]); } else { $("#noUiSlider-data").data("min", values[handle]); } }); // on event 'set' send ajax request slider.noUiSlider.on('set', function( values, handle ) { // get the min and max from the data attribute of #noUiSlider-data $data = {min: $("#noUiSlider-data").data("min"), max: $("#noUiSlider-data").data("max")}; // ajax request $.ajax({ url: $(this).data('url'), // url from the data attribute of #noUiSlider type: "post", data: $data }).done(function (response, textStatus, jqXHR) { $('#list').html(response); // write markup to #list element }) }); PHP code : <?php namespace ProcessWire; $list = ''; $limit = 100; if(isset($input->post->min) && isset($input->post->max)) { $min = $input->post->min; // don't forget to sanitize $max = $input->post->max; // don't forget to sanitize $li = ''; $products = $pages->find("template=product, start=$min, limit=$max"); // let assume there is a template 'product' foreach ($products as $product) { $li .= "<li>". $product->title . "</li>"; } $list = "<ol>$li</ol>"; echo $list; } ?> HTML Markup : <div id="noUiSlider" data-url="<?= $page->url; ?>"></div> <span id="noUiSlider-data"></span> <div id="list"> <?= $list ?> </div> #noUiSlider is the slider element #noUiSlider-data will contain values changed from the #uiSlider element #list is the element updated by the ajax response enjoy
  17. 9 points
    Theres a CMS voting on a known german website: https://www.drweb.de/welches-cms-verwendest-web-projekte/ And the interesting part: 5th Place in the ranking is very nice and theres a planned test of processwire on drweb.de 1. WordPress 2. Typo3 3. Joomla 4. Contao 5. Processwire 6. Drupal
  18. 9 points
    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.
  19. 9 points
    If anybody wants to steal some code (or use that little module as is, of course), feel free...
  20. 9 points
    Welcome to the forum @FireDaemon Did you read this page? https://processwire.com/docs/security/admin/ Yes. In fact, during install process you are asked if you want to rename it. But you can do it later also. You could try this module. Yes That's already in core: see https://processwire.com/docs/security/admin/#preventing-dictionary-attacks In a test-environment, you can further add stuff like .htaccess allow/deny rules, i.e. only allow access from certain IPs.
  21. 8 points
    Hi, I just want to thank to flydev and everyone else who has contributed to this wonderful module. For me, Duplicator It has worked flawlesly to make backups and bring those backups to my local machine to test new functionality. Sincerely a fellow Processwire developer.
  22. 8 points
    That's an amazing list of 2017's features. Seeing them in a single place makes you appreciate how lucky we and our clients are. Thanks for another incredible year of updates. I imagine everyone's wish list is different. This is what I'd like to see natively in PW. I know some of these are already available as Modules so no offence if you're reading this and have already put tons of work into creating something similar. Processwire Multi-Admin A Processwire dashboard which allows me to monitor multiple installs across different servers. This dashboard would list my installs, version number, and display available upgrades (Module and Core) and allow me to update above from central place. It might show me logged in user(s), uptime etc. Media Manager A built in MM which acts as a single place to manage all uploads. Using the MM you can find, list and edit any uploaded file/image. and its versions. Add tags, crop, delete, rename, copy, bulk upload etc Furthermore the MM should work with user permissions so a MM for me might list different assets than an editor etc Importantly, the look of the MM would be consistent with what's already in place and the new UI Kit theme. SEO A native SEO Module that is maintained and updated as modern SEO evolves. Image Cropping Pre-set image crops and a way to define and manage them. That's it :-/
  23. 8 points
    Hi Guys It would be awesome when all the resource about processwire (tutorials, docs, cheatsheet, recipes, videos, api, faq etc...) would be unified on one documentation website called "docs.processwire.com". The new site would gather infos & data from these resources: https://processwire-recipes.com/ http://processwire.tv/ https://www.pwtuts.com/ https://processwire.com/docs/ http://cheatsheet.processwire.com/ and would unified it on the final site https://docs.processwire.com. I think It is far more better to have one endpoint for all the processwire resources & wisdom then mutliple sites. This way it is far more easier to get into the processwire world and choosing processwire as the next main cms for further projects. The Documentation Site could perhaps look like this (it is just a mockup, so don't expect to much from me ):
  24. 8 points
    I am very glad that you have joined our ProcessWire community, however I'm wondering when are you going to author a post about your use of ProcessWire? You ask very good questions about PHP, other frameworks and other CMS platforms in comparison to ProcessWIre. Our community members have been extremely gracious in answering these questions. Don't get me wrong, these questions have merit, and as Off-topic conversations fit within what the forum is about. What I haven't seen is where you are asking for help building a ProcessWire site or having a problem with a ProcessWire module, inputfield, backup or anything website building related. That's just an observation that I have made over time in reviewing all of your postings so far. I look forward to your additional Off-Topic postings and please don't take this as a criticism. I enjoy the wealth of interaction on the ProcessWire forum regardless of the subject and have looked forward to reading everyone's comments for the last few years. Respectfully, Charles
  25. 8 points
    Although Vue is being marketed as "incrementally adoptable" it is still aimed to become something react-like as I see it. That is a framework, that is to be used on a frontend, completely decoupled from the backend. In such architecture backend only serves data to a frontend via something like REST or GraphQL. And all the routing and markup generation is done on the frontend, in the browser. ProcessWire surely can be used in that scenario (just follow the provided links), but in 99% of cases I heard about it is used in an "old-fashioned" way, with routing and markup generation done on the server (backend) and served via page reload, not ajax+in-browser state change+framework like Vue. That means most examples here on the forums will be more relevant to such a usage. Ryan is building at least his demo sites this classic way. Vue is something from the new frontend oriented world. JQuery is something from that "classic" web-development world, which is still dominant. JQuery is used throughout the PW core and modules code. And that code is a very good manual in itself. So learning JQuery with PW will be easier. And (should it be first) PW API is known to be inspired by JQuery. Isn't it the ONE reason to learn JQuery first if going with PW? So, for now, I would say JQuery is a better start to be used with ProcessWire.
  26. 8 points
    I don't really think it's one or the other. jquery is more a library and Vue a framework. I know it can be a fine line between the two, but something to be aware of. jQuery is still everywhere and very useful for simple DOM manipulation tasks. Mind you I would also suggest that you should learn plain javascript first - having that foundation will serve you well and make it easier to pick up the next trendy JS framework. Also, why load up jQuery for one simple thing that could easily be achieved in plain JS? Obviously Vue is becoming a popular framework, but a couple of years ago it was all Angular, and before that it was .... well you get my point. I do think that Vue is a good choice for a full blown framework right now though.
  27. 7 points
    Since I was stuck to my flat today I took up a wish and rolled a Process module / CKEditor plugin combo that adds @-autocomplete like the mentions here in the forum to CKEditor fields. It's configurable, but only in module settings for now, the positioning of the select list is quite off and there's still some visual work to be done, so it is in early alpha state. Nonetheless, if you want to take a look, here it is: https://github.com/BitPoet/ProcessMention After installation, you may want to look into the "Additional selector" entry in the module's settings. You will most likely want to limit results to certain templates there. Edit: Updated to version 0.0.30 with fixed positioning of the dropdown. Edit2: Settings are configurable in field context now. If pwmentions is enabled, the according settings are shown on the "Input" tab.
  28. 7 points
    I would like to add something else to this already great discussion, and this is about the rate of new features and changes introduced in ProcessWire. While the last few year's new features are impressive, they keep introducing so many minor issues that – while they are truly minor – they have already accumulated to the point where I cannot see how each of them will get sorted out in the future. Leaving these issues behind in the dust will make ProcessWire less robust in the long run. Do not get me wrong, I do no think ProcessWire is in any sort of trouble just yet but recently I stopped updating to new dev versions fearing that I might break a site. The last stable is v3.0.62 from May 5, 2017. I would love to see a feature freeze so that a new stable and somewhat tested version can be released.
  29. 7 points
    totally agree! right now it sometimes seems that the interest is measured by "who shouts loudest"... but we had several examples where users didn't show their interest because the feature has been on the roadmap for a while so nobody said anything about it and waited for a surprise in the next blogpost. just if it was requested this is great example of what robin is talking about. informations about upcoming features are spread over the forum (wishlist) and github... so i want to support robins request and maybe extend it a little bit towards "better community management". we had one occasion where @ryan implemented something that was already available as a module (image tagging). don't get me wrong, of course i prefer solid solutions built into the core over 3rd party modules (i was voting for the predefined-crop-in-the-core-feature for a long time), but i would love to see a little more discussion and community involvment here. i can imagine that this can eat up a lot of time if done wrong - but i think it can also save time if done right. for example the community could do some research (like in the github link above), bring in ideas or point ryan to already existing solutions like it was the case with image tagging. finally i want to thank everybody contributing to this project and helping me out in the forum. i had a great 2017 and it would not have been possible without this awesome product and community! happy and successful 2018 to everybody
  30. 7 points
    In /site/ready.php: $wire->addHookBefore('ProcessPageLister::execute', function(HookEvent $event) { $lister = $event->object; $lister->nativeDateFormat = 'd.m.y'; }); See here for the format options: https://processwire.com/api/ref/datetime/date/
  31. 7 points
    if($flip) { echo "H" } You are exactly right, I think you just miss a thought: The condition relates to the value of $flip. The value is either 0 or 1. And in PHP, 1 in a condition is “like” true, and 0 is “like” false. So $flip may be 1. In that case PHP will coerce it to true and finally print H because the condition is met. If $flip is 0, PHP will coerce that to false and print T because the condition for the if() was not met. So the else block is executed. Hope that helps?
  32. 7 points
    I chucked up a tutorial here: https://www.pwtuts.com/processwire-tutorials/making-a-custom-admin-theme-using-uikit-3-and-the-included-build-tools/ Hoping this method will become redundant though if I can get my head round building a module to change the colours etc. Something to work on in January (without distracting me from my JS which I should be doing...).
  33. 7 points
    Radio Hala96 FM is a radio service that aims to promote the community through presenting a program map with creativity and thought for all groups. On March 15, 2014, Hala began a live broadcast with a unique programming program that brings you daily on a useful and exciting weekend trip. The Website Is Developed By I&S Group & Powered By The Great ProcessWire & It's Awesomeness That We All Love. .
  34. 6 points
    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.
  35. 6 points
    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.
  36. 6 points
    HI @lickny2001 Try to use "insertAfter" method https://processwire.com/api/ref/wire-array/insert-after/
  37. 6 points
    Hi @cosmicsafari Just look in the cache directory for a file called LazyCronLock.cache. If it is there for more than half a minute (or however long you estimate your code should run for) then delete it to unjam LazyCron. If this keeps happening, then there could be something in your hook method that is timing out and leaving the lock file there. Here's some code to return the location of the file if you want to do it programmatically... function getLazyCronLockfileName() { return wire('config')->paths->cache . "LazyCronLock.cache"; }
  38. 6 points
    I usually go by @rafaoski's approach. I first go to http://www.favicomatic.com/, upload a 500x500 image to generate a full icon pack. Then I place the icons in their own folder inside the templates folder. Usually /site/templates/img/favicon/ Favicomatic gives you a rather large HTML snippet. Slap that on your template, and on each line that points to a file, you'll have to fix the url, like so: <link rel="icon" type="image/x-icon" href="<?= $config->urls->templates ?>img/favicon/favicon.ico">
  39. 6 points
    this should work : $field = $fields->get('comments'); $comments = $field->type->find($field, "sort=-created");
  40. 6 points
    If you haven't heard about it yet you should read about these new vulnerabilities that affect almost any computer built since 1995 https://en.wikipedia.org/wiki/Meltdown_(security_vulnerability) https://en.wikipedia.org/wiki/Spectre_(security_vulnerability) https://insights.ubuntu.com/2018/01/04/ubuntu-updates-for-the-meltdown-spectre-vulnerabilities/
  41. 6 points
    https://polarartistit.fi/ https://bomba.fi/ Webstores (developed by Tuspe): https://sajt.fi/ https://kupilka.fi/ (shop is only for visitors from Finland) https://tommisoidinmakiproduction.com/ Events: https://osuuskaupparock.fi/ https://karhurock.com/ We have made almost 100 projects already.
  42. 6 points
    https://www.youtube.com/watch?v=I5mRwzVvFGE but we should not forget this one either: https://www.techrepublic.com/article/is-the-intel-management-engine-a-backdoor/ "Is the Intel Management Engine a backdoor? Yes, of course it is. By its very definition (from Wikipedia): A backdoor is a method, often secret, of bypassing normal authentication in a product, computer system, cryptosystem or algorithm etc. Backdoors are often used for securing unauthorized remote access to a computer, or obtaining access to plaintext in cryptographic systems." By definition Meltdown and Spectre are also backdoors, intentionally designed ones, btw. We are talking about hardware intentionally implemented to bypass security checks by design. It was just not "advertised". @bernhard Please change the title. I get the joke but it is quite misleading...
  43. 6 points
    Love the image actions feature, thanks! Especially looking forward to this one... ...as I had a need for this recently. I don't intend to give users access to the "special effect" options (B&W and sepia) for the same reason I wouldn't give users the ability to change fonts or text colours - there's always some editor who considers themselves an "artist" and will take a carefully designed site and turn it into a dogs breakfast. In case anyone else feels the same, it's simple to remove these with a hook in /site/ready.php: $wire->addHookAfter('InputfieldImage::getFileActions', function(HookEvent $event) { $actions = $event->return; unset($actions['bw']); unset($actions['sep']); $event->return = $actions; });
  44. 6 points
    Bernhard i wrote it and i repeat it you are really my hero - the admin/backend was always a ? to me since i was flashed about all the options on the frontendside with the API, creating some little modules or changing some or using small hooks to get some results are the level i was before i read your tutorials and examples...:) Wanna share a really cool example im playing with this responsive calendar plugin: https://tympanus.net/Development/Calendario/ in an easy process module i get some results like this (with some CSS tweaks): This is with the example data from but it works like a charm and is seemless responsive within the PW admin. Code i used on the PW side is really easy: now i'm getting hands dirty on trigger some booking data and some actionbuttons... Thank you for sharing your knowlegde! I wish you a healthy and successfull year - best regards mr-fan
  45. 6 points
    This one I can't duplicate yet. I'm also running the latest Chrome, except in OS X rather than Windows. I also tested in Firefox and was not able to duplicate it there either. Maybe there is a platform difference I need to look closer at. But you mentioned that after saving the page, everything worked. I'm guessing a JS error is happening somewhere in the process. Try enabling debug mode $config->debug=true; in /site/config.php, and watch your Chrome JS console for any JS errors that might appear in the process, whether from the CKEditor field, or possibly another field in the page editor at the same time. Edit—see further down for my response to the JS error you found. Paste doesn't work in Firefox for me either. As far as I can tell, this CKE plugin doesn't support the paste action in Firefox. It looks like Firefox uses a different type of raw data when it comes to paste that might require Firefox specific code. I haven't looked very far yet though. Okay I think this may possibly be what the issue is with the first issue. Try registering under some name other than "mystyles", which is just what we used for example purposes, but better to choose your own name. It looks like it might be colliding with some built-in example and creating the JS error. The croppable image field is a 3rd party plugin, so I'm not sure to what extent it might support this feature. But if it extends FieldtypeImage, then chances are that it will work for uploads as well. I'm not sure I understand what you mean by "fetches all images"? This feature only uploads images. It sounds like maybe you are talking about the image insert dialog, where you can select from images that are already uploaded? If that's the case, go to Modules > Configure > ProcessPageEditImageSelect. In the settings, you can specify the images fields that it should ignore. You'll want to add your croppable image field there (if you don't want it available for CKE). This new CKE upload feature also honors the setting you specify there. I can't duplicate this one either, but since we know where it's occurring I can add some code to avoid it. What we're seeing there is a $page that has no template assigned, somehow. I'm guessing another module is triggering with a NullPage, which is why template is empty. I'll add a detection for that and commit it in a few mins. I'm pretty sure that'll fix it.
  46. 6 points
    here is a screenshot of a dashboard, i'm using a simple grid framework + a free admin theme (AdminLTE 2) + masonry for the 'widgets'; i use 3-4 types of widgets, one is a set of shortcuts which is configurable to show on different users, or access levels; this allows individual users to have their own custom set of shortcuts if needed. The other types of widgets are a mini lister, and a formbuilder list; The formbuilder list can display recent submissions to various forms, and is helpful for admins who want to see a quick overview of recent submissions.
  47. 6 points
    I'm quite impressed by https://canadabusiness.ca/ They built a full-blown REST server with ProcessWire: https://canadabusiness.ca/developer/docs/ And widgets too: https://canadabusiness.ca/developer/widgets/ Does anybody know who built this site?
  48. 6 points
    Definitely agree with what @adrian say. If you are new to JS world, IMHO, I would suggest this learning curve: JS -> ES6 -> jQuery -> Vue / Angular / React https://scotch.io/bar-talk/vuejs-vs-jquery-use-cases-and-comparison-with-examples http://youmightnotneedjquery.com
  49. 5 points
    Just thought I would share this cool new chrome/firefox addon for https://insight.io that I discovered. It allows you to quickly search or view the folder/file hierarchy of a repository inside of github. It also allows you to list the methods of a class It's very similar to https://chrome.google.com/webstore/detail/octotree/bkhaagjahfmjljalopjnoealnfndnagc, but provides more features. On the github repo page it shows a insight.io button where you can view the current file on github that you are looking at on insight.io for more features like where specific functions are referenced. Note: I'm not affiliated with that company. I just thought it was helpful.
  50. 5 points
    @Robin S - sure, here is some info on how i use page flags (sorry if this is off-topic and/or verbose!) 1) i setup a (page reference) field to hold flags for any page (usually I use chosen select, but ASM select is also good for this); Users have to be able to add flags. 2) I start traversing through a type of content, (in this case the musical works of a pretty famous composer), and find problems; for this project the works were imported from another system, and now need to be cleaned up; the flags helps us to track, group, filter the works that have certain issues, or maybe need attention from some specialized member of the team; I have also setup a certain amount of auto-flagging, just by checking the fields on save and adding the flag if problems are found – for example (on a different site) the admins want to add a subscription form strategically inside the body content of their blog posts; there was no easy way to do that except by manually adding the hanna code to the body copy where they want it; But they have several hundred blog posts and don't know which ones they missed; so i have the system scan the body field for the hanna code and if not there, add the 'missing subscribe form' flag to those posts.