Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. Here you go....400 fields! http://processwire.com/talk/topic/4442-pw-performance-with-hundreds-of-fields/ Be sure to read Ryan's comments there.. Also see: http://processwire.com/talk/topic/1527-largest-project-performance-multi-server/?p=13779
  2. Not really an answer....can't find it now, but similar questions have been asked before (will post if I find it)... But 1000 rows or 1000 pages is nothing for PW/MySQL. On the other hand, I'd worry about 60 fields on one page if only from a usability point of view...Just guessing here; have never been in that situation
  3. Then you also need to be careful about hidden ° nonbreaking spaces as well. They can drive you nuts with PHP throwing errors you "can't" see visually. I usually sort them out in Word.
  4. Correct me if I am wrong (can't remember), with this module, for new items, I just need to create another page and assign it it's own template and template file? With Process Module, you would need to install a module each time you want a new item in the Admin....
  5. That just means you didn't properly close some tags or use a semi-colon to tell PHP you have come to the end of a line just before you come to the echo...and...as you can see, you are missing a semi-colon ; after the closing ) in your array...Hence, the echo is "unexpected....you haven't told PHP you have finished your array ....and it's telling you your syntax is wrong...
  6. Hilarious!
  7. Aah....you'll just have to believe me then ;-)
  8. @horst....Raymond is quoting what Ryan said. That was a typo (I believe, by Ryan), although he did it twice, which is baffling. See the post here:
  9. Like Soma "said" - it will enforce decoding to array rather than the default PHP decoding which returns an object. So, it will save you typing "true" https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/Functions.php#L160
  10. That was my impression...but I read his sentence again: "It may well be our next CMS!" Who'll go out there and talk for PW?
  11. One...you can easily upgrade your software version (e.g. PHP) without waiting for MAMP to upgrade...But am lazy...so I still use XAMPP Martjin. Thanks for this write-up! Very helpful not only for MAC users, but the ideas are applicable to other environments too.
  12. Thanks for sharing Chrizz. Looking good! One minor issue, the contact form, looks a bit cramped? The labels and fields and too close to each other. I am on G. Chrome. I like the photos, especially the monochrome ones.
  13. Note that by default, the function json_decode() returns an object. If you try to foreach that you will get an error like "Fatal error: Cannot use object of type stdClass as array in...". So, you need to use the 2nd parameter of the function to return an array..e.g. $array = json_decode($jsonstring, true) http://php.net/manual/en/function.json-decode.php Having said that, your json string above results in a deeply nested array (multi-dimensional) which can be a pain to traverse....unless you know about stuff like these Even Better... http://php.net/manual/en/spl.iterators.php http://stackoverflow.com/questions/5524227/php-foreach-with-arrays-within-arrays/5524267 http://www.phpro.org/tutorials/Introduction-to-SPL.html http://www.sitepoint.com/using-spl-iterators-1/ http://codepad.org/A68lcnLZ [demo]
  14. Sorry @Horst, I beat you to it
  15. Like those shown here... http://processwire.com/talk/topic/5640-shortest-way-to-echo-a-field-only-if-populated/
  16. Turn debug off and they won't show...but that may not be an option for a developer ;-)
  17. 1. It is the translation source. See here and here 2. Is that because the new admin theme is a module? //Silly me; but other modules are working, duh! 2. It's not loading the new admin theme css files...why, I don't know...
  18. That was my thinking too but wasn't sure what your use case was...Glad you sorted it out..
  19. Welcome gyaani! Note that if the field is an array, then echoing it out will not help you much; you will need to loop through the field (e.g. fields such as images where the field accepts multiple images, multiple pages reference fields, etc...)
  20. kongondo

    JSON parser

    If you are looking for pretty: http://www.json-generator.com/ and http://www.jsoneditoronline.org/ ...and cool: http://jsonmate.com/ ...and complicated? http://jsoneditor.net/
  21. Roope, Would this help? - "Page Edit Per Role" module by pogidude. There's a couple of similar modules there, FYI.
  22. @tiptronic, Apologies if I sounded somewhat brash in my earlier posts. It was late here. Again, welcome to PW. You will love it, am sure. And of course, don't shy away from asking questions...keep 'em coming...they help us too cheers, k
  23. OK, it seems we are crossing wires here... Above was in response to this: ....what's in the core is now pretty obvious, no?
  24. I see Modules: http://modules.processwire.com/ On the left side menu there is core Also if you install PW, in the in-built Module "section" - there are three tabs - site | core | new Enjoy!
  25. I feel your frustration....I can't speak for Ryan but I believe this is an oversight...no intention to confuse really...
×
×
  • Create New...