Leaderboard
Popular Content
Showing content with the highest reputation on 05/12/2024 in all areas
-
@Robin S I was thinking that since a JS callback is necessary to make it do anything, it was simplest just to keep it all JS, contained to one definition. At least for the case that prompted adding this feature (PageEditChildren module). But for cases like what you are describing, what you say makes a lot of sense. I will add an $inputfield->addHeaderAction([ ... ]); that does the same thing, maybe like these examples? // click action $inputfield->addHeaderAction([ 'icon' => 'hand-stop-o', 'overIcon' => 'hand-peace-o', 'tooltip' => 'Hello world', 'event' => 'myEvent' ]); // toggle action $inputfield->addHeaderAction([ 'onIcon' => 'toggle-on', 'onEvent' => 'MyOnEvent', 'onTooltip' => 'Click to toggle off', 'offIcon' => 'toggle-off', 'offEvent' => 'MyOffEvent', 'offTooltip' => 'Click to toggle on', ]); // link action $inputfield->addHeaderAction([ 'icon' => 'fa-link', 'href' => 'https://processwire.com/api/ref/', 'tooltip' => 'API reference', 'target' => '_blank', // or 'modal' or omit for '_self' ]);5 points
-
Hey ProcessWire RockStars! ? Ever felt like your ProcessWire backend could use a bit more... pizzazz? Or functionality? Well, it's time to roll up your sleeves and dive into the world of RockAdminTweaks! ??️ Creating tweaks is as easy as smashing a power chord on your guitar! If you've got cool features from AOS you'd love to see, why not port them over? We even have a GUI for creating new Tweaks! Let's make the backend rock even harder! Github: https://github.com/baumrock/RockAdminTweaks Modules Directory: https://processwire.com/modules/rock-admin-tweaks/ Docs: https://www.baumrock.com/processwire/module/rockadmintweaks/4 points
-
Hey there, I had the same need (hide page tree for certain roles). Used https://processwire.com/modules/admin-restrict-page-tree/ module. Worked like a charm, except that I had the same problem than @DL7, i.e. the bread crumbs provide links to the page tree. The page tree is not displayed, but a page saying "Login" with an "Edit profile" button is shown. That may be a bit confusing for users. So I add a few lines to the module, in order to optionnaly skip the bredcrumbs rendering (a hook, and a checkbox to choose whether you want to display the page tree for restricted users). It works well with AdminThemeUikit (I didn’t test it with the default admin theme). I thought this might be useful to other users. @Wanze, @netcarver if you want to have a look at it, maybe for module update? It would be my first contribution to a PW module... ?3 points
-
The header action feature is cool, thanks @ryan! Is there a way that a header action can be added through the PHP API rather than through the Inputfield JS API? A couple of reasons this could be useful: 1. I can imagine a module that would add some header action feature to every inputfield (or every inputfield of a particular type) and it would be simpler to do this via a hook before Inputfield::render(). 2. Sometimes the inputfield you want to target doesn't exist in the DOM when the page loads (e.g. Repeater subfields or other Ajax-loaded scenarios) and so the JS code to add the header action would also need to watch for other events like "reloaded" or "ajaxComplete", and again it would be easier to add the action in a before render hook. I was thinking that if the PHP API supported header actions then JS actions could be handled via an "event" property. So something like this... $action->event = 'myAction'; ...which means that clicking the icon would trigger a "myAction" event, and the developer would use JS like... $(document).on('myAction', '.Inputfield', function(event) { const $inputfield = $(event.target); // Do something involving the inputfield... }); And in case the action doesn't need JS but should instead be PHP-based or just link to some URL there could also be an "href" property which would make the icon into a link, perhaps to be used with URL hooks... $action->href = "/my-action/$page->id/$field->name"; ...and... $wire->addHook('/my-action/{page_id}/{field_name}', function($event) { // Do something with $event->page_id and $event->field_name here... }); What do you think?3 points
-
File Mover Allows the selection of files or images for moving or copying to a different field. The destination field can be on the same page as the source field or on a different page. Screencast For convenience in the screencast this demonstration shows moving and copying images and files between fields on the same page, but you can also move/copy between pages by following the same process. Usage In any Images or Files field, hover on the field label to show the File Mover icon. Clicking on the icon will reveal the File Mover buttons. If no items are yet selected you'll see a button labelled "Select items to later move or copy". Click the button to enter selection mode. While in selection mode, click one or more images/files to select them. When you have finished selecting items click the "Done" button. Note: you can only select from one Images and one Files field at a time before completing the move/copy step. In the Images or Files field that you want to move/copy the items to, hover the label to show the File Mover icon and click it to reveal the File Mover buttons. When you click the Move or Copy button the page will automatically be saved and the selected items will be moved or copied accordingly. There is also a button to clear the current selection if needed. If you hover on any of the buttons a tooltip shows the filenames of the currently selected items, in case you need a reminder. Configuration There is a field in the module config that defines which roles are allowed to use the File Mover module. If the field is left empty then all roles are allowed. https://github.com/Toutouwai/FileMover https://processwire.com/modules/file-mover/2 points
-
Very old indeed, but still useful... and still working ? Who said plugins needed to be updated every week ? Oups... wrong forum... ? I’ll open an issue on Github.2 points
-
@Robin S Not yet but at least for now, the files existing there serve as a visual reminder.1 point
-
Hey guys, please check out the new version of RockAdminTweaks which now even has a forum thread ? Would be great to get some PRs with tweaks! @netcarver I decided to rewrite the module because I didn't like some aspects of the old one. @Ivan Gretsky I've just added those tweaks to RM because I was lazy and I did not get a single feedback on that RockAdminTweaks at all. But I agree that tweaks have nothing to do with RM, so I'm fine with moving them away from RM into a dedicated module. Do you have time to help with that?1 point
-
Hello @TomPich I'd be delighted to receive a PR against the module - or just open an issue to discuss your modifications. This is a very old module now, so it probably could do with a fresh update.1 point
-
@dan222You can get working a project in mind with PW quite easily by just using some basic features. I learn and discover new things every time I am using PW or read forum threads even after one year of using PW. Pretty sure I discovered only 30-50% of PWs goodies yet.1 point
-
I created regular user accounts via the PW API with a specific role. Then I build a frontend login form using the PW API with the build in login throttle module and added a hidden honey pot field and a simple number captcha. Doing so allows to not expose the true admin login URL, which I keep for the side admin and two maintenance accounts. The admin template checks for the roles and throws a 404 PW error if a user with the role of the frontend-user would try to enter any backend page. So for those frontend users it seems the PW admin backend does not exist at all, while the site admin or the two other accounts can enter the PW backend parts which are accessible based on their roles and permissions granted.1 point
-
I just wrote a first draft of the precise specifications... And gosh, that would be a tremendous work to do with a framework. So, I think, as you all pointed, that it would be better in terms of cost/benefit, to use PW admin. This project has no profit objectives. They want to raise funds by donations and crowdfunding for the website. I thus have to offer them the best cost/benefit ratio (end still pay my bills at the end of the month ? ). The design is not that important. But most users won’t be tech-savvy. So it has to be simple and straightforward. That being said, I didn’t explore how to twitch the admin theme in PW (that was next in my PW ToDo list). It would be a great occasion. I recently thought about using exclusively the Dashboard module for some restricted user accounts in a website I’m doing – and I don’t even know how to do that. Any suggestion about tutos and posts that could help me explore this aspect of PW are very welcome (I took note of your YouTube video, Bernhard, and will watch it ASAP). Thanks guys, as always, for your help and your time. Much appreciated. ❤️1 point
-
This might also be helpful, I don't know, I tried ? https://youtu.be/ncS36UqaBvc?si=SYhVc_qcaN5lneDP&t=355 All the best for your journey!1 point
-
In case you have time this weekend: Saturday: enjoy a day reading the docs and tutorials Sunday: enjoy a day of tinkering with the installation, a site profile, maybe first steps In addition to that I recommend this 10 year old video: ProcessWire looks way different nowadays but the steps are the same. And you can see how easy it is (or can be) to get started.1 point
-
The learning curve and time depends on your definition of a „decent standard“ for your local development environment and operating system used. For example. I bought a new Windows 11 Laptop recently and just wanted to upgrade my dev environment I used for about 10 years now (Windows 10, XAMPP, VS Code with several Addons) to a decent standard on Windows, which is WSL2 (Windows Subsystem for Linux), DDEV (replacing XAMPP), and installing all the stuff previously hosted on Windows in the WSL2/Ubuntu env co-existing with Windows 11. This took me about 5 days until I get used to Docker/DDEV stuff etc. When I first tried Processwire a year ago with a specific project (event booking system for 1-10 departments with 1.000 users/department) in mind, where I didn‘t want to implement authentification, logging, permissions, database queries in vanilla PHP myself, it took me a weekend to go from project idea to a working demo for one department with my existing PHP knowledge (last PHP project was in 2018). I just installed a default site template with delayed output strategy, read me through the API and tutorials and asked questions in the forums and the demo turned into pilot tests after about 2 weeks and went live with three departments after 4 weeks. Up to that time I wrote three modules (two publicly available from the PW module store) and one backend module for private use. So to recap. If you just use your existing local dev env, you can get results fairly quick using the PW API and the snippets in the tutorials. Another great resource are the code comments in the PW core files on Github. If you want to upgrade your local dev env to some decent/recent setup, it will take somewhat longer. The extra time I spend with setting up my local dev env amortized about 1-2 weeks later, due to the better workflows and toolchain like DDEV/WSL2, which I won‘t miss anymore. Cheers cwsoft1 point
-
I quote myself here (source) Probably the best way to start is: Read the docs: https://processwire.com/docs/ Get familiar with the selectors: https://processwire.com/docs/selectors/ Try the tutorials: https://processwire.com/docs/tutorials/ Search the forums for common questions with google like this: https://www.google.com/search?q=site%3Aprocesswire.com%2Ftalk+how+to+resize+images And give yourself a weekend or two The moment you installed and broke your 10-20th installation of ProcessWire you will feel at home. And you should break* as many installations as possible to learn the foundation of pages, templates, fields, and go from there. Use DDEV (all platforms) or Laragon (Windows) for an easy start. Best way to start with ProcessWire locally. Install the Skyscraper profile and take it apart - or try another site profile. That way you will learn how to use profiles and can build a routine to install ProcessWire. Maybe even creating a few instances with different profiles could help. * have fun with the code, bend and twist every single part of everything to understand. ProcessWire will give you a headstart, great UI to enter content, manage the site and modules, ProcessWire takes care of routing, permissions, and user management. ProcessWire is probably the easiest way to start learning a bit about PHP. if/else/foreach/echo is everything you need to know to start.1 point
-
For my first steps with PW, I found this Youtube playlist by Henning Heyne. He builds step by step a simple blog, but by doing that, you get to grasp some concepts of PW that maybe a bit not intuitive but prove afterward to be extremely powerful (like a simple post category being a page in itself). Hope that will help.1 point
-
Some first steps: Have you gotten a working PW instance installed and running in a dev environment? Once that's done, install Ryan's "Skyscrapers" site profile and study that. Maybe add some features or use it to setup an instance for a personal project. And of course, there's PW community which is very helpful.1 point
-
I think ProcessWire's opinions are very worth it. The ones that I feel are right at hand are the selector API and the concepts associated with a Page. This allows you to reduce the amount of decisions you have to take and later execute, letting you go straight into making that real estate/portfolio/etc you want to build. I'd say that with very little backend experience you can build something nice and fast in ProcessWire, with a very advanced and minimalistic and powerful admin backend out of the box. I'd encourage you to give it a try, at least a couple days of work. Give ddev a try to setup your development environment. If you find yourself at trouble don't hesitate to write back, it's an awesome community!1 point
-
@netcarver Have you tried using boot.php? In site/config.php $config->statusFiles = array( 'boot' => 'boot.php', 'init' => 'init.php', 'ready' => 'ready.php', 'finished' => 'finished.php' ); and in boot.php <?php namespace ProcessWire; wire('classLoader')->addNamespace('Wireframe\Blocks', paths('templates') . 'blocks/'); wire('classLoader')->addNamespace('Wireframe\Traits', paths('templates') . 'traits/'); I don't remember if I used traits in pages classes or in some other parts of the code, but you can try.1 point
-
It's about time this was pulled together as a configurable module. So here it is on github and in the module DB. You can configure a set of roles and a target redirect page under the module config. I've done very limited testing here - hence it being marked as alpha in the module DB - so please let me know if it works for you. A word of thanks to both Wanze and kongondo are in order as they pulled most of the material together that I used for this!1 point