-
Posts
4,085 -
Joined
-
Last visited
-
Days Won
87
Everything posted by horst
-
Please read & follow my solution exactly. The way you described doesn't work & it isn't meant to do so. It describes a way to only protect the original images. Therefor you need to deny all access to them via htaccess file. In a second step, you enable access for superusers (or who ever you like) via a proxy (php) script. Nothing (!) is embedded into your PW-installation, only the htaccess file.
-
@chrizz my question was, if you used <head></head><body></body> tags in your HTML-message. Now I know, you don't. That was the reason why the Signature wasn't attached to the HTML-message-part. https://github.com/horst-n/WireMailSmtp/blob/532dd94752597a4b2b9f3a2c02ef48b21db77f84/WireMailSmtpAdaptor.php#L280-L285 With the modules update to version 0.2.5, the html-signature get added in both cases.
-
@chrizz can you confirm that your html-message doesn't contain a body endtag? </body> If this is the case, you can update the module to the new version 0.2.5, where this is fixed.
-
Yes, please do. will merge it later today and do a more indepth test on weekend. Thanks you both.
-
@tpr if this is right, (I haven't tested it), we would need something that works with all possible variation names. On weekend I can setup a test system, (also online), and check all combinations. (and give you access to it if you like).
-
I added the timestamp to the url. So I wasn't able to reproduce this issue, but cannot see any harm by adding the timestamp to the url. If you think this should be added to the core Variations Page, please make an issue at Github.
-
I can't really follow what is it are you speaking of. ? Is a Screenshot available?
-
You are local on Windows? Windows filesystem isn't case sensitive. Others are. That's why it works on windows, and that's why windows is not the best dev-platform. So, I'm working on windows too, but have the advantage that I'm working with win-computers since back to times of DOS. (That was before Windows 3.1 ) Some of the restrictions from that times I'm using until today, regardless of current working platform: only lowercase filenames, if there is a 1% change that a file may uploaded to webspace, no spaces in filenames, - never! (Is of interest until today, if you use CLI progs somehow.) ... but I'm very happy that the filename length is more than 8.3 today
-
Huh! This is interesting! I need to explain a bit about the naming conventions of image filenames in PW, I think. /site/assets/files/{page-id}/basename.jpg /site/assets/files/{page-id}/basename.0x260.jpg /site/assets/files/{page-id}/basename.-tag1-tag2.jpg /site/assets/files/{page-id}/basename.-tag1-tag2.200x300.jpg /site/assets/files/{page-id}/basename.800x800.-tag5-tag3.jpg /site/assets/files/{page-id}/basename.800x800.-tag5-tag3.200x300.jpg Beginning after the basename, with the first dot, every dot indicates an imagevariation that also exists as a file. (only the last dot leads to the file-extension) Every previous part in the chain is the [source | parent | original] of the actual part. The tags chain, implemented into PW around 2.5 and made to become very robust and foolproofed by Ryan around 2.6, was meant to be used as lowercase tags, concatenated by - chars. This very restrictive usage is due the valid filename characters (lowercase), and the preserverd dot, and to prevent concatenating multiple same tagnames. (this is cleaned up to become unique in the filenames). But this is not very userfriendly in cases like the CropNames, and the users are not aware of this restrictions why it is / would be important to follow them. Thats why I have to handle the cropnames less restrictive. Thats also the reason why the implemented tag system in PWs imagenames cannot be used like intended. All the cool methods to get the variations of a parentimage (getVariations(), isVariation()) will fail in many cases when using images with an (invalid) tagname / cropname! That's why I was happy to find another bulletproof solution for getting rid of the srcset variations. (Detecting the children of a crop-parent) @PWaddict The way you uses it isn't an intended one. You create different INTERMEDIATE crops. The intended way is to create 1 INTERMEDIATE crop image, that serves as parent for the derived variations. But this intermediate functionality also is obsolete and will become deprecated in the next version, as it isn't much useful but leads to code bloat and confusion. Also it sin't possible to detect derivatives of that sort. Imagine a setup with 3 cropnames: test & test-portrait & test-landscape. As we have already read above, people do this a lot, using invalid cropnames / tagnames, with - chars or Camelcase, etc. Now go select and create a new crop of the "test" cropname. It will errorinously also delete all variations of test-portrait and test-landscape. Also image variations that may have the cropname on another place in the filename will get deleted too. The only way to detect variations is to keep the parent-children relation. (Blood is thicker then water, ) Maybe you can use it this way: $thumb_master = $photo->photos_main_photo->getCrop("thumbnail"); $thumb_medium = $thumb_master->width(660); $thumb_small = $thumb_master->width(480); $thumb_x_small = $thumb_master->width(360); This is the intended way that brings you back into sync with the system.
-
@flydev: Really I'm not feeling in the right position to give suggestions here. I appreciate all the work and recherche you do here, so you should decide what is lesser work or fits better for you, for what ever reason. - If, at the end, a solution is available that let people login with their twitter account, it would be really great and is much more than there is atm.
-
@tpr: I added the tiny thumbs. One little downside is, when returning back from the Modal, after creating the new Cropimage, they are not updated automatically. Only after page refresh.
-
The originals timestamp gets updated because the new settings for the croprectangle (x/ypos & width/height), and sharpening & quality values get stored into dedicated IPTC-fields. (ATM, for jpeg only, what also is the reason for thinking about other solutions) Tiny previews is a nice idea. If you don't mind I will take your suggestion and bring it into the module. Will fix that asap. Many thanks for checking and suggestions! <3
-
@mauricemoss, @ukyo, @dreerr, @tpr I have uploaded an update to the github repo that fixed the PHP notices and added removal of CropImage children after creating a new CropImage.
-
Embedded into AOS is pretty good! Wondering why not use this hook: https://github.com/horst-n/PageTreeAddNewChildsReverse/blob/master/PageTreeAddNewChildsReverse.module#L48
-
I do not update all sites to 3.x or 2.8.x. I have sites from 2.4, 2.5, 2.6, 2.7, and some different 3.0.x. Only one of version 2.8! (never touch a running system)
-
I don't know. What comes to my mind, and thats why I posted this to @PWaddict, is, that with my module simply the next free number (counted down!) is put onto the new page. No need to resort all other siblings! With a huge amount of sibling pages, the new sort function may slow down the process. But I haven't tested it.
-
unpublishing doesn't help. You need to start with an empty parent! once I moved all children to a temporary parent, installed and configured the module, and then moved the children back. But please, do a BACKUP of your DB before!
-
$page->featured_image doesn't return a valid object! (It returns a "non-object") You need to check that it returns a valid image object. Check if you set the image field to return a single image or an array of images. Also you always need a fallback for cases where no image is uploaded to a field!
-
Hi @tpr, I will look into this and add a solution that will work properly together with markup-srcset, (and other cases). Thanks for the clarification.
-
Many thanks @flydev , for digging deeper! I'm currently out of resources to code something like this. Was just searching for an already available solution to login via twitter. Registration should be done via PW only, where the PW username is set to the twitter username. (Frontend)-Login then should be done via Twitter only. So, if we would be able to retrieve the email address too, it would be more than I currently need.
-
@flydev wondering that Twitter isn't supported too? Couldn't find it here: http://oauth2-client.thephpleague.com/providers/thirdparty/
-
So, this isn't my favourite Music, but it is Music. At archiche.org you can download / listen to 25k+ 78rpm recordings like this one: https://archive.org/details/78_bugle-call-rag_metronome-all-star-band-pettis-meyers-schoebel-t.-mondello-b.-carter_gbia0011087a/Bugle+Call+Rag+-+Metronome+All+Star+Band.flac
-
Interesting would be how you have initialized $mail?
-
I would use the hook that is called on adding the image to the images field. This is called everytime you add a new image, regardless if you do it via API or via Inputfield. An up to date code example for this hook is here: In this example you can check for a $p->template->name to match as condition to run different code parts, etc. To resize the original image itself, you may want to invoke the imagesizer manually. ---------- Instead of the hook, (for your case above), you only may use the manually invoked ImageSizer for each uploaded file *before* you add it to the image field: // set the max dimensions $targetWidth = 800; $targetHeight = 600; foreach($upload->execute() as $file) { // first get the filename of the *original image* (in case when hooking into file add !!) $filenameOrig = $file; // set options to not upscale, and set quality to 100%, if this image is a source for variations!! $options = array('upscaling' => false, 'quality' => 100, 'sharpening' => 'soft'); // call the imagesizer $imageSizer = new ImageSizer($filenameOrig, $options); $success = $imageSizer->resize($targetWidth, $targetHeight); // resize to max dimensions if($success) $lesson->video_image->add($filenameOrig); } ---------- If you first need to inspect an image, (for conditional processing), you may use the ImageInspector : $imageInspector = new ImageInspector(); foreach($imageFiles as $filename) { $result = $imageInspector->inspect($filename); // to check if we have a valid result, it must be an array if(!is_array($result)) continue; // $result['info'] has all relevant data, like width, height, imageType, mime, orientation, rotate, flip, channels, bits, ... $width = $result['info']['width']; $height = $result['info']['height']; // ... }