Jump to content

Soma

Moderators
  • Posts

    6,798
  • Joined

  • Last visited

  • Days Won

    158

Everything posted by Soma

  1. Call it directly? You can't put a script in the /site/yourdir/.. folder an call it directly via ajax, that will give access denied by htaccess. The function you write, that is not an ajax call, an ajax call is made via javascript. So can't say for sure I understand. But I'm maybe also missing the obvious or still don't get your code flow, for example where and how do you do the ajax request? And where are you seeing the error?
  2. I'm still not sure when reading your setup and where is what. It can be confusing lol Just think of it as a special type of array that has certain methods depending on type etc. Usually in templates, $page->image as the name would suggest it is a single image field (field setting to max=1), so it would be directly the one image object. If you have a "images" field, and set it to max=0, so no limit, the field will be an array in the templates files and you have to iterate through them or directly access it by some of these methods WireArray's have. So ->first() or ->eq(2) would give you the image object. Now in certain cases this array, single object behaviour is only on template and admin level. Technically it's always an WireArray, but the system has a output formatting that will take care for that. So if you turn of outputformatting you would always have to use ->first() to access the one item in the array. So it's possible that this is the case, but it's obviously not, or I'm still not sure what causes the problem in your case.
  3. I just ran a little test with latest PW and I have no problems requesting a special "/ajax/" page with a template with more or less your example code. Returning a scaled image string, doesn't matter from where. So I can't reproduce it.
  4. It's not attributes for fields, but more html attributes on the inputfield render output. As you say correctly it's not something saved with the inputfield.
  5. For this particular reason I pushed TinyMCE field so we can implement custom plugins. Using bramus_cssextras I wrote a tutorial here:
  6. It would not be a normal php array but a WireArray with image objects. Where is your function located? What is the setup exactly there? Edit: And from where are you doing the function call?
  7. WireException: Method Pageimages::size does not exist or is not callable in this context Looks like you need to threat the image(s) as array adding a ->first()->size() $productImage = $product->wcart_image->first()->size( 80, 60 );
  8. ... and all to help Google "encrypt" scanned books.
  9. The only problem is that ProcessWire TinyMCE implementation has it's own link dialog and not the standard TinyMCE one. But thanks anyway.
  10. You're much into albums. Did you know "Alb" is ancient german myth creature that sit on your chest at night and make you have bad dreams "Albträume"? After reading you post I have more questions than you, so I think. I might get some sleep, have to pass on this for now.
  11. Welcome thistimj. Jeeez... and I even made it sticky!
  12. There's two configs for urls and paths. $config->urls->... returns web urls $config->paths->... returns web server path Mainly for frontend code like including css and script or image you would need ->urls For including libraries or using file_exists, you can take ->paths Also check out the cheatsheet I've done, that will give good reference over the api. http://www.processwire.com/api/cheatsheet/
  13. I'm not sure I understand why you want to create it on the fly, though I think you could. Why don't you just create the structure of the "Placeholder" with it's subpages? It will be not so easy to do what you explain. You could create a special placeholder page where you want with whatever template, then move the Pages C,D,E,F inside it. Then you could show the second level there only if the parent is the placeholder page. Using my MarkupSimpleNavigation you would do this using the custom selector setting: $nav = $modules->get("MarkupSimpleNavigation")->render( array( 'show_root' => true, // include home (root page) 'max_levels' => 2, // limit to 2 levels 'selector' => 'parent=/|has_parent=1004' // *. )); echo $nav; * This selector makes it show all pages that have "/" (root home page) as direct parent, OR pages that have the "placeholder" page (id or path of page page) as their parent. You could also write has_parent=/pathofpage/. ("parent=/|parent=1004" doesn't work for some reason.)
  14. Thanks Hani for finding the issue. It works here too when changing.
  15. - Well is it meant to NOT enter the account ID in the module settings? - When I don't enter a account ID the analytics page in PW throws error without continuing. When I enter any, I get to auth via google and after redirect back to PW there's not select at all (only once it was there) and the 403 is shown in each panel. - The ID after the "p" is always different to every sub account. - What ID really is supposed to go there? - NO matter what ID I take it doesn't work. - I always get a "403 access not configured" - I don't have any - I cleared cache any time I tried something. And please take out the MarkupCache dependencies. Not sure you've read my first post from today completely. It shouldn't install or uninstall MarkupCache core module at all. If your module is using it no need to install it, as the first $modules->get("MarkupCache") ... will install it on demand.
  16. After a long time trying the account id I enter was always right. Though suddenly I've come to the select dropdown, but after selecting one I see again the error as before. Metioned in my previous post.
  17. Finally I seem to have it working after 1000 try and error. I create a new project on google API page, the one I already had was from another test I did a while ago. After entering the new key's I got still an error saying I don't have the permission... I'm not sure what I have done that it works now, but after authenticate, I can select an account after redirect. OMG! But after selecting an account I again get the same error "(403) Access Not Configured"}". Can it be really that hard?
  18. @hani you have to enter it in this format ga:xxxxxxx as mentioned before by wanze, though still not sure what numbers. When I try ga:5735834-7 it doesn't work (regex not matching), when I enter ga:5735834, it seems to recognize it but still an error that access is not configured is shown. I also never come to select any account as mentioned in the description. @wanze, I'm trying since hours to get this module working and no luck so far. I got the same problem with entering the account id as mentioned above. After reading your posts again I still can't see what would be wrong. I entered all key and secrets and the account id, but it always returns some 400,403, or 500 or whatever. The get is shown like this: "Error calling GET https:\/\/www.googleapis.com\/analytics\/v3\/data\/ga?ids=ga%3A5735834&start-date=2012-08-09&end-date=2012-09-09&metrics=ga..." (403) Access Not Configured" So I wanted to uninstall the module, and I've seen that it will also uninstall the MarkupCache module in PW, which is a bad thing. It may be required by the module but a simple $modules->get will load it if installing you module, no need to make it required and uninstall it when uninstalling your module.
  19. The only really powerful setup is to use one page for 1 photo. From there you can do everything you ever wish with the page fieldtype to reference and categorize. You can take my PageListImageLabel module (http://modules.proce...st-image-label/) to show the thumbnails in the pages tree directly. Then you also will have no problems adding as many meta information to your photos. Sure one could say creating a page per image is overkill, but they haven't really done so I would stick with that if you really want to manage single photos in the way you want.
  20. I think you can simply deinstall Session Login Throttle module.
  21. You take it too serious Pete! ... I meant more because there's like 3-4 people responding at same time and cross over.
  22. As I already mentioned before: We soon need to have support tickets
  23. Yes. But per user is mainly for the admin, on a multilang website you dynamicly set the guest language and together with a language switch.
  24. http://modules.processwire.com/modules/form-save-reminder/ Your welcome!
×
×
  • Create New...