Leaderboard
Popular Content
Showing content with the highest reputation on 12/25/2021 in all areas
-
This week there have been various small core updates and fixes but the biggest change was to the installer in 3.0.191. Last week we removed all but the site-blank profile from the core, cutting in half the size of the core. And because of this, the installer now needed to provide more direction about downloading and installing other site profiles. So it now does that and it also links to a new page that describes all of the past and current site profiles, along with additional details on how to create and install site profiles. Speaking of creating site profiles, the Profile Exporter module was also updated this week. It is now PW 3.x exclusive and is updated to recognize and work with various aspects and $config properties that are specific to 3.x. ProcessWire 3.0.191+ and the Profile Exporter module now support a custom /site/install/finish.php file which is a template file that is called when installation of a new ProcessWire and site profile has finished, but before it has cleaned up the installer. It is a plain PHP file that has access to PW's API and the installer, so it can do pretty much anything you could do from a regular template file or module. I added this because I noticed a few issue reports for the Profile Exporter module were requesting support of one thing or another, and I found that nearly all of them could be added just by having a profile-specific finishing file, for those that want it. So if you want your site profile to perform any other types of customizations on top of what you can already do with a site profile, this is the place to do it. This is where things are at this week but perhaps we'll continue to go further with the installer in supporting more things too in the new year, as there have been several good ideas. Thanks for reading and I hope that you all have a Merry Christmas and/or Happy Holidays!6 points
-
Reminds me of this: nette.org ? Back to topic: My most important tools: VSCode + Intelephense + PWSnippets TracyDebugger (!!) RockMigrations Formerly Laragon now DDEV3 points
-
Hi Ryan, Big thanks for doing this, as it adds to beginners friendly and jump start with Processwire. Merry christmas to the Processwire Family2 points
-
Over the years, I've experimented with using RepeaterMatrix as the basis of a rich page builder. I've gone through at least a dozen concepts, most of which hit the chopping block due to either being too complex, not well thought out, too clever or too limiting. To my knowledge, the only other CMS that takes the "Builder" approach that I've demonstrated is DjangoCMS (meaning, it has a matrix-like field with depth support). While the "Builder" approach works well, it could be too advanced for some people. Therefore the other approach is the "Classic" approach where you don't deal with containers/rows/columns (which instead is handled by template code), and simply enter the content in the respective field. This is easy to understand, but has drawbacks in terms of flexibility. If it were made to be too flexible, it would become a "God" block which is bad. Then I finally thought of a third approach which is a mix between the Builder and Classic approach. It uses the basic builder blocks, combined with the layout from the matrix item template file. By using the basic builder blocks, you get the plethora of options. It requires an extra page to be created behind the scenes however, but live preview still works. I made a video comparing all the above (10m duration). I want to hear your feedback on this as I am ~75% done with my super module (doing a lot of code and concept cleaning at this point) and want to finish off this portion of it. (note: I'm posting this in the Dev Talk forum since this is a discussion / not support request)1 point
-
15 inch MacBook Pro, no external monitors. I'm used to pretty small print — cranking the resolution setting to max space and then decreasing the font size a few times works wonders ?1 point
-
Sorry, I still don't get what you guys are trying to do here. What problem are you solving? Don't get me wrong - I don't want to discredit your work just trying to understand, maybe learn or maybe help ? I've had this problem some years ago (hook hell in site/ready.php etc). But I don't have it any more. Are you writing custom modules? Are you using custom page classes? Are you using RockMigrations? Maybe all you need is just other workflows? But maybe I'm missing something, that's why I'm asking which problems you are solving. Maybe you can tell me some examples and maybe we can compare different strategies to solve them (with or without PW)... The thing is... when I found PW several years ago I quickly found several things that I thought weren't possible. @gebeer was kind and patient enough to show me how all these concerns could easily be overcome in PW and I'm still having this experience from time to time... On the other hand I agree that some parts are still missing for a more professional setup. RockMigrations for example are great, but would likely be even greater if something like that was in the core with proper docs and without some deprecated methods ? Personally my only real issue at the moment is with how PW handles multiple languages. The recent updates that allow us to ship translations with modules were a first step in the right direction but it still sucks IMHO as there are still so many manual steps (sometimes even clicks and copy&paste actions) involved that are hard to automate... But i haven't had the problem of a poorly organized project in a long time. ?1 point
-
Kind of embarrassed to mention my setup as it is all old school style stuff. local and remote LAMP stack SSH + RSYNC for bidirectional comms No composer, etc. Live server is with Ethernet Servers Ltd. Great VPSs. Great support too And the only module installed is Tracy VSCodium (VSCode without M$ nose buttin' in) Front end is plain html/css/js.1 point
-
This was in the support area for Repeater Matrix, so not on the public forum.1 point
-
1 point
-
What is an "external template"? You mean a regular frontend template? I'm not quite sure what you're asking: Reverse all child pages only? Or keep the page order as in the admin, but reverse the images per page only? If the latter, you could do something like: $imgs = $page->images; if ($imgs) { $gmi = array(); foreach ($imgs as $img) { array_push($gmi, array($img->url, $img->description, $img->title)); } $images = array_reverse($gmi); foreach ($images as $img) { $content .= "<h2>{$img[2]}</h2><img src='{$img[0]}' alt='{$img[1]}'>"; } } Basically just array_reverse()1 point
-
1 point
-
Hi @Alkrav my pleasure and, wow, good idea a little search field when dealing with website with a lot of pages in my case i have three situations that help me not be lost in the matrix ? - when it comes to complex repeater in which i know i'll use many images, i put an image field in each repeater item (as they are pages, it works like a charm) - in the case you describe, the image field in the "parent page", well, not too long to select but here i admit i won't deny the use of a search field for big website or, simple way to prioritize this "parent" in the list page - when it comes to images i know i'm going to use in many pages i usually have a "stock page", hidden from the front side and the sitemap, in which i put some fields, default translations (with Ryan functional fields module), some default fields i'll use in many pages and... an image field i often give this page a loooong title that make it easy to find in the list ? but i like your search field idea, you should suggest it in the wishlist forum! Ryan may like that too ? have a nice day1 point
-
Or without any dependencies: <?php $wire->addHookAfter("ProcessPageEdit::buildFormContent", function($event) { $form = $event->return; $page = $event->object->getPage(); if($page->template != 'my-template') return; $form->add([ 'type' => 'markup', 'label' => 'foo', 'value' => 'bar@'.date('Y-m-d H:i:s'), ]); });1 point
-
Hi everyone, I just committed to new versions. 4.22.23 - updates Tracy core to 2.8.10 4.23.0 - updates Tracy core to 2.9.0 I think everything should be fine in 4.23.0, but the new Tracy core 2.9 major version means that Tracy works without PHP sessions. This means that I was able remove several hacky workarounds to make this module compatible with PW's SessionHandlerDB module. I think I have everything working as expected, but wanted to also release a version with what I assume will be the last version of 2.8.x of the Tracy core. Please let me know if you find any issues with the new 4.23.0 version and if you have any problems that I can't solve quickly, you can always drop back to 4.22.23. Happy holidays!1 point
-
Found a solution based on @Fokke's solution from 2015. Adding the following in admin.php, before the line `require($config->paths->adminTemplates . 'controller.php');` gets me the behavior I needed; Settings only shows up for the SuperUser: function hideSettingsTab(HookEvent $event) { // Get the page being edited $page = $event->object->getPage(); if ( !wire('user')->isSuperuser() ) { $page->template->set('noSettings', 1); } } $wire->addHookBefore('ProcessPageEdit::buildForm', null, 'hideSettingsTab'); This solution is easy to adapt for whatever your needs are.1 point
-
1 point
-
I've checked it out. I turned out I was wrong, and tabs in VS code already do it out of the box (actually just like PHP Storm as on @Robin S's screens): and you can configure it even more)) But the paths look so small I didn't notice them. And sometimes they still are not explicit enough. But maybe I just need to get used to this.1 point
-
Agreed. Biggest benefits you get from using an external mail service are a) ease of use — which is largely a non-issue for ProcessWire users, since WireMail modules provide a consistent API — and b) confidence that someone else is making sure that your emails are sent, can be received correctly, and don't miss their target or end up in spam. With hosting your own SMTP server there are always potential gotchas, but again if you're on top of things they can be (mostly) avoided. When I say "mostly", I mean things like someone reporting your message as spam, which could become an issue for you. Not much you can do about that, really, except for making sure that your recipient list is full of folks who really want to receive your newsletter ? In addition to what Horst mentioned above, I would recommend using a service such as https://www.mail-tester.com/ to make sure that your messages are a-OK before sending them to actual recipients. Edit: one ProMailer-specific benefit for using external service is that this way you can easily handle bounces and spam complaints etc. ProMailer supports webhooks for this stuff. You can set up a webhook for these without external service as well (at least for bounces, not entirely sure about spam complaints), but it could get tricky ?1 point
-
Inside /wire/modules/Fieldtype/FieldtypeComments/FieldtypeComments.module there's a commented section (with @todo comments) for enabling textformatter options, again inside /wire/modules/Fieldtype/FieldtypeComments/Comment.php, textformatter settings are bypassed and comment is presented as is. When I uncomment these sections, and add a few formatters, they work just fine :). Is there any reason why these sections are commented out? Also, is there a way for people to delete their comments?1 point
-
Thanks again everything is working fine. I'm just fine tuning the form output. I'm pasting my code so someone with same problems can quickly view how to customize it based on your initial answer I had to add $childFinish since my child output was in UL tag: <?php function getComments($comments, $page, $parentID = 0, $reply = true, $child = null, $childFinish = null) { $out = ""; foreach($comments as $comment) { if($comment->parent_id == $parentID) { $reply = ($reply == true) ? "<a class='comment__reply js-comment-reply CommentActionReply comment-reply-link' data-comment-id='{$comment->id}' href='#Comment{$comment->id}'>Reply</a>" : ""; if($comment->status < 1) continue; $cite = htmlentities($comment->cite); $text = htmlentities($comment->text); $userID = $comment->created_users_id; $u = wire("pages")->get($userID); $name = ($u->displayName) ? $u->displayName : $u->name; $date = date('m/d/y g:ia', $comment->created); $out .= $child . " <li class='comment__item'> <div class='comment__item-body js-comment-item'> <div class='comment__avatar'><img src=" . wire('config')->urls->templates . "rs-template/assets/media-demo/avatars/01.jpg alt=''></div> <div class='comment__item-right'> <button class='comment__item-btn'>Edit</button> <button class='comment__item-btn'>Delete</button> </div> <div class='comment__info'><span class='comment__author'>" . $cite . "</span><span class='comment__date'>" . $date . "</span> <div class='comment__content'> <p>" . $text ."</p> </div> " . $reply ."</div> </div> <!-- end of block .comment__item-body--> "; $out .= "</li>" . $childFinish; $out .= getComments($comments, $page, $comment->id, false, "<ul class='comment__children'>", "</ul>"); } } return $out; } echo getComments($page->blog_comments, $page); ?>1 point