Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates     

  1. Past hour
  2. I didn't want to create a topic for this, so I decided to use my existing thread , as mentioned, I am creating some Youtube tutorials around Processwire, I feel a video is much more easier to help people getting started with Processwire. So I did a first video introduction, However I quickly realized my dilemma with self expression skills when talking, so I am working on that but here is the first video and I hope to drop a Video per week or more depending on how fast I can get things out but I am also open to covering other complex topics too around Processwire. Thanks and I hope this helps out a lot of people. NOTE: LOL Working on how I sound too 😁, bear with me Love from Nigeria
  3. Yesterday
  4. BillH


    For a basic approach: $breadcrumbs = $page->title; foreach($page->parents() as $parent) { $breadcrumbs = "<a href='{$parent->url}'>{$parent->title}</a> / " . $breadcrumbs; }
  5. @teppo Dude, this was in my head when it worked. Thank you!!!
  6. Hi @teppo First I have to say: WOW! I took another look at your module because I got again frustrated with my setup and I wanted to build something on my own. Luckily I remembered your module and came back to the docs before developing something on my own 🙂 Thx for the docs, they are great! Some suggestions: It would be great to have < prev | next > links on each page at the bottom. I almost missed all the other great pages when reaching the bottom of https://wireframe-framework.com/docs/ (the menu is not visible in the sidebar on such long pages) It would be great to have a simple hello-world walkthrough for setting up a custom wireframe template (instead of providing a full-blown site profile). It's always easier to understand something if you start from scratch than finding your way around several files not knowing which pieces came before and after another. And then something more advanced and more important: I think it would be great to get a little more (or different) control over where Wireframe does look for files. I read about the config settings, but IMHO they are a little limiting. As far as I understood one can define a path for every type that Wireframe is based on (views, controllers, components, etc). And as far as I understood it is possible for components to define custom view files via Wireframe::component('foo')::setView('bar'); Is that correct? The problem with that approach is that it is not possible to load components from outside of the wireframe folder structure. That's a quite big deal, because if that were possible, we could ship custom components/views/partials (I'm planning on working on styles using RockLESS) directly within our modules and that would just be awesome! Take this example: module RockSearch lives in /site/modules/RockSearch |- Wireframe | |- js | | '- search.js | |- less | | '- searchform.less | '- partials | '- searchform.php '- RockSearch.module.php What if we had a new Wireframe type called "package"? This could be included in any Wireframe layout like this: <?php $css = RockLESS::css([ $packages->RockSearch->less->searchform.less, $packages->MyGreatModule->less->style1.less, ]); ?> <html> <head> <link rel="stylesheet" href="<?= $css ?>"> <?= $packages->RockSEO->partials->meta() ?> </head> <body> <section><?= $partials->header() ?></section> <section><?= $packages->RockSearch->partials->searchform() ?></section> ... </body> </html> Finally we'd only need to tell Wireframe about the packages: $config->wireframe = [ ... 'packages' => [ 'RockSearch' => $config->paths->siteModules."RockSearch", 'RockSEO' => $config->paths->siteModules."RockSEO", ], ]; // or something like this Wireframe::addPackage($config->paths->siteModules."RockSearch"); This would finally bring some standards to the ProcessWire frontend which would make a huge difference regarding reusability! If we found a bug in RockSearch, we could directly fix it in the modules partials which would make it instantly available to all projects using it after a simple modules update! Thx for your great work again! What do you think? PS: Defining different views/partials for RockSearch should also be possible making it easy to support different frameworks or framework versions, eg $packages->RockSearch->partials->uikit3() or ->bootstrap4() etc. PPS: I didn't quite get where the differences between using controllers+views or components+views/partials are?!
  7. I would go this way, without invoking ready.php or other resources: <div class="grid"> <?php foreach($page->grid_ext as $item): ?> <div id="pteg_<?= $item->id ?>"> <?php // specify the template viewfilename like this, if it is a single viewfile: $viewFilename = $wire('config')->paths->templates . 'blocks/myblockviewfile.php'; // or if you have different files get them from template properties: $viewFilename = $item->template->altFilename ? $item->template->altFilename : $item->template->name; $viewFilename = $wire('config')->paths->templates . 'blocks/' . $viewFilename . '.' . $wire('config')->templateExtension; // check if viewfile is available if(!is_readable($viewFilename)) { echo logSectionError('Missing Template-View-File!', '<strong>' . basename($viewFilename) . '</strong>'); continue; } // now pack a bag with all needed variables for the block render template file: $viewBag = []; $viewBag['item'] = $item; $viewBag['page'] = $item; // if you use the $page var in your template file, pass here the current item-page to it ! $viewBag['pages'] = $pages; // optionally if you need other vars, add them here $viewBag['config'] = $config; // " // and render the block echo "\n " . wireRenderFile($viewFilename, $viewBag); ?> </div> <?php endforeach; ?> </div> https://processwire.com/api/ref/functions/wire-render-file/
  8. I'm totally agree with your opinion. Even it's beta.. We could start to implement it, use it, find bugs, help to fix it etc. We could start our projects and show something to our clients, get familiar with the system.
  9. That gives me the expected result (just like the output of a field with the default `datetime` Fieldtype). echo $return->getUnformatted('programm_date_advanced') // e.g. `1562233140`
  10. This old thread should get you started. However, I am not sure how you would be able to get the current value of the start time to compare against.
  11. Hey @michelangelo! just a quick heads-up: the Modules area of the forum is reserved for third party module support threads, one per module. This topic is about a core feature, so I'm moving it to General Support instead.
  12. Last week
  13. I think that is actually the approach I've used in the past as well!
  14. You have just said a whole load of things I don't understand since my 20 years that I started developing. This is why I choose ProcessWire, I dont understand it now, I know its more than likely covered in the future.
  15. Relative to ProcessWire 3.0.161, version 3.0.162 contains 24 commits that continue upgrades/improvements to selector operators, fix various minor issues, add new API convenience methods, improve documentation, optimize and refactor various portions of code and DB queries, and much more. For full details, see the dev branch commit log as well as last week’s post. Next week I hope to finally finish up a new version of ProCache and continue with some additional core to-do items. By early August my hope is that we’ll have the next master branch version ready. Also added this week is a new dedicated documentation page on this site that covers all of ProcessWire’s selector operators, including all the newly added ones here: selector operators. Thanks for reading and have a great weekend!
  16. I don't understand the question, I am afraid. Please explain.
  17. Hello @teppo, when using the module with @ryan's TOTP two-factor authentication, the user is logged as "Successful attempt: NO", and the user id instead of the name. is displayed in the "WHO" column. Probably because the login process has an extra TOTP code screen.
  18. You're right, thanks for letting me know. Links should be fixed now. I just switched to a different GitHub username and hadn't come around to updating the links yet. The docs can be found here now: daun.github.io/processwire-dashboard/
  19. It works now. Thanx for fast solution!
  20. Will look into it, thanks for your help @BitPoet, really appreciated.
  21. Hi everyone! I'm trying out the Login/Register module for my site. Noted that the module assigns the newly registered user to login-register role. Once you modify the login-register role's permissions, particularly adding page-edit, the new member role will be set to guest. Thing is I'd like to grant my new users the power to create their own pages. Any advice? Thanks.
  22. Thanks, @elabx! It works! So it'sactually ok to interchange them. 😛
  23. Interesting to read your reply, per the other thread I just managed to get PW working with SSL connection to MySQL 8 and have seen the performance absolutely tank. I'm running a tiny site though, so would not expect to see such a shift from lack of query cache, wondering if there might be anything else going on.
  24. WTF this actually works! I've been hit by this bug the very first time, also in Firefox (v78.0.1 in my case) which I rarely use for working in the admin, so properly that is why I have not yet experienced this issue before, though as far as I understand others experienced this in Chrome too. I can confirm that opening a new admin page in Firefox does indeed fixed the issue.
  25. Hello, I manage a client website which use PW and Padloper for ecommerce. We recently had an issue where customers were seeing other customers' baskets and prefilled form data on the checkout form. From what I saw, the data was not users who had accounts, just data which was held in their sessions. I think I have narrowed this down to being caused by nginx fast-cgi caching, but I do not know enough about how this works to be certain. I have a couple of questions: • Can fast-cgi cached cause session data to be shared, leaked or incorrectly assigned? • Can fast-cgi cache provide authentication to unauthorised users? I'm reasonably confident that the whole shop cart and checkout bypassed the cache, so is it possible that somebody could 'swap' sessions on a diffetent part of the site which shouldn't have been cached? I don't have a great deal of knowlegde of how sessions, caching and cookies work and fit together, so if it's likely that the fastcgi-cache isn't the problem, can anyone point me in the direction of what might be?
  26. Another approach to try: // Store page changes in custom property on $wire $wire->addHookAfter('Page(template=contact|sample)::changed', function(HookEvent $event) { $page = $event->object; $what = $event->arguments(0); $old = $event->arguments(1); $new = $event->arguments(2); $page_changes = $event->wire('page_changes') ?: []; $page_changes[$page->id][$what] = [ 'old' => $old, 'new' => $new, ]; $event->wire('page_changes', $page_changes); }); // Send email if there are page changes after the request is finished $wire->addHookAfter('ProcessWire::finished', function(HookEvent $event) { $page_changes = $event->wire('page_changes'); if($page_changes) { // Send the email using the values in $page_changes ... } });
  1. Load more activity
  • Create New...