-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
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
-
Drag and drop page sorting with Blog Profile not working
kongondo replied to bbb's topic in General Support
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.. -
@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();
-
Hi, Please explain what this FieldtypeFieldsetOpen::fieldsetCloseIdentifier; does. Thanks.
-
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..
-
images uploaded via script not showing up in admin
kongondo replied to anowitz's topic in API & Templates
This works as well, FYI. $page->of(false); $page->save(); -
Of course, how could I miss that! Thanks DaveP!
-
Thanks DaveP. I am mulling how to implement this in a search function (building on search.php that comes with the default PW install)...
-
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
-
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
-
Getting the selected value of a inputtype Page field
kongondo replied to jtborger's topic in API & Templates
Glad your sorted it out. Please mark thread as solved if you can; Some helpful folks around here prioritise unsolved threads.... -
Getting the selected value of a inputtype Page field
kongondo replied to jtborger's topic in API & Templates
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.. -
@jtborger: I for one would like to see your extended version. Please post away
-
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.
-
how to integrate FluxBB or SMF into Processwire?
kongondo replied to seedle's topic in Getting Started
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.. -
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..
-
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.
-
uploaded images zero bytes/forged requests
kongondo replied to Jennifer S's topic in General Support
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- 4 replies
-
- permissions
- images
-
(and 3 more)
Tagged with:
-
@dragan, A conflict with some other code maybe?
-
Yeah, I'd seen that, thanks. I'll have to revisit it...
-
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.
-
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/
-
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
-
Getting the selected value of a inputtype Page field
kongondo replied to jtborger's topic in API & Templates
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.