Jump to content

Recently Updated Topics

Showing topics posted in for the last 7 days.

This stream auto-updates     

  1. Past hour
  2. Yeah, there are always issues with resizing dark parts of images. ๐Ÿ˜ก
  3. Hi Gorny! I wrote some of my data hierarchy in the format shown in the link as part of a brainstorming exercise. After doing so, I could see why I'd need to arrange it in a ragged hierarchy. I do have cases where some characters play a big role in the world without that role being tied to participation in an organization. From a ProcessWire standpoint, I could see the information from the article and your post translating into the following:: Using the normal parent/child relationship in ProcessWire for pretty urls only (which'd make doing a site map really easy). Current site has granularity levels of the following. World > (Location | Era | Cosmology) > Organization > Role > Species > Character . Each of these is probably going to be a template, though that's a lot of copypasting same fields from basic-page. But it'd also make querying specific data types easier. I'm still not entirely sure what to do with the basic-page template here since I still use that for many basic pages that just have information, but no need for granular relationship participation. Example use cases I could think of with my own data include... Some organizations have Organization > Role > Species and some have Organization > Role > _ > Character Characters can be biologically classified by their Species > Character relationship. I'm not sure how wise it is to use a repeater with a single page reference and a text field to store additional variation information. Sometimes I just want to make bird characters without a wiki entry for each type of bird instead of grouping it into a broader biological category. Like having some ravens and peacocks, but filing raven and peacock characters under a generic talking animals page. Some characters are notable across the world for a reason. So they may have a World > _ > _ > Role > _ > Character. There are some Locations that aren't bound to a world. So they might not have a parent. It might be useful in some cases to flip Role and Organization around. Like if a Location has a different relationship with an Organization, it might be useful to have a Location > Role > Organization role that reads "Enemy" and another that reads "Ally" for those role nodes. Modeling multiple parents for each leaf by the following... A Page Reference field for the worldbuilding data type that's just "parents", where all worldbuilding page template types are valid parents. Sloppy visually, but, it works? A Page Reference field for each type of worldbuilding page template that can be a valid ragged hierarchy parent for a page. Might be a lot of field overhead though, but that's probably better for form readability. After modeling the multiple parentage, if I understand how to model this in PW with the given available tools, a few other things I could do with this are... A character page can query what bloodline they have by checking the Species > Character, as mentioned before. A character can list specific roles they have for organizations by checking for Organization > Role > Character. A character can list organizations they participate in, but don't have a chain of command role by checking their direct Organization parent. Character specific roles could simply have no parent or World parents according to the page reference fields, but in the page tree could be stored directly under the character. Organizations can list all members that don't have a role by checking for no Organization > Role > Character relationships, but there being an Organization > _ > Character relationship. Chain of commands in organizations can be handled with nested Role relationships with the rootmost Roles being direct children of the Organization. If there's anything I missed from my understanding that I'd need to consider, please let me know.
  4. @a-ok I didn't know that method existed, look like it does pretty much the same as my example code above, so absolutely yes, use it! I would only change the default headers: Since your file is password-protected, you want to set 'Cache-Control: no-store' (or private) so it can't be cached on the network / CDN layer. The method also sets 'Pragma: public' by default, so this should be changed to 'Pragma: no-store' as well (or better yet, removed entirely).
  5. Today
  6. What version do you need? I can see ancient releases @ https://github.com/icecoder/ICEcoder/releases?after=v2.2 ... way back to v.0.5.9 https://github.com/icecoder/ICEcoder/releases/tag/v0.5.9 (2012)
  7. Forgot to mention that I get blank screen, in debug mode I see: Notice: Trying to get property 'compile' of non-object in /var/www/html/wire/modules/PageRender.module on line 395 Notice: Trying to get property 'noPrependTemplateFile' of non-object in /var/www/html/wire/modules/PageRender.module on line 422 Notice: Trying to get property 'prependFile' of non-object in /var/www/html/wire/modules/PageRender.module on line 423 Notice: Trying to get property 'noAppendTemplateFile' of non-object in /var/www/html/wire/modules/PageRender.module on line 424 Notice: Trying to get property 'appendFile' of non-object in /var/www/html/wire/modules/PageRender.module on line 425
  8. Dear @Robin S, thanks for your explanation! My installation was on 3.0.62 before, but maybe the fieldset has been there even longer. I am doing the access control for my fields with the "Access" tab for the specific fields as well, but I want to hide the fieldsets/tabs for users that are not able to view them (and in the future there might be a lot of them). Your snippet seems to be the perfect starting point for the desired functionality, so thanks again! Although this might be a rather specific issue, maybe fieldsets could somehow "inherit" properties from the contained fields like "if the user is not allowed to view a single field in this fieldset, he might not see the fieldset/tab as well."? This way one would keep the access logic on field level, but avoid the confusion of showing unpopulated fieldsets/tabs. Cheers, Flo
  9. I have now integrated the ProCache branch into the module and released it as version 1.0.0! I have tested the module on multiple sites and it's pretty stable now. But if you do run into bugs, let me know! The ProCache integration is now included, so you can clear out the ProCache page render cache alongside all other caches. Hopefully we can resolve the issue with minified assets, see the previous post. The documentation is now updated with information on all the new methods added in the previous release. Let me know if something isn't working for you!
  10. I have created a custom admin page which uses InputfieldPageListSelect. It works very nicely (see image), especially with a bit of css to modify the appearance within a MarkupAdminDataTable and some js with AJAX to interactively update each row. However, I would also like to be able to "view" the selected tariffs. When using a normal InputfieldPageListSelect in the admin, you can set "Enable view/edit links on selected pages" (and "Enable link to create new pages"). I can't see how to pass a parameter for that in the API. Any ideas?
  11. Think of your template as the Presentation view and the fields as properties for a Data Container, the Page gives you all the data you need, then you are in control of the presentation. This is better than how WP works , because the system already exposes the data you need, how you render the template is now up to you. This gives you room to plan the fields and pages and even have shared templates.
  12. Since get_magic_quotes_gpc returns FALSE from PHP 5.4, the installer line $value = get_magic_quotes_gpc() ? stripslashes($_POST[$field]) : $_POST[$field]; safely could be replaced with $value = $_POST[$field]; (assuming you are not installing on a legacy platform)
  13. Crazy - or an April Fool's joke! As of today... haven't tried the tips any further - but it will be hard to understand now, when the error is now gone.
  14. Just to confirm, the folks at Folding@Home are using the cluster to search for drugs that might be of use in preventing SARS-CoV2 from initiating infection. So by donating your CPU compute resources you will immediately be helping in research that could save a lot of lives. You can read more about there current efforts here. If you have GPU power that is idle some of the time, you can also have Folding@Home work packets run on that, though I think the SARS-CoV2 research is currently only running on CPUs. There's still plenty for GPUs to work on though. More about the project on Wikipedia.
  15. Converting relative URLs to page IDs doesn't seem to work if there is more than 1 URL segment (/page1/subpage/) AND the application is NOT running in a subdirectory. I had to replace line 86 from FieldtypeAssistedURL.module $urlPage = "/" . str_replace($this->wire('config')->urls->root, "", $urlParts[0]); with if($this->wire('config')->urls->root !== '/') { $urlPage = "/" . str_replace($this->wire('config')->urls->root, "", $urlParts[0]); } else { $urlPage = $urlParts[0]; } to make it work. Am I missing something?
  16. Example with a multidimensional array. RepeaterMatrix fieldname = 'fieldname' first level: page where the repeater field lives in, indexed by ID second level: per page repeater items indexed by ID third level: field inside repeater indexed by name $rp = $pages->find('fieldname.count>0'); $return = []; foreach ($rp as $p) { $return[$p->id] = []; // RepeaterMatrixPageArray foreach ($p->fieldname as $item) { if ($item->type != 'basic') continue; $return[$p->id][$item->id] = []; // RepeaterMatrixPage foreach ($item->template->fields as $repeaterField) { if ($repeaterField == 'repeater_matrix_type') continue; // we do not need this if ($item->$repeaterField === '') continue; // if you want to ignore empty strings $return[$p->id][$item->id]["$repeaterField"] = $item->$repeaterField; } // remove if empty if (empty($return[$p->id][$item->id])) unset($return[$p->id][$item->id]); } // remove if empty if (empty($return[$p->id])) unset($return[$p->id]); } var_dump($return);
  17. I now have played with Custom Page Classes too. I successfully have created a cascading hierarchy for a sort of mvc system of mine: I make massive use of templates, where most of them are simple clones. I do this to have bullet-proofed identification of specific pages, but give the clients the opportunity to change title, name, and also the ID, if he once deleted a specific page and created a new one. (Template family is set to onlyOne!) All the public viewable pages are set to the same template filename (basic-page), which previously was my controller file with all the rendering stuff. Now it's content is reduced to 4 lines only, and all render stuff is included into custom page classes, whereas it now is much cleaner to read and follow compared to before, because now I can overwrite the basic render method in custom page classes for specific pages. I created a BasicPagePage as base: <?php namespace ProcessWire; class BasicPagePage extends Page { public function renderSections() { // ... } } This one is used from all other public pages and extended only where needed: <?php namespace ProcessWire; if(!class_exists('ProcessWire\BasicPagePage')) require_once(__DIR__ . '/BasicPagePage.php'); class LegalpagePage extends BasicPagePage { public function renderSections() { // override parent method here, if needed } } Here is a debug list of a few pages The basic-page.php controller now: <?php namespace ProcessWire; // load header with navbar and footer with links, hamburger, scroll-to-top item, etc. include(__DIR__ . '/includes/_header.php'); include(__DIR__ . '/includes/_footer.php'); include(__DIR__ . '/includes/_absolute-positioned-elements.php'); // call method in CustomPageClasses to render all public viewable sections of the current page $page->renderSections();
  18. Yesterday
  19. v0.1.1 released with support for Repeaters and comma as decimal separator. Thanks @David Karich!
  20. Glad you have found a solution. It would be nice if you could share it here, so that other community members who have the same question in the future, will benefit from it. I guess you used a hook in the end?
  21. I've used this library with success to import products or update them regularly like on a cron job: https://github.com/donutdan4114/shopify Takes care of rate throttling too which is nice!
  22. I wasn't able to correct it, but the website had to launch so I uninstalled the Module and am using the direct API for Snipcart in the php templates and their dashboard for managing orders. Before I uninstalled, I couldn't find a single logged error anywhere.
  23. Sorry yes I mean ProFields: Table
  24. It looks like you're using Hanna Code with one or more of your indexed fields. Is that correct? Here something is trying to resize a Pageimage object while it's actually a Pageimages object, which usually means that output formatting is off. If so, you could fix this in the Hanna Code snippet itself (by checking for Pageimages and getting the first Pageimage from it). I'll see if there's something I can do to make this work better, but that's the quick fix anyway. (Assuming I understood the stack trace correctly...)
  25. Last week
  26. It's not built out of the box, but you could easily build a Process module, and render the forms you need using the formbuilder API you'd normally use on the frontend.
  1. Load more activity
  • Create New...