Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/02/2020 in all areas

  1. Displays image tags overlaid on the thumbnail using customisable colours. This makes it easier to see which images have which tags without needing to open the edit pane for individual images or changing to the list view. Screenshot Usage Enable tags for one or more image fields. Install the Image Thumbnail Tags module. Optionally configure colours for any of your tags. https://github.com/Toutouwai/ImageThumbnailTags https://modules.processwire.com/modules/image-thumbnail-tags/
    12 points
  2. I hope that you all are having a good week and staying healthy. I’ve been very much focused on preparing a new ProcessWire-powered client’s website for launch, hopefully sometime next week. This is a site that’s already pretty well established with the search engines and such, so I’ve been going through all of the pre-launch QA in terms of optimization, SEO accessibility, mobile testing, getting the multi-language translators everything they need to translate, adding ProCache to the picture, and so on. For me this is one of the most fun parts of development, with relentless optimization and having it all come together… but also one of the most time intensive. This is where all the little details surface, things that need improvement become more apparent, and new ideas keep popping up. It’s also where lots of the bugs are discovered and fixed, and where I sometimes have to slap myself on the head for missing one thing or another, but then of course taking care of it. So that’s been most of this week, and I think likely at least half of next week too. But then it’s back to work on the core and modules, covering issue reports and more. I’ve actually been at work on some parts of the core and ProCache this week as well, but not to the point of finishing anything major. So you’ll see some updates on the core this week, and there’s also lots of stuff pending that’s not yet committed, and it’s all work in progress, so stuff to review later. With kids at home I’m still moving at a little slower pace than usual, but starting to get the hang of it, doing well and building momentum. While I don’t have much new to offer in this update, thanks for reading anyway, and I hope that you have a great weekend!
    11 points
  3. ? love this one! Very nice. I have tested it and found out, that it works the same across the core image field, the CAI3 and CAI4 image fields. ? Unfortunately ATM for me it only works with the tags setting "user by text input", and not with any setting of predefined tag lists. ------ And, if you don't mind, would it be possible to set opacity to something like 0.3 or hide the labels completly, while the user is using the zoom/focus function? (When the thumb has focus, or has focus and mouse-down or something that like)? This is not really necessary. It would just be the missing 1% to bump it from 99% to 100% perfect. ?
    3 points
  4. Hi Ryan, Congratulations with your project. Isn't it great to have clients and be able to work from home to make money. Especially in this corona lock down time. I wished I found Processwire 10 years ago. But at least I will be able to make money online as an addition or replacement for my future pension. Pensions here in Spain are already very low, and it is questioned here what will be left for pension money after 10 years. I want to thank this great forum and wish all the coders good business. Greetings from Spain.
    3 points
  5. A new module that hasn't had a lot of testing yet. Please do your own testing before deploying on any production website. Custom Paths Allows any page to have a custom path/URL. Note: Custom Paths is incompatible with the core LanguageSupportPageNames module. I have no experience working with LanguageSupportPageNames or multi-language sites in general so I'm not in a position to work out if a fix is possible. If anyone with multi-language experience can contribute a fix it would be much appreciated! Screenshot Usage The module creates a field named custom_path on install. Add the custom_path field to the template of any page you want to set a custom path for. Whatever path is entered into this field determines the path and URL of the page ($page->path and $page->url). Page numbers and URL segments are supported if these are enabled for the template, and previous custom paths are managed by PagePathHistory if that module is installed. The custom_path field appears on the Settings tab in Page Edit by default but there is an option in the module configuration to disable this if you want to position the field among the other template fields. If the custom_path field is populated for a page it should be a path that is relative to the site root and that starts with a forward slash. The module prevents the same custom path being set for more than one page. The custom_path value takes precedence over any ProcessWire path. You can even override the Home page by setting a custom path of "/" for a page. It is highly recommended to set access controls on the custom_path field so that only privileged roles can edit it: superuser-only is recommended. It is up to the user to set and maintain suitable custom paths for any pages where the module is in use. Make sure your custom paths are compatible with ProcessWire's $config and .htaccess settings, and if you are basing the custom path on the names of parent pages you will probably want to have a strategy for updating custom paths if parent pages are renamed or moved. Example hooks to Pages::saveReady You might want to use a Pages::saveReady hook to automatically set the custom path for some pages. Below are a couple of examples. 1. In this example the start of the custom path is fixed but the end of the path will update dynamically according to the name of the page: $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); if($page->template == 'my_template') { $page->custom_path = "/some-custom/path-segments/$page->name/"; } }); 2. The Custom Paths module adds a new Page::realPath method/property that can be used to get the "real" ProcessWire path to a page that might have a custom path set. In this example the custom path for news items is derived from the real ProcessWire path but a parent named "news-items" is removed: $pages->addHookAfter('saveReady', function(HookEvent $event) { $page = $event->arguments(0); if($page->template == 'news_item') { $page->custom_path = str_replace('/news-items/', '/', $page->realPath); } }); Caveats The custom paths will be used automatically for links created in CKEditor fields, but if you have the "link abstraction" option enabled for CKEditor fields (Details > Markup/HTML (Content Type) > HTML Options) then you will see notices from MarkupQA warning you that it is unable to resolve the links. Installation Install the Custom Paths module. Uninstallation The custom_path field is not automatically deleted when the module is uninstalled. You can delete it manually if the field is no longer needed. https://github.com/Toutouwai/CustomPaths https://modules.processwire.com/modules/custom-paths/
    2 points
  6. Thanks, I should have tested that. Fixed now in v0.1.1 Good idea, I've added this in v0.1.1
    1 point
  7. Thanks @horst, Adding a count check did in fact solve the problem. if(count($page->banner) > 0) { $thumb = $page->banner->getRandom()->size(200, 200); echo "<a href='$thumb->url'>"; echo "<img src='$thumb->url' alt='$thumb->description' />"; echo "</a>"; }
    1 point
  8. Hey, I would do a type check on the return of banner->getRandom(). You do not check if there is always at least one image available. Or just temporary try this for a while and see if it behaves the same with the log filling: $random = $page->getUnformatted("banner")->findRandom(1); if(0 < count($random)) { $thumb = $random->first()->size(200, 200); echo "<a href='$thumb->url'>"; echo "<img src='$thumb->url' alt='$thumb->description' />"; echo "</a>"; }
    1 point
  9. Stripping off empty paragraphs can be harder than it may sound: As requested by @netcarver I put it into a textformatter module: https://github.com/BernhardBaumrock/TextformatterRemoveEmptyParagraphs https://modules.processwire.com/modules/textformatter-remove-empty-paragraphs/ TextformatterRemoveEmptyParagraphs ProcessWire Textformatter to remove empty paragraphs from CKE fields Removes empty paragraphs from a html string. A paragraph is considered to be empty if it only contains one or more of the following: regular whitespace UTF-8 encoded whitespace all variants of <br/> PS: I'm actually not sure if that makes sense as Textformatter at all. IMHO this should be done on processInput, so it's more a sanitization than a textformatter... @netcarver what do you think, as you requested this... ?
    1 point
  10. Hey @bernhard. Just a quick heads-up: the support board link in the modules directory points to the GitHub repository. Assuming that wasn't intentional ?
    1 point
  11. This was very helpful to me! Thank you!
    1 point
  12. The collection panel does allow for an ›Add New‹ button. It's just not documented at the moment. You can either specify the child page's template or the parent page and it'll figure it out. For the template option to work, the child template must have a default parent defined. This should work: $panels->add([ 'panel' => 'collection', 'title' => 'Widgets', 'data' => [ 'collection' => 'template=widget, limit=6', // Option A: Add to child template's defined parent page 'template' => 'widget', // Option B: Add to specific parent page (page, ID or selector) 'parent' => 'template=widget-list', ] ]);
    1 point
  13. If the target page (new parent) doesn't have already children you need to mark (click) it before moving the other page.
    1 point
  14. I use this 5 lines of code, placed in an access controlled folder under root, to run a cronjob at fixed time. Just set 'cycle' in module settings to 'none' to prevent database backups triggered by LazyCron as well. <?php namespace ProcessWire; $root = dirname(__DIR__); include_once("$root/index.php"); $cdb = $modules->CronjobDatabaseBackup; $cdb->cronBackup(); Thanks for the input. I thought about it. In the end, I'll leave it as it is, and the inclusion of manually created dumps in the cleaning routine remains the standard. When I manually create a dump, I usually move or download it immediately. I rarely (never?) leave it on the live server and I want the files removed automatically. The default name created by ProcessDatabaseBackups is the database name. Just use this as the 'stopword' and use a different name format in the setup of CronjobDatabaseBackup and voila it works exactly as you want it. Furthermore there is also the option to save the files in a user-defined directory. Manually created dumps are then never affected by the CDB's cleaning routine.
    1 point
  15. Never tried this module, but it looks like this is what you are looking for:
    1 point
  16. Ah, I think the missing certificate is actually the reason Chrome refuses to load the images, because they’re coming from a different domain (www. vs. no www.). This happens in Firefox as well. If you use a relative address like you did in the sidebar, it should work. Edit: so the problem was in fact visible in your initial code snippet. My apologies ?
    1 point
  17. Kind of doubt it’s a difference in how Chrome and the other browsers interpret the HTML ? It’s probably a CSS or JS thing. Have you been looking at the developer tools? Maybe there is something helpful in the javascript console. It’s going to be difficult to debug from afar. Is the site online anywhere?
    1 point
  18. Hey @OllieMackJames thank you, also for the donation. I think it came from you? ? I'm not able to reproduce the problem with the prompt. Does the DeveloperConsole give you any JS Errors? I had tried to implement the multiselect function before. But I failed on some points because it was not stable and reliable and in the end there were too many dirty JS hacks. Originally, this module was just a proof of concept, with the hope that @ryan would implement this function cleanly into the core of RepeaterMatrix. The needs for this feature are already quite high for the users.
    1 point
  19. Not sure why this hasn't been mentioned, so I am wondering if I am missing something relevant, but why not use the $template->noSettings option? Do you need to hide on a page basis, rather than per template? Anyway, if it suits your needs, turn on advanced mode in your config.php file and then you will have a Disable Settings Tab? option on the Template's System Tab. Hope that might help.
    1 point
×
×
  • Create New...