Leaderboard
Popular Content
Showing content with the highest reputation on 02/05/2021 in all areas
-
This week ProcessWire gained powerful new tools for finding pages and controlling how they are loaded. If you like to maximize performance and efficiency, you’ll like what 3.0.172 brings— https://processwire.com/blog/posts/find-faster-and-more-efficiently/10 points
-
For advanced needs there is a module from @Robin S : https://processwire.com/talk/topic/21153-access-by-query-string/ But if you need something really quick and simple, just put that in your init.php: if($input->get('code', 'string') === 'YOURSECRET') { // remove the unpublished state in memory (non-persistant) $pages->get('/yourpage')->removeStatus('unpublished'); } This makes /yourpage accessible via /yourpage/?code=YOURSECRET ? PS: I had this need today to show a page to a user that has no login and to make sure that the page is also excluded from search results (that's why just hiding the page would not have been enough).3 points
-
Nice tip!! To elaborate on other examples, I do something like this to have this same "code to view" per page (in the sense of one code per page) like this on ready.php: if(!$user->isLoggedIn()){ wire()->addHookAfter('Page(template=sometemplate)::viewable', function($event){ $page = $event->object; $pass = wire('input')->get->text('pass'); if($page->page_pass && $pass){ if($page->isUnpublished() && $pass == $page->page_pass){ $event->return = true; } } }); }3 points
-
@ryan - this sounds like another awesome update! Admittedly I haven't played with this new version yet, but my initial thought after reading the blog post is whether we could have a: $pages->find("$selector, field=all"); as a complement to: $pages->find("$selector, field=none"); For many pages/templates, I always need to access all fields on every load and this would make it much simpler than listing out all the fields separately. Does that sound like a useful addition?2 points
-
Nice clean site. Although I'm on the other side of the world, I remember seeing Shetland calendars and other things most years, because in the pre-internet days Mum made a pen-friend connection with a Shetland woman with the same first name as her. I believe the two were put in contact by a publication run by Enid Blyton - yes The Enid Blyton of Famous Five fame. Mum's never been to Shetland nor has her pen friend ever been to New Zealand, but in our family we've always had this kind of long distance connection. I have an idea that my brother's mother-in-law actually has relatives from Shetland, so the connection there is even stronger.2 points
-
Try @tpr's essential AdminOnSteroids module which packages everything needed for this to work.2 points
-
2 points
-
Breadcrumb Dropdowns Adds dropdown menus of page edit links to the breadcrumbs in Page Edit. The module also adds dropdowns in Edit Template, Edit Field, Edit User, Edit Role, Edit Permission, Edit Language, and when viewing a log file at Setup > Logs. Configuration options Features/details The module adds an additional breadcrumb item at the end for the currently edited page. That's because I think it's more intuitive for the dropdown under each breadcrumb item to show the item's sibling pages rather than the item's child pages. In the dropdown menus the current page and the current page's parents are highlighted in a crimson colour to make it easier to quickly locate them in case you want to edit the next or previous sibling page. Unpublished and hidden pages are indicated in the dropdowns with similar styling to that used in Page List. If the option to include uneditable pages is selected then those pages are indicated by italics with a reduced text opacity and the "not-allowed" cursor is shown on hover. There is a limit of 25 pages per dropdown for performance reasons and to avoid the dropdown becoming unwieldy. If the current user is allowed to add new pages under the parent page an "Add New" link is shown at the bottom of the breadcrumb dropdown. If the currently edited page has children or the user may add children, a caret at the end of the breadcrumbs reveals a dropdown of up to the first 25 children and/or an "Add New" link. Overriding the listed siblings for a page If you want to override the siblings that are listed in the Page Edit dropdowns you can hook the BreadcrumbDropdowns::getSiblings method and change the returned PageArray. For most use cases this won't be necessary. Incompatibilities This module replaces the AdminThemeUikit::renderBreadcrumbs method so will potentially be incompatible with other modules that hook the same method. https://modules.processwire.com/modules/breadcrumb-dropdowns/ https://github.com/Toutouwai/BreadcrumbDropdowns1 point
-
Just wondering... A client called me yesterday: "Bernhard, I deleted a project, can you restore that?" It was not that simple, because that project had related pages that have also been trashed. Restoring those pages would have been a lot easier if the trash in the page tree showed the trashed pages sorted by time of deletion. What do you think? How to you find such pages quickly? Am I missing anything? I've used a custom $pages->find() in tracy console to get what I want...1 point
-
Ok this one is mindblowing, looks like a perfect upgrade from the solution I'm currently using. I'm getting by with a repeater and a modded version of FieldtypeSelectFile that basically lets you select a php from a given content blocks directory, assumes there's a png that goes with it, and renders a neat block selector. From there, it's just hiding and showing fields depending on the value of that selector. It's not the most elegant of solutions from the "setting up" perspective, but quite nice and comprehensive for the editor and the php code on the frontend super understandable. Brad seems to try to do just enough. Looks great for custom, controlled content blocks. Too much freedom and the editor usually makes a mess ?1 point
-
Oh yeah, that's good news! ? And also requiredIf is possible too! Thanks @Robin S1 point
-
@schwarzdesign Thanks for reporting. I'm afraid there's no easy solution without changing how the core handles user edit permissions. Currently, the editable() check fails for all processes other than the default page-edit or page-lister ones. That's why it doesn't work in the context of the Dashboard process. See the corresponding source code of PagePermissions.module. I'm not sure why it's done this way and if there's a chance to get this opened up. I'd suggest you open an issue in the official ProcessWire repo to get a discussion started. Checking for user-admin permissions as a special case sounds good but won't solve the problem: the user permissions are a lot more complex when you're handling superusers vs. non-superusers and multi-layer permission systems. There's user-admin-all and any combination of user-admin-[role] permissions we'd have to check manually. It's definitely better than the current state, though. I might implement this in the near future.1 point
-
https://www.planethoster.com/en/ https://www.planethoster.com/en/World-Hosting (see more details below the reviews. Example: "a pool of resources and you decide how to distribute them".) (But you also have https://www.planethoster.com/en/HybridCloud-Servers if needed.) Servers in France (Paris) and/or Canada (Montreal). 8 CPU - 16 GB RAM - 16 MB/s I/O cPanel and now also N0C. Several languages, several database types, etc. Free domain name. Cheaper if you take 2 or 3 years instead of one. Several important and interesting discounts available: https://docs.planethoster.com/guide/facturation/code-promo-rabais-remise-promotion (In French but you can google-translate it if needed. I can't find it in English.) Random example among others: "7- Obtenez la période restante prépayée chez un compétiteur en mensualité(s) gratuite(s) PlanetHoster." Also: https://www.planethoster.com/en/Affiliates But you cannot accumulate discounts (from code-promo-rabais-remise-promotion or Affiliates). Normally you automatically have a 15% discount that is activated when you are a new client/customer (or you can copy a promo code manually). Several currencies. Free World Lite. VIP option: Includes all the features of the World Platform - Free private WHOIS for all your domain names - Free premium VPN (multiple locations!) - LITESPEED + LSCache Etc. Added: PHA-awin (promo code to have 25% currently. I don't know how long it will be valid. This one already existed before.) Non-profit entities."25 % de remise/rabais pour les organismes à but non-lucratif (OSBL)". Then the second year and more: -10%.1 point
-
For some projects I'm using business hosting from one of the best hoster in Urkaine https://www.ukraine.com.ua/en/business-hosting/. They have one of the most feature-rich control panel that I have ever seen. There is an option to locate your account in a German data centre. So I would recommend it to try.1 point