Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. You could set the image field to be required, that way you're sure there's an image. However, checking it will be a good practise.
  2. // without testing, but you can get the idea here foreach ($page->children as $child) { $image = $child->image_top; $thumb = $image->size(300,300); echo "<li>"; echo "<img src='{$thumb->url}'>"; echo "<p>"; echo "<a href='{$child->url}'>"; echo $child->title; echo "</a>"; echo "<br />"; echo "<span class='summary'>"; echo $child->summary; echo "</span>" echo "</p>" echo "</li>"; }
  3. Welcome closer12 Have you've seen the documentation about images ? It's very well explained, there's lot's of stuff in.
  4. Little update on the module. You can choose to list folders and or files. If you already had this module installed, be sure you check Hide folders and and save the field settings. Updated the first post in this thread.
  5. No problem Macrura, thanks again for your help & use of the module.
  6. Just to be sure, the module version you use is 0.95 ?
  7. Summertime and programming !
  8. @Macrura I don't see any issues here regarding using the field inside a repeater. Can you provide me with more information so I could replicate your situation ?
  9. Wow this is great ! What about instructions how to use parsedown/markdown ?
  10. Tnx for the followup ! Gonna test this weekend. I didn't thought people would use this fieldtype with ../ in the field settings, so I cleaned the values when I discovered this behaviour. Normal users can't set those settings so I removed this checking and clearing of the data in the update. (can't think of doing real harm) Thanks for finding this Macrura. The module is updated on Github.
  11. If you output it directly how you say you treat it as string. Then the magic methode __toString() kicks in if provided.
  12. Since the introduction of "Show in the add-page shortcut menu?" i'm disabling this feature for almost every template. And sometimes I forget to disable it, so I have to go back to the template settings to solve it. For one site I even disabled the button with display: none; (hacky hacky) It's starts to annoy me more then I would benefit from it. I thinks it's better to invert this behaviour, defaulting to No.
  13. @Macrura, tnx for the report. Are you absolutely sure the value is not stored or is the value not pre-selected ? I'll take a closer look, as soon if I have some little time.
  14. Martijn Geerts

    Cookie Law

    You've to set a cookie to prevent future cookie notices
  15. ProcessWire is highly structural. here's a Pagelist, with accessories accessories template:accessories | +- wheel ( template:part ) | +- chair ( template:part ) If the accessories templates only allows children with the template of part, you can show all parts by looping all children of accessories.
  16. $pages->find("title=yes"); Can return multiple pages with different templates. vehicles | +-- honda cr-v (template:cars, fields: • color:yellow/amount_wheels:4) | +-- honda gold wing (template:moters, fields: • color:yellow/amount_wheels:2) Here you can search all vehicles with the color yellow for example For every found page you know what vehicle it is from the template $pages->find(parent.name=vehicles, amount_wheels=2); will return 'honda gold wing' page with the motors template
  17. I could be me but I don't see differences in lightbox behaviour with the adaptive Image vs the old way. It's just the same old <a href=''> wrapped around the picture. I do think Lightboxes will be more clever in the near future to address linking to different popup sizes. (maybe there are some adaptive light box plugin out there right now). Lightboxing to different sizes or disabled at all for the various viewport sizes needs additional javascript logic. But these problems are not that difficult to solve.
  18. Thanks for the time writing your background Jordan and using ProcessWire. Welcome Jordan.
  19. Happy you
  20. @MadMyDay, tnx for you well thought insights. I think you hit the nail on top with your post. Love the CropImage approach. Love to see a template-able adaptiveRender() methode or something.
  21. Exactly my thought. And loaded/configurable per template, so that only hanna codes are shown that makes sence in that template.
  22. Setting ->of(), and the image field will always be an array, no matter what the maxFiles is set to. ( was maybe better if Ryan wasn't that nice for the single image and it would always be an array )
  23. The Adaptive Images plug-in you've linked to is probably the best solution for small website with not many visitors and no Pro Cache. I do like the concept of your adaptive image solution the mosts. But on the same time I don't think it's possible. Say the visitor who firstly visits the page has a 27" iMac, he creates the static cache file for Pro Cache. The next visitor has an iPhone on a sloppy connection. You can't serve them the cached version. So you need to serve your page in runtime and create a new cache. And I do think you don't want to create for every width a new image. Bandwidth detection is very tricky. The solutions by SiNNut are clever, but don't cover every aspect. There's clever detection for 3g and other cellular settings that would bypass the test for the performance. Great but doesn't work if I hook my iMac to my phone as internet deliverer, then the actual test kicks in. (Logical and it does what it must do) Testing network speed shouldn't be done every image, you're losing speed over there so they take a snapshot, one test to decide which route to take. This snapshot could be to positive or to negative. A to positive result we definitely don't want. I'm not really convinced with the bandwidth at the moment. Please tell me if I'm wrong here.
  24. It's a pitty but web-development is not always about the best route. Time is limiting factor in the most development processes. And supporting unsupported browser features can have a negative effect on the behaviour on the up-to-date browsers. You've to weight your markup/design decisions carefully. The rule, stated by Owzim is logical & easy to understand for both the customer & development organisation. This is a handhold for de 'average' website you build. And if the customer needs a bigger backward compatibility, the boundary is clear. So they know it's more work and they know the bill will be bigger. To make a rule for backwards compatibility is a pretty good thing. Where you put boundary it's up to you, but it should be clear for both customer and developer.
  25. a few links: bandwidth thing looks good SiNNut. jQueryPicture looks nice to but don't support support the bandwidth thing. ( no go ? ) as mentioned before Picturefill and Foresight What others say: http://www.mangrove.com/blog/1123/responsive-images
×
×
  • Create New...