Jump to content

horst

PW-Moderators
  • Posts

    4,088
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by horst

  1. Send a "forceNew" => true together with your images options to override existing image variations. $options = array("forceNew" => true); $image->width(500, $options)->url; Or use PIAs global (sitewide) setting for "forceNew" (in PIAs module config page) and switch on PIAs forceNew just load the page(s) with this image(s) again switch off PIAs forceNew
  2. I believe I have setup my Github the wrong way, I get notify messages for allmost everything, but not for issues of my own repos. I haven't seen it, but will look into it now.
  3. I have enabled preloading with lazysizes. Does this "feel" better?
  4. Hhm, I see. You are right. With the second load of an image, the lazysizes is contra productive. Is there a way to combine both? Lazyloading for first display, and local cached version afterwards?
  5. I only have Chrome 43, there it is fixed. I have added it to the stylesheet. Thanks!
  6. Thats how lazysizes works. One can use lowres images or blank (1x1 px transparent gif as base64 data) for images beneath the fold. The images are cached, but only gets loaded when you scroll down. EDIT: And yes I think it is worth to have lazy loading here, at least if one is on mobile with a small connection.
  7. NOGAJSKI FOTOGRAFIE I have relaunched my homepage. I don't remember exactly how many versions I may had since I launched my first homepage in 1999, but for me, the new one seems to be the cleanest and fastest. At least its the one with the best backend ever. (PW 2.6) The layout of all pages, including the slideshow, is usable from (300 x 260 px) up to bigger desktops (27''). I have tried to satisfy google PageSpeed, but only in a medium range. Other tools than googles do a more in depth analysis and show much better detailed results. But anyway. All pages uses one sitewide css file and one sitewide js file. Only the portfolio slideshow loads an additional js and css file too. (The server is setup to force browser caching, so with the second page view, no js or css dependencies need to be downloaded.) And ProCache is used! (what else) Besides my images API tools I use delayed output via Spex. CSS framework is pocket-grid and on the JS side I use LazySizes, Vegas and the new Photoswipe 4. Thats all. http://nogajski.de/ Here are some screens with minimal viewport (300x260): and here are two medium screens:
  8. I'm a lazy writer. But you are right, named is more future save.
  9. It works as always with params: $inputfield = $event->object; $pagefile = $event->arguments(0); $id = $event->arguments(1); $n = $event->arguments(2);
  10. I think the WireMailMandrill module is wrongly set to singular: https://github.com/craigrodway/WireMailMandrill/blob/develop/WireMailMandrill.module#L31 Juts try out with setting this to false, and if it works, drop a note to @Craig. My WireMailSmtp is set to false here, Teppos WireMailSwiftMailer is also set to false.
  11. horst

    von Bergh

    This site definitely need some caching and lazy loading. Also when I switch the language, I have to wait again a long time.
  12. Many thanks! I have updated the repo!
  13. I love Shaun, ...
  14. https://medium.com/artificial-labs/why-we-don-t-use-wordpress-anymore-df1c4462cb48
  15. OT: @mr-fan, thanks for the "reminder"! Forgot to implement this myself. (I need to add some noscript - background url images!)
  16. This is nothing that urges. In the past (not a PW site!) I simply logged all 404 to 2 files, one with only the urls. Then, from time to time, I have manually loaded it into my editor which has a function to make all entries (lines) unique (drop all copies). From the resulting lines I created entries for the htaccess like: Redirect gone /admin/ Redirect gone /db/ Redirect gone /dbadmin/ Redirect gone /ecommerce/ Redirect gone /sqlmanager/ Redirect gone /typo3/ Redirect gone /webstats/ Redirect gone /wordpress/ Redirect gone /connector.php Redirect gone /index2.php Redirect gone /wp-login.php This way my 404 log becomes more and more clean and the attackers hopefully gets a feeling like "Damn, to late again!" A 404 monitor module that determine a scan attack optionally can send 410 headers for the next 5 or 10 minutes to the originating IP. No more editing the htaccess for this. I will send you the sqlite wrapper. I have looked at it, but currently it depends on a subclass of mine in regards to filelocking. I will change this to result in a single class before sending.
  17. Hi Mike, I have installed jumplinks on my new homepage and enabled the 404 logger. When I want to just edit a small piece in a page, I could see life a scanning attack for vulnarebilities: These attacks can test several hundred links. So, after such a scan, the 404 Monitor (limited to the last 100 hits) is pretty useless. What about (optional) alternative storage of the links? Simple logfile or maybe better a sqlite db file? This way you don't need to spam the MySQL-DB with those spam entries but the useful links also don't get dropped. So, with lots of entries, the 404-Monitor table needs to have pagination then and maybe a function to select / delete entries. If you interested in this, I can provide a ready to use wrapper class for sqlite, (create, insert, update, read, delete). ----------- Edit: Also useful solution could be to exclude the 404-Monitor as separate module and give it some more functions like detecting IPs and when seeing those attacks, temporary block the IP for a short time. But this has nothing to do with jumplinks. That's why I said make 404-Monitor a external / submodule, that can be used for / from different other modules.
  18. depends on how the fields are weightened, more to include or more to exclude. I prefer to write lesser. You also can make this decision configurable. ;-)
  19. Yep, you can exclude fields on a page. This is not a hacky solution, you can use it as a customized version, or you make the module configurable with at least one Textarea field where you define imagefields to exclude, one per line. This way you can drop it into diferent sites and no need to hack.
  20. So, when storing those pagetable child pages as native children in the pagetree, we can easily get them selected. But when we need to store them on a different (out of the way) location in the pagetree, this relation is lost. Wouldn't it be nice to have the ability to build a selector like: $pagetablechildren = $pages->find("parent-pagetablefield={$page->pagetablefield->id}, template=xyz"); Or is this already possible and I simply don't know it?
  21. The first part of your idea is practicable, the second one not. At least I don't want to add properties to pageimage from a croppableimage cropsettimgs field. For example if someone calls his thumb "crop", it collides with existing pageimage property from new core. Also it has potential that properties from (other) third party modules collides with those properties. I'm not 100% sure, but tend more to no then yes. Best way to contributing is to send pull requests to Github.
  22. Another way could be to use two image fields, one called imagesbefore and the other imagesafter. Set them up to be displayed side by side each 50% width in the template. You can get them like for ($i=0; $i<count($page->imagesbefore); $i++) { $urlbefore = $page->imagesbefore->eq($i)->url; $urlafter = $page->imagesafter->eq($i)->url; }
  23. Hi, I have uploaded a new version to Github that fully supports PW 2.6+ with its new naming scheme. The package now ships with two Pim versions, the older one, called Pim, that can be used until PW 2.5 stable, and the new one, Pim2 that should be used with PW 2.6+ So, if you start a new site with PW 2.6+, simply install Pim2 only! If you have upgraded PW to 2.6 on an existing site with lots of image variations, you should install Pim2 additionally to the older one, (do not uninstall it yet!) then you should start to change your API calls in your templates like the following explanation . here is a code line from the older Pim: $image = $image->pimLoad($prefix)->watermarkText($txt, 75)->setQuality(80)->pimSave(); . To start with smooth change from Pim to Pim2, you can change it to this: // use the old Pim to remove the PimVariations with old naming scheme: $image->pimLoad($prefix)->removePimVariations(); // in the copied original code line, only change pimLoad to pim2Load, note the number 2 ! in the new start method ! $image = $image->pim2Load($prefix)->watermarkText($txt, 75)->setQuality(80)->pimSave(); . This way you have some control on which parts the new creation may take effect, e.g. on a small site you can change all API calls at once and drop caches if exists. On bigger sites you may start at one template / page first, and add more changes later. . Regardless of this, you can safely let the call to the older removePimVariations() method stay in your code for a while, as they do not interact with the newer one. After a while, when you do not see any of those old filenames in your assets/files folders, you can remove those lines from your code and also uninstall the older Pim. All other methods than pimLoad / pim2Load are completly identical and can be seen here in the API
  24. You need to apply the watermarking to the right image(field). If you don't want oversized, watermarked images in your header menu, simply do not apply it there. Look through your template code and find the right position, not where you have the header menu but where you output the postcard image. Also be aware that currently, when trying out things, you may get displayed cached images also when altering the code. To force new creation of Pim images put as a second argument to pimLoad() a boolean true, BUT don't forget to remove it, once you have finished your code!
  25. This error says that there is something wrong with your PNG file. Please check on the tools template if the watermarkfield is set for a single image or for multiple images. If it is setup for multiple images, please correct it. You can also check in your template if you got an imageobject: $png = $pages->get('/tools/')->watermarkfield; if (empty($png)) { // uhm, something went wrong! ... stop with further execution }
×
×
  • Create New...