Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. @bwaked: You have Loose comparisons, and you have strict comparisons. loose are written with two operators like == strict is written with three operators like === Strict will look next to value also to the type. I will write it here in text rather then in values: if (string === integer) { // a string is never an integer, thus evaluate to false }
  2. @LostKobrakai, a WireArray has no id, thus resulting in NULL $nullpage = new NullPage; var_dump($nullpage->id); // (int) 0 if ($nullpage->id == false) { // is true } if ($nullpage->id === false) { // is not true }
  3. There is an ID, but the id is 0, is different then "if NOT id"
  4. a NullPage returns an id of 0, so evaluating to false.
  5. My post is not about the the image, it's about the url(s) of the HREF. So what is wrapped, doesn't matter.
  6. I do love to see you're busy with modules
  7. Picture this: <a href='/path/to/small-photo.jpg' data-large='/path/to/large-photo.jpg' data-medium='/path/to/medium-photo.jpg' data-small='/path/to/small-photo.jpg'> <picture> <source srcset="/path/to/large-thumb.jpg" media="(min-width: 1000px)"> <source srcset="/path/to/medium-thumb.jpg" media="(min-width: 800px)"> <img srcset="/path/to/small-thumb.jpg" alt="tralalala"> </picture> </a> The only thing you need to do is swap the HREF of the <a>. The sizes of the images to link to i have set in the data attributes.
  8. Just a question, (and sorry if this sounds mean) Why not just add those 3 scripts to the admin with AdminCustomFiles ?
  9. The only thing you need to do is swap the link to an image, so it has nothing to do with adaptive images. You need to get the viewport width and use that information to choose a link to an image image and set the href.
  10. If you find a hook that runs always and runs as almost last, you're the man... thanks
  11. You could force the scheme in your template settings. For SEO, I really don't know. But I think if you don't communicate that you serve HTTPS next to HTTP, I don't think search engines will try to crawl the whole site again over HTTPS. And if it does I can't imagine you'll get bad points for it. Correct me when i'm wrong. offtopic, $page->httpUrl very handy for newsletters
  12. The page's URL's start at server's document root, so it should not be an issue. And the chances are small that you will decide to switch to an other canonical.
  13. It has become crowded in that file, so I guess Ryan decided to move that one to the config in wire. You still can use that setting. If you want to change it, it's recommended to put it in /site/config.php. This way PW upgrades won't overwrite that setting.
  14. For canonical, why not type the hostname static and append the $page->url ? Or am I missing something ?
  15. We are all humans Ivan, borders & nations are not build for safety (in first place) instead they are the result of people controlling other people for gaining power. People are competitive by nature. I don't like to use races in this context, cause that is just evolution, adapting to the environment they are living in over a long periode of time. We as human have to question everything, even the things we think we know. Most things are just learnt by confrontation with the subject very often and taken as granted, thus making it 'truth'. We have a fine community here, caring for each other, caring for the things we believe in and believe in the goodness of other people . It's not only the quality of ProcessWire that makes this community thriving the most important part is the social part over here.
  16. There must be a starting point for your output and every visible page needs a canvas to paint on. You could however assign a different different file (Very old Soma's approach). How you structure your template and which files you include it is up to you. You could use the processwire's _init.php and _out.php approach, but I like to include my self. It's all freedom with the exception that your the data should land somewhere for visible output. For a big site (130+ templates) I've used a module Select File Inputfield to render parts of the selected file. The reason is to reduce the amount of templates.
  17. Thanks Peter lookin good.
  18. @adrian, I've pushed an update to github. Files that start with the AdminThemeName and end with .js or .css are added to the FilenameArrays. The admin theme name is also added to the js config. Changed the hook for the 'delayed' file injection. $this->addHookAfter('ProcessController::execute', $this, 'injectFiles');
  19. The assumption based CMS is not a strategy that fits to the ProcessWire core, but could be build on top of the framework using Modules & such. It could nicely live in the environment called ProcessWire. But there are certain tasks a user without knowledge shouldn't do, one of it is installing & configuring in a web-development environment. If you have real good vision of what you want to see and how it should work, you should write an extensive plan. Maybe with someone out the community you can build what you envision. Keep in mind that this is a lot of work, so commercial interest is something that can count here. Writing a comprehensive strategy is IMOH better than complaining about a system that's not meant to be 1 2 3 click I finish my website. ps, ProcessWire is Easy !
×
×
  • Create New...