Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. Only works if there's one template allowed or do I miss something ? Ahh, it's a setting in the PageTable field.
  2. It would be nice if the required `title step` can be avoided when using multiple templates. But maybe this is out of scope of this module as it is a thing ProcessWire could handle.
  3. I'm using the DEV now for 4 or 5 months and didn't experienced any major bugs that prevent me from using it. You could start using DEV now I think.
  4. This is real clever stuff MadeMyDay ! Great Job...
  5. You could always hack a solution, I proposed the same over here. But as the srcset becomes the new standard it's good to throw a warning for double loaded images here on the forum. Only browsers that support the srcset will not double download. Altering & changing the standard to your own needs is just an ugly hack and not much better that all the other solutions to the problem. Edit: MadeMyDay posted about the v1 picturefill version. The way that works isn't that bad if you realise that the standard is not yet widely spread.
  6. The DOM can't be altered when the DOM is not ready, thus what you say must fail if the browser hasn't support of the scrset them selfs. Just reading smashingmagazine, they say: So here we found the issue I do use the src atrribute, because I like the image to be an image without javascript
  7. Maybe I installed it wrong, or something. But the network tab shows my story. I do think this is default behaviour of most/all browsers. As soon as it sees the src inside an image it starts downloading. Almost sure that this is before the stylesheets/scripts are loaded. (ps, I did use the img srcset version) edit: it looks like that chrome handles it as one resource, but Safari loads the low and high res. So it could be possible that the srcset is now handled by the browser, thus bypassing picturefill.
  8. You've to watch out with the picturefill polyfill. Picturefill works mobile first for every image loaded. This means, that for every needed image, the mobile version is also downloaded. (except when you're on mobile of cause)
  9. One more thing Did you disable the trailing slash for the template for the page /member ? If you didn't, it's better to use the slash.
  10. use the try & catch, out of the login code I gave you.
  11. A User in ProcessWire is actually a Page. The name part of the page is used for the username, this way a user is always unique.
  12. It's not reliable, old browsers don't recognise it, but the good thing, you can use the same patterns in PHP. Thats how the patterns work in ProcesWire. To show errors you could create an empty array named $errors an push every found error to that array. like $errors[] = 'Gebruikersnaam is al in gebruik.'; Then for the logic, you can count($errors) and route the page to what you want to show.
  13. I do agree here with ryan about the draft capability. We have already unpublished. Extending this with draft functionality may lead to more confusing for editors working with relative small sites. When drafts gets to the core, I prefer that draft are turned off by default. For the add pages menu. I wish that it would be better configurable. Sites that I build are usually more complex then the average websites. It's rarely that I can use the add page button. So have to turn it off on every template. I wish I could find templates/pages my self to get add to this menu.
  14. I said: I formulated this wrong, sorry. What I really meant is that this is easy to accomplice with the ProcessWire API. Examples: 'Redirect to the first child'. In MODX you need a module 'FirstChildRedirect', the ProcessWire way: $session->redirect($page->child->url); To get the highest parent of an page in the tree. In MODX, you could make it yourself difficult with code or install UltimateParent. The processWire way: $page->rootParent; Create a Gallery of images: In MODX you can install 'Gallery' and study the documentation. The ProcessWire way: echo "<ul>"; foreach ($page->images as $image) { $thumb = $image->size(100,100); // create thumbnail echo "<li>"; echo "<a href='$image->url'>"; echo "<img src='$thumb->url' alt='$thumb->description'>"; echo "</a>"; echo "</li>"; } echo "</ul>"; The template language of MODX is MODX only, outside of MDX this knowledge is almost useless. You don't need to know much PHP to get the 'same' results in ProcessWire. But if you drop ProcessWire for some reason, you've build some experience with PHP. And that is valuable.
  15. You can't compare mudule count between MODX and ProcessWire. ProcessWire is in first place a framework, while MODX is in first place a CMS. (MODX is called a CMF content management framework, but after working with it for more than a year, I don't know why they call it that way) With ProcessWire, we don't need gallery modules, modules to get the first child, modules to generate thumbnails, modules to find pages. These are all core in ProcessWire. This lack in the MODX core will automatically result in a much larger scale of modules. And if Module development was easier in MODX, I think the amount of modules in MODX was at least double in size. So counting Modules is not a fair comparison. The freedom in MODX is locked in chunks and snippets. These methods make it relative save for editors to use them in content fields. But it has huge drawbacks: - Snippet can only receive variables of the type string for example. - Logic in snippets etc is stored in database, this logic needs to be entered in the browser. (you could link in this snippet to an external file, but it still needs a page save to regenerate the cache. In MODX, it's the cache that get parsed by PHP, and if a parse error occurs, the line number of the error is not the same as the line number of the 'file' editted ) In the end the slogan 'creative freedom' fit's better for ProcessWire then for MODX.
  16. I tried several frameworks, but in the end I prefer to write the CSS myself. I'm tired of unwanted classes, colors, positions, floats and display properties.
  17. To much & to bloated, thats my opinion about most frameworks. 97% of the classes & scripts I don't use and the rest I have to reset styles for to get what I want.
  18. What you could do (without making a mess) Make a hidden page in you site tree as suggested, but the difference: give it a logical name like 'preview'. This 'preview' page should have it's own template, call it preview or something and enable url segments. On pages that you want to be previewed ad a FieldtypeTextUnique field, call it 'preview_code' or whatever you like. Now on the hidden preview page something like this: <?php if (count($input->urlSegments) !== 1) { throw new Wire404Exception(); } // get your page to preview $preview = $pages->get("preview_code=" . $input->urlSegment1); if (!$preview->id) { throw new Wire404Exception(); } else { echo $preview->render(); } ps, not tested Now you're able to give someone an URL like: www.domain.ext/preview/vxrj9w765omxhg87g975ghu/
  19. Welcome Varma, I don't know PHPMailer, but we have 2 modules to send over SMTP. You can use them. WireMailSmtp WireMailSwiftMailer
  20. @ryan Gonna try this weekend especially for the languages as there might be an issue with MySQL. Port forwarding here is a difficult thing, because of the complexity of my network. (Al kind of sunpanel monitoring stuff is connected) But for me it's no problem to open my Mac with team viewer for debugging the Multi Languages. ( Not that I think this is very handy )
  21. Bombing is more of a concern for all your front-end pages
×
×
  • Create New...