Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Thanks alot Horst for your time! The lines are hardly visible so not sure. These indized optimized png's I attached do have these lines when resized. When I do convert such an image to normal rgb png and upload it these lines are still there. Now It seems that it depends on the Photoshop version! I'm not sure how, but a png from a coworker saved in CS6 seems to work and has no lines. it's also when I open the optimized pngs in my CS4 the alpha transparency isn't shown and the modus is indized 8bit and the transparent shadow is black pixled, while in CS6 it shows the png correct as rgb and alpha transparency. The agency that does the images sent us unoptimized pngs and they seems to work.
  2. We have transparent product images as pngs. Now resizing them gives us artifact (lines) inside the image. I set sharpening to none and tried different things but no matter what there's lines in the resized thumbs. It even happens on non transparent images (visible on white background), but there it seems it can be avoided at least by setting gamma higher. Here a image showing the artifacts (contrast and darkened in PS to show the effect) It's barely visible but depends on the monitor and I see it clearly on mobile but hardly noticed on desktop. I am a little lost as to if this is possible to avoid.
  3. Anyone having problems with http://t.co/jbbpxIBHxF lately on desktop browsers? Can't see video or directories just the logo. #twitch

  4. There's one false too much
  5. I'm the creator of the cheatsheet.processwire.com Searching for "->of" of "of()" works fine. It uses a fuzzy live search clientside with javascript using quicksilver (and some nifty code by jQuery creator John Resig). I remember having some problems with special chars like > but I think some of it was in Firefox but can't recall what. Actually I replace > with a > as this html entity is also used in source. So far I can't reproduce it but maybe you use a sepcial browser or anything else, so please let me know.
  6. It important to know. In most cases if output formatting is on, a field is a string. So you output a property containing a string that is formatted in one way or another or gering the correct language. Either through the field itself or a text formatter. Once you turn of outputformatting it may no longer a property with a string but an object that may has methods or other properties. Most of the times this only matters on frontend context, while in modules and backend output formatting is never on unless it's explicit used or a module deals with pages that come from via a variable from a frontend template that uses a module method. Or if you need a date as timestamp you can try it off or use getUnformatted() method. Setting a field only needs outputformatting off if you do this in frontend context and for fields that are more complex and have outputformatting that turns an array or object into a string ready for output. Input formatting is mostly just used as far as I know for datetime field used for inputs in a form, and has nothing to do with how you set a value via API. Could be wrong though.
  7. Or if inside a string and multiple chains use {} echo "{$page->images->first()->url}..."; If only one chain it doesn't need it like echo "$page->url";
  8. RT @processwire: New post: ProcessWire 2.6.11 brings AJAX-driven inputs, conditional hooks, new template family settings & more! https://t.…

  9. Soma

    ProcessWire on the web

    Enjoyed raeding your post rick. What was the case that brought you back to PW exactly?
  10. Ryan already has the module to edit config in backend since 2.5 in his repository. I'm working on a new multisite version but doubt it will be ready anytime soon.
  11. How about multisite reading config.
  12. No you can (with my example) add entries to the $config->httpHosts but it's won't have an effect cause the whitelist is checked before you can do this in a module or template or whatever. I'm not sure why you'd want this. It's not like you change this all the time.
  13. You can also just leave config httpHosts blank. You could update it via API like this $hosts = wire("config")->httpHosts; $hosts[] = "ww.domain.ch"; wire("config")->set("httpHosts", $hosts); This should be in a autoload init(). But I'm not sure it be early enough to work.
  14. Yeah $options is a template var. If you need it you shouldn't overwrite it.
  15. @isellsoap No it's not supported/possible. Though I'm sure it can be implemented just not easy and I have no time. But you could create your own hook for that usecase it would be easier. "All you need to do to enable it, is add the name (i.e. images) of the image field you have on the template to the custom label option in the advanced template settings." In the template advanced setting you can enter field names what then would be the label in the page list tree. The function that is responsible for this is also hookable and there's several modules that do it you could look at how to archive what you want.
  16. Maybe there's some new settings in core that would handle that if the setting quality changes it will force a new generation (which would be desired anyway) Maybe Horst knows as he worked on that one. I think the new naming convention includes quality, which would make that work.
  17. It's always as a project gets big you'll have to take care. No matter what CMS. In case of images: a. you can now in 2.6 delete variations for a image right in the backend. But that doesn't work for batch processing a whole site's images. b. you can write a script to delete all variations through API, but that as soon as there's 1000's of pages involved you have to take care of memory, script time etc. Bit this if you own ListerPro (which I recommend all PW users should buy anyway) you can use and build an custom action that batches all your pages (or the ones you filtered) to remove variations. It's built with scalability in mind so it scales for millions of pages (just would take a very long time). c. you can also use the API when using $page->image->removeVariations() to delete and force new generation of variations. Then use a template var to toggle that globally in your template. Usually a custom $config var would be best as it allows also modules to read it. This works fine when building a site and you want to experiment to get the best options. Maybe not always suited but something like: $config->forceNewVariation = true; The always use a code like this where you generate thumbs or sizes. $img = $page->image; if($config->forceNewVariations) $img->removeVariations(); $img = $img->size(100, 100, $options); Of course this doesn't work well if you're live and have 1000 of pages. As you'd have to view all pages again to trigger new creation WHILE the setting is true. Just a few ideas.
  18. It's all correct and works. So what is different to your other projects? Are pages published? Are they viewable? Is the page really in the PageArray, but when $page->next doesn't even work you seem to have a problem somewhere. No idea sorry.
  19. I think since you can't unpublish users, Users find will find all anyway. $users->find("your selector here", $options = array("findAll" => false));
  20. Turn on config advanced mode, create template and select fieldgroup from another templates fieldgroup to share the fields but have a new template.
  21. You don't need to get the field every time as you already get it in the loop. Your getting the inputfield without context.
  22. A save will uncache all pages and you loose data.. so maybe not use save ready but after save.
  23. You don't need to save when hooking saveReady as PW does it already right after hook.
×
×
  • Create New...