Jump to content

SiNNuT

PW-Moderators
  • Posts

    1,011
  • Joined

  • Last visited

  • Days Won

    8

Everything posted by SiNNuT

  1. I like your thinking Ryan, i would applaud the switch to InnoDB for PW3. I think we would want full-text search just like in PW2? If so, the min requirement for MySQL will become 5.6? Are you planning to make use of some of the InnoDB features that maybe now are done in the PHP codebase?
  2. Hah, i totally forgot about that. You are right.
  3. I'm not sure. This would involve an inputfield that allows for <optgroup>. I've read that this should be possible somehow with InputfieldSelect but i've yet to read how exactly this could be done. More info here: https://processwire.com/talk/topic/11348-select-input-field-with-opt-groups/
  4. But this would only be relevant if PW was to consider switching to InnoDB? I have not heard anything about this.
  5. I find the contrast between bg color #eef2f5 and body text #666 a tad low for the eye (not that one should care too much, but with a contrast ratio of 5.1:1 it fails WCAG AAA). Also, no German, but should it not be Sprachen instead of Spachen? Otherwise a nice, clean looking site without too much bells and whistles.
  6. Yes, if you have a page reference field that is specific to Product pages, you can go to the field settings, under the Input tab and then select Products type as Parent of selectable pages. Or use one of the other settings. If your page reference field is used on different kinds of pages (Product, News etc.) and you want a 'dynamic' Parent of selectable pages, depending on the type of page it is used on, maybe this can be done via the custom php option. Some sort of conditional parent, but i'm not sure if possible.
  7. For fields you can get stuff like names, id, labels and such but not content values. For that you need to get a page by id, path or selector. Something like this: echo $pages->get('/')->home_tekst_8;
  8. I don't have much recent experience but Like LostKobrakai i used to put that kind of stuff in the site folder, which i consider the root of a project. I only use the templates folder for final production files. So i usually have something like site/src with all css/scss/less/js source files and then build into the templates folder and sub-folders. I'm not familiar with multi site so i don't know about the pros and cons there.
  9. I think the function i linked to is not dependent on anything else in cakephp so you could just copy paste it in some file and include it in your template so that you can use the function (you can drop the public static part). I can't test this for you but it should work.
  10. Ah ok, i did not check the code. Using it as fallback is fine. However, in your OP you mention that you need valid html, so i gathered that you need to truncate with keeping html tags. This is quite tricky but you could use something ready-made like the truncate function of CakePHP: https://github.com/cakephp/cakephp/blob/master/src/Utility/Text.php#L539-L665 http://book.cakephp.org/3.0/en/core-libraries/string.html#truncating-text
  11. Sidenote In my experience simply truncating text to a hard limit to make summaries or intro text,rarely gives good results. If possible i would always choose for a designated summary/intro field. This just gives you more control and options and will probably save some headaches in the long run.
  12. You should probably first install it via Modules->Core, under Fieldtype, -> Cache
  13. As of 2.6.16 there is a 'published' property. Could it somehow be related to that, if you already had a 'published' field in your 2.6.1 site? https://processwire.com/blog/posts/processwire-2.6.16-core-updates-more-on-prodrafts/#new-system-published-date-time-property-now-available-on-all-pages
  14. http://processwire.com/api/fieldtypes/images/ and then scroll down to 'using image tags'. No direct example of how to find all images except those with a certain tag, but you can use the selector engine so i'm guessing you can use smthin like images.tags!=Exclude You might want or need to do some checks if there are tags present to begin with, i haven't used tags before, but this should get you started.
  15. iirc PHP's date() and DateTime() functions are not locale aware, so strftime() could also be of interest. http://php.net/manual/en/function.strftime.php
  16. It seems your contact.php is unfamiliar with PW, so it does not know about $sanitizer. You should put your php code in a template file,or include it via one of the ways (template, init etc.). Or bootstrap PW in contact.php, https://processwire.com/api/include/
  17. Arguing with a bottle of rum is always tricky. It may have even lead you to think you turned of Cloudflare while in fact you didn't If things remain functioning without Cloudflare feel free to mark this one as solved
  18. Ok, you did not mention that. But at least both sites seem to be working fine when i check them now. So this is a pretty strong indication that somehow Cloudlfare (or better, the way it's set up) is at the root of the problems and not some weird hack.
  19. Looking a bit at the request and response headers of that site, the only thing i can think of that is causing this problem is Cloudflare, which seems to play a role. Is this somehow turned on for the problem domains? Try turning it off? Have a look here http://stackoverflow.com/questions/25927260/cloudflare-bug-random-302-redirections , these look a lot like your random 5 character folders.
  20. So if i understand correctly, with option A you need to chose a folder that wil then act as the document root for a certain domain. So the directory called 'pw' is the root for 'mydomain.com'. The www.mydomain.com version technically is just a subdomain of mydomain.com. You could run two completely different sites on the www and non-www versions if you wanted to. With most of the hosting companies you don't have to manually setup anything for the www subdomain, but in this case you might have to. You can then choose to use .htaccess to rewrite the www version to non-www or vice versa. This is good practice for potential duplicate content you mentioned. To summarize, i think you should only work with option A and then use htaccess to do the rewrites. I would just call your hoster if you have trouble setting things up correctly.
  21. Can is mostly right. _x is one of the tags that indicates a translatable string, which you can then translate via PW admin. The _x means that it is a context sensitive string. Read all about it here http://processwire.com/api/multi-language-support/code-i18n/#context It should output the language code for the current user language. If you're doing multilang sites it's wise to study all of the docs linked above.
  22. I can only test this in a recent dev version so i'm not sure about prior behavior but i can confirm the behavior that antpre describes. When given an encoded url (for example with %20 and %2B) InputfieldURL will complain that it is not a valid url and seemingly automatically rawurldecode's the string, after which you can save the page. So %20 is turned into a space and %2B into a +. I'm no expert on this subject but it seems strange that InputfieldURL considers encoded URLs as invalid and instead turns them into URLs with unsafe characters (i.e. an empty space). What is strange that according to antpre older PW versions did not have this behavior. I can see that there have been some changes recently but i can't figure out if this has anything to do with this 'issue'. If this is intended behavior it would be nice if someone more knowledgeable could explain why. Before save: After pushing save, the encoded characters are automatically decoded:
  23. 'Fake page effect' was just my stupid description of the fullpage/one page scroller It's very hot atm. You've given it thought so that's perfectly fine. Small things make the difference in user friendliness. That one page scroller you linked to looks pretty nice. As for flexbox support; it should be right around 90 to 95 %, depending on where your audience is, especially if you use the appropriate prefixes (autoprefixer ftw). Certainly Edge should be fine but there are some known issues wkth certain browsers. See http://caniuse.com/#feat=flexbox
×
×
  • Create New...