Jump to content

horst

PW-Moderators
  • Posts

    4,088
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by horst

  1. Textformatter module that parses image tags and, maybe according to class names, process and replace them with what you want them to be.
  2. Hey Martijn, I have tested the module with the latest stable, 3.0.148 as blank profile, added the field to it, made a role editor which only gets edit rights and the CAI4 permission. Everything seems to work as expected. I can upload, delete and process crops. When I remove the CAI4 permission from the editor role, I get a modal with a blank admin page and a link to the homepage. But I'm unable to do something that raises an exception or error. Can you give me some infos about your setup and what you do or have done to run into the issue?
  3. Exactly what @flydev ?? said, but for 5.) you alternatively may use core image fields with the lately added functionality of adding custom fields to them. So it depends on how you want to structure that part. And additionally, also if you haven't asked for it yet, but maybe the question arises later: 9) Search = https://modules.processwire.com/modules/search-engine/ 10) Privacy & Cookies = https://modules.processwire.com/modules/privacy-wire/ ?
  4. This one is because you cannot use case sensitive filenames on systems like windows. If you would have myFileName.jpg and then you would get and save MYfileNAME.JPG, the latter would overwrite the first. And for the issue in general, I would file an issue on Github, so that Ryan get recognition of it. Maybe he than knows what is the best place to fix that.
  5. Wow, the youngest is already 6. Really, time flies. For me, most things are fine or ok. The only annoying thing is that I don't have a good place to work right now. At home there is too much unrest, I don't want to visit the CoWorking place I rented since the end of last year so often. Cafes are closed, you are not allowed to sit in the park. I have no real idea about it. So I sit at home in the hustle and bustle and only get half as much done as usual, which seems to me twice as exhausting. ? (It may also be that I am simply getting older and therefore have a greater wish for quietness.) ?
  6. Hi Martijn, thanks for testing! I think, I haven't tested as simple user. To be honest, I haven't tested much at all. So, "being so active" seems to be relative, depending on POV (point of view). ? Is everything ok on your side? The children are growing, (maybe way to fast)? ?
  7. @kixe what do you think of this scenario: CronjobDatabaseBackup writes a Identifier Comment Word into all its files, and if that identifier is missing, just ignore it in all routines.? So, stopword also sounds good, but needs manual action everytime. The other way round, if I create manual dumps and want to delegate them to CDBs cleaning routine, I can include the identifier word. This has less harm when forgot or mistake on including a word.
  8. +2 All Backups from CronjobDatabaseBackup must be identified by comment signs, not by filename format. Filename formats may change for some reason.
  9. If you, for what ever reason, need to present a link to a static *.ics file for download, you can add this line to the servers .htaccess file instead have to send http headers: AddType text/calendar .ics
  10. I just deleted my post while the post from @szabesz chimed in, and he has written it in a more structured way then what I had done. So, nothing to add from me here. @Jared Welcome to the forums. ?
  11. I cannot see any place where you want to load the mentioned js scripts. But I spotted something in your js file, the only one that gets loaded (http://www.permaculturaorganica.info/site/templates/styles/assets/js/po-home.js). There you use a bunch of bg-images with relative (sub) pathes. Have you tried to use absolute URLs instead? // Slideshow Background. (function() { // Settings. var settings = { // Images (in the format of 'url': 'alignment'). images: { 'styles/assets/img/sfondi/po-index/bg0.jpg': 'center', 'styles/assets/img/sfondi/po-index/bg1.jpg': 'center', ... the above with absolute URLs for the images: // Images (in the format of 'url': 'alignment'). images: { '/site/templates/styles/assets/img/sfondi/po-index/bg0.jpg': 'center', '/site/templates/styles/assets/img/sfondi/po-index/bg1.jpg': 'center', ...
  12. Follow the suggestion in the post above yours. (The link into the other thread)
  13. ... ...and show it visually! Following is a snippet, not a tutorial. But maybe it is useful for someone. Everyone knows the possibility to define a checkbox as required. However, a submit button would then visually execute the click movements and show the active color on hover. Depending on the status of the checkbox, you can either disable the functionality of the submit button via CSS ( pointer-events: none; ), or display a not-allowed cursor. But IMO, each of the two is asking for the other. If you embed the button in a wrapper element, you can marry both of them together. <fieldset class='gdprconsent'> <input type='checkbox' name='gdprconsent' id='gdprconsent' required='required' autocomplete='off' /> <label for='gdprconsent'>I agree to the privacy policy.</label> <div class='submitWrapper'> <input type='submit' name='submit' id='submit' value='Submit'> </div> </fieldset> #gdprconsent:not(:checked) ~ div.submitWrapper { cursor: not-allowed; } #gdprconsent:not(:checked) ~ div.submitWrapper > input[type='submit'] { pointer-events: none; } #gdprconsent:checked ~ div.submitWrapper > input[type='submit'] { cursor: pointer; }
      • 6
      • Thanks
      • Like
  14. I don't think that there is a setting for only-for-superusers under CLI, as CLI itself only is for superusers. Maybe you can hook into error logging and fiddle that in?
  15. ,@neophron, I think this module and the service behind it has nothing to do with what was called "quality loss" in the above posts. It is a good method to compress your (final) png image variations to get smaller filesizes. But maybe nowadays you can use WebP format directly in PWs core, instead to stick with png output, and than having to invoke a remote service?
  16. Somewhere in your template code you loop through your repeater items. There you have each of them as a Page, but with your own given name. This $variableWithYourCustomName is a PageObject and has all the properties and methods that you know from the global $page variable, that holds the current page. Have you tried $yourNameForRepeateritem->createdUser ?
  17. @ceberlin Many thanks for testing and providing feedback! ? Good to hear that you successfully switched 8 websites from v3 to v4.
  18. 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();
  19. $options = ["forceEngine" => "ImageSizerEngineGD", "forceNew" => true]; // also add forceNew = true while testing !! $pageimage->size(100, 200, $options); I think it should be this. But not 100% sure if the spelling is correct.
  20. Ok, I found it. Here is something related to the topic:
  21. I have seen something like this in the past. It looks like the source image is not clean clipped. You may open it in photoshop and hover over the first pixel beneath the object. I bet it has color 255,255,255 but with opacity. Otherwise IMagick would take the gray color value of the shadow. If you have this as photoshop layers, please check the clipping of the object(s) and maybe correct it. Also a good thing is to add some monochrome noise to the shadows only. Also you may try setting "defaultGamma" => -1, in $config->imageSizerOptions in the site/config.php. And try with forceEngine GD, just to see how it works out in comparison to IMagick. But I'm sure that the issue belongs to the above explained somehow unclean clipping of the objects.
  22. Yes, without the need to enlarge the images on the bottom side, this would be a perfect use. But I needed a smooth transition from bottom black to transparent, without a visible hard line where the added bottom space touches the image. I couldn't figure out a css only solution that combines all needed parts. Also the current browser support isn't good, and I would have to use filter with additional layer divs instead of backdrop-filter.
  23. Maybe your $ap is a pageArray and not a single page? Maybe you test this better with var_dump($ap), as you seems to be in scope of template files, it will out strings / numbers, but it is a pageArray. Check this, or check with echo count($ap); or echo $ap->first(); to see if it is a number or an array.
  24. This seems to be working:
×
×
  • Create New...