Jump to content

horst

PW-Moderators
  • Posts

    4,077
  • Joined

  • Last visited

  • Days Won

    87

Everything posted by horst

  1. Hhm, it wasn't clear to me that you have encountered differences between Pageimages derived from Pageimage or derived from PiM. (or I may have overlooked it in all that examples) I think it would have avoided some confusion if you just have asked / told that the objects behave different, without (partly wrong) code and lots of error messages. You are also speaking about filenames generated with .0x0 in its name.?! Pageimage::size generates the filenames before any manipulatiuon through ImageSizer and only according the passed values for width and height. So, at that point you may check what values you are passing to the functions. ------ But lets focus on that objects thing: I will try to replicate and compare that. Just to clarify a few things: You have checked that after your PiM call a Pageimage Object is returned? Have you tried it with a PiM that does other manipulations, maybe just pimLoad()->pimSave(). Does it behave the same or is it different? Pim generates the PageimageObjects this way: https://github.com/horst-n/PageImageManipulator/blob/master/ImageManipulator.class.php#L751 It looks the same like Pageimage::size does it: https://github.com/ryancramerdesign/ProcessWire/blob/dev/wire/core/Pageimage.php#L316 So, we need to compare the objects, first try with simple objects that only should differ in the name: $size = $image->size($image->width, $image->height); $pim = $image->pimLoad('test')->pimSave(); And then with a manipulated one from your example. ------ Ah, ok! Sorry for remember me wrong!
  2. Oh, no haven't done those things. Maybe there are already modules out that do similar things where one can study the code?
  3. maybe a part could be done by restricting children - parent relation via family settings? Template for parent that only allow a single Template for children. That way, when adding a child, it has the right Template and the right position. Only thing left is the population of your field.
  4. Hi Philipp, ähm, may I say that this sounds confusing? You only need to double check here if it returns a valid pageimage and has created the derivative file. If both is yes, PiM has done it work successful. If you further do not call PiM anymore, it has nothing to do with PiM! - Ready! ------------------------------- Looking at your code: $out .= "<img src='{$image->width(260,0,$o)->url}' What is width 260, 0, $o ? You have done the same things wrong like in earlier posts. Passing a zero as second option to width, what should be an array with options! Ryan has changed pageimage::size to silently fail with this instead of crashing the process. This was a wish by yourself! Another thing is that you has run into timeouts with imagesizer in the past. I have posted a solution to you and maybe over 10 times more here in the forums: include a set_time_limit() in every loop that calls imagesizer. ( foreach($sets as $s) ) ! There are two options for the set_time_limit() now: please add it into your loops or only use PW >= 2.5.10 in the future, because PW since 2.5.10 has an own set_time_limit() call in ImageSizer!
  5. //we only get one random coupon page (we use 'get' rather than 'find') $couponimage = $pages->get("template=service-pages, images.tags=coupon, sort=random")->images->getTag('coupon'); @Kongondo: Your code together with the pages selector from Dave should be a solid solution. - But haven't tested. @Dave: Welcome.
  6. Thanks for sharing! I will test it later this week when find some time. I think this is helpful to me while developing on the Markup of a page. ------ BTW: I would recomment to add to your getModuleInfo() a "requires" key like: 'requires' => array('ProcessWire>=2.4.0', 'PHP>=5.3.8'), You use Namespaces with your module and therefore the minimum needed PHP Version should be noted in the required value(s), or the minimum PW version. At the moment it is not mandatory to note this, but it is helpful anyway.
  7. This CryptoPHP is really bad stuff. Especially on W*rdpr*ss it installes an additional AdminAccount too. This way the attackers may have server control after the desinfection of the malware code itself. CryptoPHP is PHP-code within a file that should be a PNG-image. There is a python detection script on GitHub available: https://github.com/fox-it/cryptophp/tree/master/scripts
  8. Maybe when unzipping it got lost. In the release it is present. Just open your downloaded archive and copy over all files of wire/ over your actual files again. But do not copy any files under site/ again. This will brake your installation. EDIT: OK: @Kongondo: 1:1 EDIT2: Uups! @Matt: Welcome!
  9. There seems to be a file missing, maybe? Can you please have a look for this file: C:\xampp\htdocs\processwire\wire\modules\Inputfield\InputfieldSelectMultiple.module Does it exist?
  10. <now you are already half way social engineered>Hah!</now you are already half way social engineered> read more ... (blog.fox-it.com) OMG! When it comes to the combination of these two human characteristics the world is uncertain: greed and stupidity.
  11. horst

    PrettyPhoto

    It has nothing to do with PW I believe. PW only gives you the urls where the images resides $image->url. Cannot imagine how that could be get wrong. I have found the gallery what @KG60 seems to mean. For me it is looking like wrong calculations for div.pp_overlay and (maybe as a result of that) a wrong calculation for div.pp_pic_holder. And this is not a thing related to FF only. I see it with all my browsers the same (Win7 FF, IE11, IE10) Some questions came to my mind when seeing this: Why is pp_overlay defined by class and not by ID. I think it has to be a single unique div. Why is it calculated to cover the document dimensions and not the viewport dimensions. The first one may be not of interest, but the second one is the point that is wrong here I bet. Or if this is right too, than at least the position calculations for the div.pp_pic_holder are wrong (don't know / remeber if it is derived from overlay or not). It definately generates the right with and height, according to the viewport, but the wrong position. Also if one adjust the srolling a bit, it corrects to the correct position. Also the overlay goes way way beyond the footer of your document, and when it appears the other divs get scrollbars. --- FF win7 wrong position! ---- IE 11 In IE it also doesn't correct the position like in FF, and the other content divs only get vertical scrollbars.
  12. Yes, I know and I have used it initially that way. And you also can do it now: when passing width and height instead of square, the other possible options are ignored and the result should be similar to what you have got with the gist code, but maybe a bit larger. (20%) I thought it would be easier and less confusion for average users to just have a switch for on/off and if they define a square of 120 that they get back the largest possible image with 120px. If you also like / need the comp param dynamically to define, it can be easily added as a 'silent' option.
  13. New addition to contain: weighten! If you want to put some images of different aspect ratio onto a webpage and you want that they are displayed more equal visual weightened, you can use this method and options now: . * contain with option weighten $image->contain('square=90, weighten=on'); . . There is also the possibility to prioritize portrait or landscape oriented images: . $image->contain('square=90, weighten=x1'); // landscapes are a bit larger than portraits $image->contain('square=90, weighten=x2'); // landscapes are a bit more larger than portraits $image->contain('square=90, weighten=y1'); // portraits are a bit larger than landscapes $image->contain('square=90, weighten=y2'); // portraits are a bit more larger than landscapes . . Have a look to this output here: . . . . . PS: @Martijn: I have taken your code for the calculations and set the percent value hard coded to 38. This way we only need to turn weighten on or off and have not to deal with values here. The only thing I have added to the calculation is an adjustment to fit better with the largest dimension into the initial bounding box dimensions. (Github)
  14. You are not talking about the options tab where you can choose between Thumbnails and FullsizeImages, ?? I think it is not of any help for pwired to wait for 160 fullsize images get loaded instead of 160 thumbnails.
  15. Maybe you can strip out $_SERVER['DOCUMENT_ROOT'] from the path: $urldir = str_replace($_SERVER['DOCUMENT_ROOT'], '', $dir); // echo '<img src="' . $dir . $file . '" />'; echo '<img src="' . $urldir . $file . '" />'; // or $urldir . "/" . $file ??
  16. have a look to the examples of readdir especially the #2. And regarding the long page load in admin with many images, you may also use a InputfieldFile. This way you can use API but without waiting for 160 images to load there thumbnails.
  17. @Joss: those spyders are very good, but when you buy one, use it often! The new generations of those uses a sort of organic colorfilters inside. The older ones have had glass filters. Those with glass works 10 - 20 years. Those with organic filters are unusual just after the guarantee period expired. (2 years and 3 month after I bought the last one for 270,-€ it was unusual). Now I borrow a 10 or 11 years old from a coleague when I need one. There are spyders available with glass inside for the cost of around 800,- €, ... sighh. Here are resources from the European Color Initiative for a visual calibration: http://www.eci.org/en/downloads you need to look for "Here you can find useful “monitor” downloads." @adrian: yes, matte, only matte! If I need to face painting I use the mirror in bathroom. And I'm a EIZO Fan. @Joss: that model you have selected reads very well in its description. I think it wouldn't be the badest decission. But it is always worth to do a lot recherche and read some good tests. EDIT: @Totoff: very good resource, thanks!
  18. Hi Martijn, you mean you have a module that outputs images of different aspect ratios in a visual weighted manner? This would be nice to have, once we have discussed on that already. Regarding the name 'logo' I'm not sure. Can we find a more descriptive one? visualWeighted is to long,
  19. #1: https://processwire.com/talk/topic/3278-core-imagemanipulation/page-2#entry78224 #2: $tempCopy = $origImage->size( $origImage->width, $origImage->height, array("quality"=>100, "sharpening"=>"none", "autoRotation"=>true) ); if ( @copy($tempCopy->filename, $origImage->filename) ) @unlink($tempCopy->filename); number two should be done via hook after upload, maybe file-added?
  20. this one is rock solid, it is developed since 2003, http://www.mysqldumper.net/features/
  21. In addition to @adrian: I would create a page and save all uploaded files to it. Then I would send an email to the user via WireMail and an SMTP extension of it! This way you or your client have control over the email account. (< regarding false spam detection) The rest depends on the client, if he would like to get all files right with the mail, I would send copies this to him. At least with the WireMailSMTP this is doable out of the box and works like a charm! (shameless, I know!) You can make this configurable for your client. e.g. if he has normal workdays he can tip a checkbox somewhere on his personal boss-settings page to get all files as attachments with the emails. If he want go for holiday he untip the box and only get notifications without attachments (to his handy!) Don't forget to offer this to him as a premium feature!
  22. @Pete: thanks for tracking this down! I have updated the module and changed the code by adding a check for the permission 'image-crop' here. (this needs further investigation, here it is a quick solution to stop the error.) If you can find some time, would you be so kind and test it if this work at your end?
  23. @Adrian: thanks for the feedback. Here she is a bit to modern I believe. I will change this soon!
×
×
  • Create New...