-
Posts
78 -
Joined
-
Last visited
-
Days Won
10
Everything posted by Mikel
-
The latest additions/improvements of the module [v0.5.0]: Template file structure Stubs are now namespaced into subfolders per DataTable (column_templates/<table>/<slug>.column.php) instead of a flat directory. TemplateGenerator::getTemplateFilePath() and createTemplateFile() updated to build and create these subdirectories automatically. Legacy-stub upgrade loadColumnTemplates() now checks each stub for a return function(...) signature. If missing, it archives the old stub (prefixing its filename with _) before regenerating a new closure-based stub. Page-property handling Unified list of core properties driven by getStandardPropertyLabels() (including status). All Page-property stubs now use return …; inside closures and map bitmask flags (status) to human-readable labels. Lets look a little closer at the switch to closures for the column templates and an export/import feature. We planned this from the beginning and now switched over to a slightly different approach for the tiny template files used to display the data in your columns. The mechanism of those templates remains the same, but the performance gain is huge. Especially when dealing with lots of columns and rows: OLD: echo htmlspecialchars((string)$value); NEW: return function($value, $config = []) { return htmlspecialchars($value); }; Anyone who tried to create a DataTable gets column templates automatically created. They support the most common field types in ProcessWire and format the output initially in a simple but (hopefully) useful way. If you then tailor the output exactly to your needs, sometimes it would be handy to just save those micro templates for further use. Well, we are just developing export/import features for that purpose: Just export your global and dataTable settings as JSON and your column templates as ZIP and reuse it, manipulate them, share them 😉 and then use for migrating or easy duplication of tables. Here are some screenshots showing its (yet rather ugly) interface in action. We assume you want to port existing dataTables to another processWire site using the same data structure. Well start with a fresh install of the module We upload our exported JSON file, that contains data like this: { "moduleConfig": { "checkboxYesLabel": "Yes", "checkboxNoLabel": "No", ... }, "dataTables": [ { "name": "orders", "title": "Orders", "data_template": "rockcommerce_order", "data_selector": "", "columns": [ "rockcommerce_paymentid", "status=rockcommerce_paymentstatus", "rockcommerce_paymentdate", "order=meta", "rockcommerce_net", "total=rockcommerce_net" ... After importing we immiatly see the result of the import displayed as DataTable with, at the moment, default fieldtype templates as column templates: But at the bottom of each DataTable there is more: SO in the next step we import our prior fine-tuned column templates and immediately get a much better result: Under the hood the "old" default column templates that were created after importing the JSON config are not deleted, the get prefixed with an underscore in case you already made some adjustments before importing other column templates. Of course one can also manually copy column template files from one install to another but we found it more practical to let the module handle this. Especially when building new sites or testing, be aware that an uninstall of the module always wipes out the entire column_templates directory. So you better export before uninstalling! We are still working on the interface because it hurts my designer sensibilities to look at the UI of the import/export section. 😉 What do you think? What could be further improvements? Cheers to all of you and have a productive week!
-
@bernhard As its an ongoing project visualizing real customer data, I am not able to show any real Screenshots, but in a nutshell we are making heavy use of the meta data objects in RockCommerce and manipulate and aggregate data from there to show backend users useful insights. Still a lot room for improvement, but I come to that later on... @Torsten Baldes You can do anything you like inside the column templates, but for what you mentioned there are better tools out there I believe: Maybe Ryans ListerPro Module or Bernhards RockGrid Module. We aimed the module more on data visualization than manipulation. But the use cases are endless. For example a colleague of mine quickly created a DataTable with product data for assisting newsletter authors with useful page links, images and copy texts. Exactly the data he needed in a sortable table overview with modal windows that show complete data if needed.
-
Hey ProcessWire Community, I’m excited to announce a new module currently in beta: ProcessDataTables – designed as a universal “Swiss Army knife” for backend data visualization. Before the development of the ProcessUserDataTable module we developed a sleek module for a client called ProcessDataTable (singular), which featured the same guided, user-friendly install process with select/multiselect configuration fields but the possibility to handle the column display with small PHP templates. It was also designed for using it with a single table. But we saw the need for a truly flexible solution that can handle an unlimited number of tables in the ProcessWire admin. ProcessDataTables (plural) is aimed at more experienced ProcessWire developers who need a rapid, highly configurable, and reusable tool for building complex data overviews and admin dashboards. Unlike the original (still unreleased) single-table module, which focuses on ease of setup, this new version prioritizes scalability, customization, and extensibility. We are currently using it in combination with @bernhards incredible module RockCommerce to display E-Commerce related data for backend users. Why ProcessDataTables? Unlimited custom tables: Quickly define as many tables as you need for any data structure or ProcessWire template. Advanced configuration: Control each table’s columns, data sources, selectors, and field-level output via PHP stubs. Per-field templating: Every column can use its own output template for advanced formatting and presentation. Global module config: Set date/currency/number formatting, labels, and output options from a central settings screen. Built for developers: Configuration is more open and flexible, allowing you to create advanced dashboards and reporting interfaces for any ProcessWire installation. Differences to the (yet unreleased) ProcessDataTable Module The original ProcessDataTable (singular) module was focused on single-table use cases and offered a more beginner-friendly installation process: Guided setup: Selection of templates and fields through select/multiselect inputs in the config screen Quicker onboarding: Suitable for smaller projects or less technical users when only one data table is needed Status ProcessDataTables is currently in beta – feedback, ideas, and bug reports are highly appreciated! Looking for real-world use cases and input from the community to help shape the roadmap. Screenshots & Example Workflow In the README of the module you find example screenshots of the module config, adding tables, and customizing table columns) Get it here: https://processwire.com/modules/process-data-tables/ https://github.com/frameless-at/ProcessDataTables If you have ideas, feature requests, or want to help test or contribute, please reply below or DM me! Looking forward to your feedback and suggestions!
- 11 replies
-
- 13
-
-
-
Hey ProcessWire Community, We recently built a user data table module for a client. It was solid – tailored for specific fields, neatly formatted, and with just the right amount of complexity. Then we thought, “Why not turn this into a fully configurable module for ProcessWire’s admin?” And to make it even more interesting, we decided to pair up with AI to build it. Spoiler: AI is not great at ProcessWire. ⸻ Why AI? We figured AI could help with some of the more repetitive coding tasks – like parameter parsing, formatting logic, and output generation. But AI had its own plans. It decided to take every simple task and turn it into a five-step process involving nested arrays, regexes, and a lot of unnecessary conversions. What We Learned: • AI is good at suggesting solutions – even when they’re completely wrong. • AI will confidently map dates to currency values and sum() text fields. • AI thinks that everything is a map() – and if it’s not, it should be. • ProcessWire is flexible, but it doesn’t bend to AI’s will – and that’s a good thing. But have a look for your own: User Data Table or https://processwire.com/modules/process-user-data-table/ It is more or less production ready and we test it in some client projects as it really comes handy when showing user related data as a table in the backend. We even forced AI to do the Change log and the Readme files, so it should be not too hard to test. 😁 Example 1: (detailed example including configuration can be seen in the README file) UserAdminTable with users that have the 'member' status (showing their created value on :hover), their visits of certain pages (with modal opening for details), their purchases (with modal opening for details) and the Total of their purchases. All column titles are clickable for sorting asc/desc, direction is indicated after sorting. Example 2: (detailed example including configuration can be seen in the README file) UserAdminTable with standard user fields and one virtual field showing `created` value as column with minimal configuration.
- 8 replies
-
- 11
-
-
That´s what we thought, Ryan. As we really do not care for dark modes, we will return to changing the _masthead.php of UIKit module with <div id="pw-mastheads" uk-sticky="sel-target: .uk-navbar-container; cls-active: uk-navbar-sticky"> and stick with "classic" style. Works flawless. But, anyway: Congratulations for the new Admin style, a lot of good stuff going on!
-
Thank you for the huge amount of work put into the new AdminTheme style! After playing with it in different scenarios and PW installations we find ourselves always switching back to the „original“ style of the backend, wishing we could also have the fixed navigation here... is there a simpler way of doing this without rebuilding the original styles in the new theme? Please don´t get me wrong, we appreciate many of the design decisions made, but overall the typo and colors of the original theme are more suitable for all of us. ("we" --> a design agency in Vienna, Austria. We build client projects with PW since 2012)
-
Thanks, thats just what I implemented and testet this moment. Working flawless :-)
-
Ok, thanks, I was not sure, so, in my special use case it will be better not to unsubscribe the user, but to delete him. So if he likes to subscribe again in the future, he will get added again.
-
Hi, Daniels, thanks for sharing this! I have just ran into an issue while testing: After successful initial subscription of an user, I could unsubscribe him again, but after that no more subscription of the same user would work. Is this due to a limitation of Mailchimp?
-
I just had a look at the template files: What’s the point in the numerous „row“ and included „class=‚col-xs-12‘“-Containers in the template files? They can be skipped altogether. Also the duplicating of the navigation for displaying a mobile navigation is not really state-of-the-art... bootstrap provides a mobile nav solution right out of the box... Keep it simple! Cheers!
- 39 replies
-
- responsive
- bootstrap
-
(and 3 more)
Tagged with:
-
Just happens to be an issue in Safari. Last stable version (2.8.35) works though.
-
Just upgraded a client installaion (on the development server) to latest stable 2.x release. When testing I spotted a bug (?) adding specific new pages via the "Add new" button or the Pages-> "Add New" menu entry. The specific template used by this page is located a bit down the age tree, so after clicking the "Add new" button the "Where do you want to add ..." select shows. After selecting a parent for the new page nothing happens. Usually the (hidden) submit is triggered. Can anyone verify this? (My workaround is to simply show the submit button) Cheers, Mike
-
Hi, Soma, thanks for the quick reply. The hint (::added) was correct. It pointed me to other problems, so we could work everything out. Here is the working code for automating the modules config (placement in ready.php): $this->addHookAfter('Pages::added', function($event) { $page = $event->arguments[0]; if ($page->template == 'NAME_OF_TEMPLATE') { //check template of page added // get new domain from page name $new_domain = $page->name; // get config data and save it to var $config = wire('modules')->getModuleConfigData('Multisite'); // add new domain to config data and save it $config['subdomains'].= "\n".$new_domain; wire('modules')->saveModuleConfigData('Multisite', $config); } }); I will work on Hooks for Pages::trashed and Pages::renamed. As this is a client project, we will not upgrade unless we get paid for it, so we will stick with this solution for some time ;-) So here are the other two mentioned hooks. Both are working: $this->addHookBefore('Pages::renamed', function($event) { $page = $event->arguments[0]; if ($page->template == 'NAME_OF_TEMPLATE') { //check template of page added // get old domain from page name $old_domain = $page->namePrevious; // get new domain from page name $new_domain = $page->name; // get config data and save it to var $config = wire('modules')->getModuleConfigData('Multisite'); // replace changed domain in config data and save it $config['subdomains'] = str_replace($old_domain, $new_domain, $config['subdomains']); wire('modules')->saveModuleConfigData('Multisite', $config); } }); $this->addHookBefore('Pages::trashed', function($event) { $page = $event->arguments[0]; if ($page->template == 'NAME_OF_TEMPLATE') { //check template of page added // get domain from page name $domain = $page->name; // get config data and save it to var $config = wire('modules')->getModuleConfigData('Multisite'); // remove deleted domain from config data and save it $config['subdomains'] = str_replace("\n".$domain, '', $config['subdomains']); wire('modules')->saveModuleConfigData('Multisite', $config); } });
-
Hi, all, we are trying to automate the module config setting for admin users that only have access to the page tree. The idea is that these admin users should be able to create new pages with the specific multisite template and the page name is automatically added to the multisite config array on page creation. Sadly the hook does not work :-( It is placed in the ready.php: $this->addHookAfter('Pages::add', function($event) { $page = $event->arguments[0]; if ($page->template == 'project_home') { //check template of page added // get new domain from page name $new_domain = $page->name; // get config data and save it to var $config = wire('modules')->getModuleConfigData('Multisite'); $data = $config['subdomainsArray']; // add new domain to config data and save it array_push($data, $new_domain); wire('modules')->saveModuleConfigData('Multisite', $data); } }); Any clues?
-
OMG! Of course, I forgot about this possibility) Thank you, this works perfectly!
-
Hi, kixe, the backend is the only place where this is needed! But as I am actually a designer/part-time developer( with more or less growing knowledge of programming), could you please tell me where you placed the hook above? In a seperate module? Thanks!
-
Hi, kixe, thanks for reminding me of your module! It works the way you wrote, but I have one problem: The site we are working on is for a real estate company. The template in question must be reused for a lot of different projects. (=pages) So it does not work specifying the image field of only one page (filtering per id). The field created with your module should instead fetch all images of the page being edited.
-
Hi, Zeka, thanks for the reply. The goal is to upload about 30 to 50 images at once and then use them in individual sections of the page (template): In "normal" textareas and in "special purpose" fields which actually just would need to store the image reference. With image fields you can only upload images, not choose already uploaded ones. (Or can you?)
-
HI guys, I am wondering if I am to focused on the problem, so that I don´t see an obvious solution, or that there is no elegant solution... ;-) Ok, here is the usecase: I am building a template with only one image-field that collects all needed images for that page. Also there are several repeater matrix fields: One for each section of the page. In each repeater matrix there is the possibility to choose one of the pages images for displaying it as "fullwidth section image" on frontend. At the moment I am doing this with a textarea, which is prone to errors, due to wrong user input. Is there another possibility to store an image reference as a textarea?
-
Work in progress modules Subscribers / WireMailChimp
Mikel replied to benbyf's topic in Module/Plugin Development
Hi, Ben, I just looked ino the WireMailChimp module: It does require the Subscribers module, doesn´t it? For my needs I altered the part whre this module is loaded and the role "subscriber" is checked. (I just run a check against my own subscriptions field) I will then allways get the same error message, no matter if subscribing or unsubscribing: 400: [EMAILADRESS] is already a list member. Use PUT to insert or update list members. Did you already got it to work properly?- 18 replies
-
- 1
-
-
- users
- subscribers
-
(and 1 more)
Tagged with:
-
Sadly I get an error when downloading the module via PW. PW Version is 2.8 Just tried with latest PW 3.0.41: Same, same... :-(
-
Hi, Horst, I just tried to install the module, but got 2 error messages right after downloading, regarding: AdminLinksInFrontend.module, line 153 and ProcessAdminLinksInFrontend.module, line 45 In both cases I had to remove the [...] part to get it working: self::$opcEnabled = opcache_get_status();//['opcache_enabled']; I am running PW 3.0.23 in this particular case. EDIT: Ok, now PW tells me why: I need to install PHP 5.4 or greater... Sorry for bothering you!
-
Dependencies for $page->prev & $page->next methods?
Mikel replied to Mikel's topic in General Support
After upgrading the ProcessWire installation to 2.7.2 the methods next() and prev() work like they should.