Jump to content

bernhard

Members
  • Posts

    5,102
  • Joined

  • Last visited

  • Days Won

    224

bernhard last won the day on June 1

bernhard had the most liked content!

Contact Methods

  • Website URL
    https://www.baumrock.com

Profile Information

  • Gender
    Male
  • Location
    Vienna, Austria
  • Interests
    Sports

Recent Profile Visitors

20,694 profile views

bernhard's Achievements

Hero Member

Hero Member (6/6)

7.2k

Reputation

12

Community Answers

  1. The PW backend is extremely customisable all over both from the design and from functionality. For the design you can simply modify /site/templates/admin.less (https://processwire.com/blog/posts/pw-3.0.179/) or use AdminStyleRock (https://processwire.com/talk/topic/25668-adminstylerock-easily-style-your-processwire-backend-with-two-simple-settings/). So you can very easily adopt spacings, fonts, font-sizes etc. For functionality you can use hooks or custom admin pages aka process modules (https://processwire.com/blog/posts/building-custom-admin-pages-with-process-modules/).
  2. Hey @zoeck I've updated an older site to the latest version of RockFrontend (+116 commits πŸ˜… ) and got this error, which is caused by the LattePanel: The API docs say that ::initialize is deprecated: https://api.nette.org/latte/master/Latte/Bridges/Tracy/LattePanel.html But no idea why this is a problem on this installation since all other projects are also running on php8.1 and don't complain? Any ideas?
  3. One possible solution: $wire->addHookBefore("Inputfield(name=title)::render", function ($event) { $f = $event->object; $id = $this->wire->input->get('id', 'int'); $f->appendMarkup = "<script>alert('You are editing page #$id')</script>"; });
  4. Hi @royascyder and welcome to the forum. There are already several topics around your question, see https://www.google.com/search?q=site%3Aprocesswire.com+blog+wordpress+migrate Also check out ryan's post about migrating the cms critics site from WordPress to PW here:
  5. RockFinder is just for pulling data from the database. We actually now have $pages->findRaw() which makes RockFinder obsolete in many cases. The ->dump() method is just for debugging, but if you look into the code you can see how it's done. It uses tabulator.info to display the data that RockFinder pulls from the DB. So you can quite easily build a Lister / ListerPro alternative with findRaw/RockFinder and tabulator. If you don't want to build it on your own you can write me a PM and buy a license of RockGrid, which was built exactly for that purpose, namely taking a RockFinder/findRaw result and turning it into a tabular grid with sorting and filtering capabilities: But even when using my module you need to code your grid via JavaScript, so it's not a click-click solution. But it helps you to get setup quickly and to make the foundation well structured and future proof (maintainable) and it even creates the necessary boilerplate files for you (basically a PHP file for grabbing data via RockFinder and a JS file for setting grid options like sorting, column labels, column widths etc). So you just need to click on "create new grid" and then edit these two files: JS $(document).on('RockGrid2', function() { let rg2 = RockGrid2; // this will add the grid using the default base setup // if you want to use another base setup set it as 3rd argument // see RockGrid2.js for more details rg2.add('Demo', { // here you can set any properties of your grid paginationSize: 15, // column definitions autoColumnsDefinitions:function(definitions) { // loop all definitions and set column settings definitions.forEach((col) => { let name = col.field; // example how to use the link() helper if(name == 'id') { col.width = 50; col.hozAlign = 'center'; col.formatter = function(cell) { let id = cell.getValue(); return rg2.link({ icon: 'edit', href: rg2.editUrl(id), tooltip: 'Edit this page', panel: true, }); } } // example how to use a predefined coldef // you can use this technique with your own coldefs as well if(name == 'title') { rg2.setColDef(col, 'edit'); } }); return definitions; }, }); }); PHP <?php namespace RockGrid2; class Demo extends Grid { public function info() { return parent::info()->setArray([ 'title' => 'Demo Grid', 'icon' => 'check', ]); } public function getData() { // we use findRaw in this example because it is shipped with the core // my recommendation is to use RockFinder3 as it provides a lot more // and customized options for working with PW page data in grids $data = $this->findRaw("id>0, limit=50, sort=-id", [ 'id', 'title', ]); bd($data); return $data; } public function isViewable() { // who has access to this grid? return true; } }
  6. It depends a lot on the project and on your skills. If the PW backend fits your needs, then you'll have a lot less work and headache if you build on top of that. If you have very custom requirements in terms of UI/UX then it might be easier to build a custom backend from scratch. But as you have already mentioned you then also have to take care of everything that PW already does (security, interactivity, permissions etc...) The forum is not built with PW, it just uses the same editor as PW did until recent updates. The link to the forum software is in the footer.
  7. Isn't it just $this->wire->config->js('mySettings', ...) ?
  8. Is anybody experiencing assets loaded multiple times with the new version? If so please let me know (and even better try to find the issue if you can) πŸ™‚ I've had the issue for a short time during development but then it disappeared so I thought it's fixed, but @snck reported the same problem with the latest release. I can't replicate it on my end so it's a little hard to fix πŸ™‚ Edit: We found the issue and I'm working on it πŸ™‚
  9. Why and where do you want to dump your data? Just for debugging?
  10. @adrian do you have any reproducible example?
  11. Hi @eydun you don't need RockFinder for that, you can just use the core: $database = $wire->database; $query = $database->prepare("SELECT id, class, created FROM modules"); $query->execute(); while($row = $query->fetch(\PDO::FETCH_ASSOC)) { db($row); } $query->closeCursor(); You could also use the DatabaseQuerySelect abstraction: $q = new DatabaseQuerySelect(); $result = $q->select('id, class, created') ->from('modules') ->execute(); while($row = $result->fetch(\PDO::FETCH_ASSOC)) { db($row); }
  12. Ok learning from the last 2 days: The action that I'm using uses the "angular" preset which has a slightly different syntax than what is listed on https://www.conventionalcommits.org/en/v1.0.0/ Using the conventionalcommits would be possible (https://github.com/TriPSs/conventional-changelog-action/issues/217), but that would mean we had to "npm install" some dependencies, which is not what I want, as the nice thing with this setup is that everything works out of the box with just adding one file to your repo. Memo: Breaking changes need to be written with a "BREAKING CHANGE: ..." footer to trigger a major version bump. The exclamation mark syntax like "feat!: ..." does not work. Thx @dotnetic for your help!
  13. New month, new version: https://github.com/baumrock/RockMigrations/releases/tag/v3.26.0 Bug Fixes double linebreaks (bf07c6b) magicpages comparing classnames without namespaces (28b5657) prevent migrating pageclasses twice (b3c9add) remove double slash when using $this->path (aa9502c) wirerandom issue on deployment (29bd145) Features add placeBefore to wrapFields() (906753c) add random salts to config-local suggestion (1e7401c) add rm-hints to field and template gui (27b5b25) add support for parent_id as page path (e45e430) imporve createPage for array syntax (74bd338) improve getTemplate (use ::tpl fallback) (b6f6d14) improve isDDEV() (e4df541) improve setFieldData() method (2830eed) use $this->path instead of DIR #22 (f134e1b) One very nice feature is that RockMigrations now adds uikit tooltips to the field and template editor where you can directly inspect the name of the property to use and also the value of one setting, which is very handy if you need a setting that you don't know by heart. With this update you don't need to find the setting by inspecting the html markup any more and you can instantly see it by hovering over the setting:
Γ—
Γ—
  • Create New...