-
Posts
6,671 -
Joined
-
Last visited
-
Days Won
366
Everything posted by bernhard
-
Interesting read! Would be great to see a detailed writeup about your workflow @wbmnfktr ... Have a nice weekend ? ? ?
-
ProcessWire with Debian 10 and PHP 7.3.4-2: So far so good!
bernhard replied to Edison's topic in API & Templates
https://github.com/processwire/processwire-issues/issues/943- 1 reply
-
- 2
-
-
Hi, it would be helpful for everybody to list what you've tried and what did not work and why ? What about https://modules.processwire.com/modules/settings-factory/ ?
-
https://returntrue.win/ have fun ?
-
- 6
-
-
-
Hi @mr-fan sorry that I'm late on this! I've done something very similar some time ago... a Raspberry Pi Zero monitoring the water + air temperature of a river every ? minutes, logging everything and showing graphs... Loading/showing big amounts of data was the reason for building RockFinder, RockGrid and now I'm working on RockTabulator (which will replace RockGrid one day...). You should really have a look at those tools and read the related forum threads. I've also done some performance tests back then: Comparing to findMany: I just added a quick example loading 200k pages via RockFinder into a RockTabulator: The whole site is ready to clone and install at github: https://github.com/BernhardBaumrock/tabulator.test You can also easily do custom SQL queries in the backend (see the simple php code of the example at the bottom). This way you could even do easy aggregations directly on the db (https://processwire.com/talk/topic/18983-rocksqlfinder-outdated-thread-link-to-current-version-inside/?do=findComment&comment=165807) Load times and data transfer (gzipped) can be seen in the devtools on the right. Finally using RockMarkup it's a piece of cake to implement any charting library in the pw backend: I think I'd store everything in regular PW pages and run a daily cron that does the aggregations. Aggregations could be stored in regular pw pages as well (eg as json in a textarea field) and this data could be easily displayed as chart via RockMarkup on the page edit screen. If you want to, I'd be happy to work on your project together and take it as an open source example to showcase my modules - I still think that the potential of those tools is really not getting through... 6 likes for RockMarukup... That's kind of disappointing...
-
How to make a custom class globally available
bernhard replied to chrizz's topic in Module/Plugin Development
Then you asked the wrong question ? https://github.com/processwire/processwire/commit/f0cc6f1134e7c7ea5e99ed851862f612996de0c4 -
Well... the proper way would be to develop a fieldtype for that. Hacking this together with RockMarkup should be quite easy though: Just add a hidden inputfield for that purpose and populate it via JS whenever you update the value of the RockMarkup field. But you need to be careful with that approach because the value transmitted can be manipulated easily via browser devtools if you don't do server side validation!
-
Image management in custom module
bernhard replied to SoccerGuy3's topic in Module/Plugin Development
I think this would be a perfect use case for RockTabulator. Just get your external data, transform it into an array of objects and let RockTabulator do the rest. Finally add some links to a custom process module that shows an edit form (similar to a regular pw page edit) and save back that data to the original database. You can add all kinds of presentation helpers, colorizations, filters, sorting etc. or even charts (see https://processwire.com/talk/topic/17207-custom-office-management-crmcontrolling-software/ as an example). I'd be happy to assist you with that job - maybe you want to sponsor further development of RockTabulator, which is completely free and open sourced to the community... See also http://tabulator.info/examples/4.3 -
How to make a custom class globally available
bernhard replied to chrizz's topic in Module/Plugin Development
You can assign your own API variables easily: // MyModule.module.php class foo { public function bar() { return 'works!'; } } class MyModule extends WireData implements Module { public static function getModuleInfo() { return [ 'title' => 'MyModule', 'version' => '0.0.1', 'summary' => '...', 'autoload' => true, ]; } public function init() { $this->wire->set('foo', new foo()); } } You could also just save this instance to $config->foo $this->wire->config->foo = new foo(); -
Thx teppo, please leave it as is ? RockMarkup was released here:
-
How to pass all API variables to $files->render() ?
bernhard replied to bernhard's topic in General Support
Thx Robin ? Didn't know that, just tried it and it also works for $files->include() ? -
Hi beluga, I'd be totally fine with allowing frontend if anybody wants to work on that. Personally I don't have the need for any grids on the frontend. And I'm not sure if it would be better to show a rocktabulator than implementing a custom regular tabulator. While it sounds nice to support frontend for a rocktabulator I'd very much prefer to have a way to present parts of the pw Admin to public users if necessary or wanted. In other words to have public backend pages (there was some discussion about that). This could be rocktabulator, but could also be file upload fields, forms, etc. I feel like supporting tabulator on frontend will have some side effects that will make development more complicated... But I'm happy if you come up with a good solution and prove me wrong ?
-
DEPRECATED! I'll release a commercial module "RockGrid" in 2023/2024. If you are interested please write me a PM ? ---------------------------------------- This module is (or will be) the successor of RockGrid. It uses http://tabulator.info/ as grid library that is completely open sourced (MIT, no commercial extensions) and as far as I've seen so far at least as powerful as ag-grid, which RockGrid is using. GOALS: Support various data sources (RockFinder, JS, PHP, SQL) Supported only in PW Backend + Uikit Easy setup of new fields DOCS: Currently the readme is terrible, sorry for that. But you get lots of examples after installing the module! From simple tabulators to more complex ones. INSTALLATION: Just install the main module. RockMarkup is a required dependency. Please also have a look at the RockMarkup examples before jumping into RockTabulator! STATUS: The module is early alpha and can be downloaded from github: https://github.com/BernhardBaumrock/RockTabulator It took me two weeks of rewriting RockMarkup/RockTabulator to get where I am now and I think I'm quite happy with the setup. There might be some breaking changes though in the near future. At the moment the main features that should be working properly are: Data sources: SQL, PHP, JS Sandbox for easy setup Multilang This means basically everything that is possible with Tabulator is also possible with RockTabulator. Though, there are no custom helpers/plugins yet. That's the next step and whoever is willing to help, please give me a shout ? If you have any questions or ideas please let me know ?
- 13 replies
-
- 15
-
-
Please don't use this module any more. I think in the end it just adds more complexity (and dependencies) than benefits. See this tutorial how simple it is to create a custom runtime-only Inputfield: WHY? I've started building this module because the existing solutions by @kongondo and @kixe (https://modules.processwire.com/modules/fieldtype-runtime-markup/ and https://github.com/kixe/FieldtypeMarkup) did not exactly fit my needs. Actually this module is aimed to be a base module that can easily be extended by other modules. It takes care of the heavy lifting that has to be done when working with custom fieldtypes in ProcessWire (injecting scripts and styles, handling JS events, doing translations). See RockTabulator as an example. I'm quite sure more will follow (eg ChartJS)... WHAT? This module helps you injecting ANY php/html/js/css into any PW backend form (either on a page or in custom process modules). It also comes with a sandbox process module that helps you setup your fields and provides handy shortcuts that integrate with TracyDebugger and your IDE: WHERE ...to get it? At the moment the module is released as early alpha and available only on github: https://github.com/BernhardBaumrock/RockMarkup2 If you have any questions or ideas please let me know ? PS: This module shows how easy it is to extend this module for your very own needs. All you need to do is providing the module's info arrays and then overwrite any methods that you have to modify (eg the InputField's render() method): https://github.com/BernhardBaumrock/RockMarkupExtensionExample
- 17 replies
-
- 12
-
-
$pages->find() get by id and maintain order
bernhard replied to Torsten Baldes's topic in API & Templates
Thx for clarifying, that makes things clear but complicated ? I don't think that there is a way to achieve this on the db side. Only chance is on the PHP side. Does something like this work? -
$pages->find() get by id and maintain order
bernhard replied to Torsten Baldes's topic in API & Templates
Ah, sorry, didn't see that ? So what are your finds sorted by? Could you share those find queries with us? -
$pages->find() get by id and maintain order
bernhard replied to Torsten Baldes's topic in API & Templates
Seems to work: -
☁️ Duplicator: Backup and move sites
bernhard replied to flydev's topic in Module/Plugin Development
A hint on the module config page would also be fine ? "Install Process Module" or "Process Module is (not) installed" PS: Sorry, didn't follow this 14 pages thread closely enough ? -
Can't hook 404 Page via ProcessPageView::pageNotFound
bernhard replied to bernhard's topic in General Support
Thank you teppo, that brought me on the right track! It works in init.php but not in ready.php; My module was autoload="template!=admin" and changing that to autoload=true made it work. I guess when using selectors it has to wait for the API to be ready and then it is too late for the pageNotFound hook... Not sure if that would be worth an issue report on github?