Jump to content

kongondo

PW-Moderators
  • Posts

    7,529
  • Joined

  • Last visited

  • Days Won

    160

Everything posted by kongondo

  1. Kyle, I pointed you to Soma's Gist that has multiple examples. Am I missing something here? Have a look at these... https://gist.github.com/somatonic/5236008#file-form-php-L88 https://gist.github.com/somatonic/5233338 (scroll all the way down to the next file as well - https://gist.github.com/somatonic/5233338#file-form-upload-php-L30) Edit: More links: http://processwire.com/talk/topic/2597-multiple-image-bug-when-using-api-resolved/ http://processwire.com/talk/topic/1530-setting-image-description-with-multiple-image-upload/ http://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/page-2 http://processwire.com/talk/topic/3134-basic-image-file-upload/ http://processwire.com/talk/topic/2217-user-generated-content-with-images/ Google search works better than the Forum search
  2. So, seems this has nothing to do with the blog profile since all pages not behaving as expected? Next suspect is MySQL. If you got ver. 5.0.5.1, that's the culprit..
  3. @kyle... An example right of the docs to give you an idea..See line 9; it shows an example of adding 1 image. For several, you will want to foreach...there are several posts about this in the forums. Can't find them atm; you might want to search if you are still stuck $skyscraper = new Page(); $skyscraper->template = $templates->get("skyscraper"); $skyscraper->parent = $pages->get("/cities/atlanta/"); $skyscraper->title = "W-Hotel Tower"; $skyscraper->height = 400; $skyscraper->year = 2009; $skyscraper->body = "This is a nice hotel and it has a helicopter landing pad on top of it."; $skyscraper->save(); $skyscraper->images->add("http://starwoodhotels.com/w-atlanta.jpg"); $skyscraper->save();
  4. Hi, Please explain what this FieldtypeFieldsetOpen::fieldsetCloseIdentifier; does. Thanks.
  5. Below could be of interest: http://processwire.com/talk/topic/3105-create-pages-with-file-upload-field-via-api/ https://gist.github.com/somatonic - Soma's Gist (or is it gem ) has example upload scripts I'm in a rush.... but hope the above are helpful..
  6. This is amazing flexibility! @Vineet, I must admit I like the questions you ask; in most cases they lead to profound revelations/responses such as the one Ryan has just given..
  7. Of course, how could I miss that! Thanks DaveP!
  8. Thanks DaveP. I am mulling how to implement this in a search function (building on search.php that comes with the default PW install)...
  9. I think this is similar to this? http://processwire.com/talk/topic/691-wireinput-only-allows-one-dimensional-arrays-why/ $input doesn't do multidimensional arrays either...Advice is to use $_POST, etc..in such cases
  10. Good tip, thanks Soma. If I get stuck, I'll pick your brains later...... Or, if you can't wait for me to pick your brains later, you might as well please point me (aka please post some sample code to get me going, hehe) to some code now, thanks
  11. Glad your sorted it out. Please mark thread as solved if you can; Some helpful folks around here prioritise unsolved threads....
  12. As Wanze has aptly put it, it will only return selected pages in the fields of the multiple page reference field. ProcessWire is more clever than that Edit: Just for info Behind the scenes, what it actually returns are the page IDs of the selected pages in the multiple page reference field. If you echoed out a multiple page reference field (without doing a foreach, e.g. echo $page->multiplePageRef;) you will get the IDs of selected pages (e.g. 1407|1007). If you checked in the database the table holding the multiple page reference field (e.g. field_multiplePageRef), you will see those page IDs as the saved values. Now, if you have the ID of a page, you can do almost anything with that - find our who the parents are, if they have children, blah, blah..
  13. @jtborger: I for one would like to see your extended version. Please post away
  14. Is the a way to match non-adjacent partial words (note plural)...e.g. processw install. Haven't found a way so far. I know %=$q will match a single partial word.
  15. Also, maybe check the full 404 status in firebug or similar (i.e. path/to/page/xxx not found etc.) That should give you clues I suppose..
  16. That's a great find Diogo! Never seen one like this b4; thx for sharing. I think it would work well as a one-off/showcase. For everyday use/after a few clicks it kinda becomes tedious..
  17. If all else fails, I would strip my PW install down to the bare minimals (uninstall non-core modules; minus MSN of course ) or test in a vanilla PW install with only core modules and MSN installed and test from there to see if it works. Yeah, it is also good to test in different environments.
  18. Hi J, Maybe not a great idea to share your PHPInfo publicly? In itself, it may not be an issue, but if there was another vulnerability in your system (am not saying PW has a vulnerability; but other systems in your setup might) .....the less info u offer for free the better
  19. @dragan, A conflict with some other code maybe?
  20. Yeah, I'd seen that, thanks. I'll have to revisit it...
  21. Thanks for the explanations Ryan. The "small-x-columns" and the like are what stumped me and I didn't have the energy to dig around the code to find out what was happening. The documentation on their site was really sparse about this issue.
  22. Hi Hieu Do. Welcome to PW and the forums! PW can easily handle 100's of thousands of rows. This question has come up before. I can't find the relevant forum posts atm but am sure someone else will give you a better answer. Meanwhile, this answers part of your question: http://processwire.com/about/what/ Edit: Here's are other useful threads... http://processwire.com/talk/topic/2503-question-about-extreme-scale-hundred-of-thousand-maybe-millions-of-pages/ http://processwire.com/talk/topic/37-internal-optimisation/
  23. Wow! Very much appreciated, thanks Ryan! I've been stuck on Foundation 3 since I've never really grasped the "new" Foundation 4 syntax. I'll study this profile to see if I can get it
  24. Not sure I follow correctly but the below will return all selected pages in a multiple pages reference field foreach ($page->name_of_multiplepagereference_field as $t) { //this is for the current page //do anything with $t } In the above example, $t will return Page Arrays. Hence, at your disposal are all the properties of each selected page, their titles, their names....everything about them.. If you want to simply check if something is selected (i.e. if there is a value) you do.... if ($x ) {// $x here is some previous page results returned from find() or get () //do stuff. } I have a feeling the above are not what you are asking since they seem rather obvious from the documentation Written in a hurry, there could be mistakes.
×
×
  • Create New...