Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Does this help? http://processwire.com/talk/topic/2170-how-to-utilise-field-template-context/
  2. Sorry, I probably wasn't very clear on that - I am talking about php scripts that need to be called from the browser, but that are not PW template files. For example this could be an AJAX call to a php file. That make sense now? To clarify, any javascript files can definitely be run from inside templates/scripts. Sorry for the confusion.
  3. Mike, The great thing about PW is that you can structure and name files however you want and put them in whatever subfolders you want. The only real restriction is that your main template files (the ones that relate to the templates you set up in the PW admin) must be in the site/templates directory. The only other restriction is that if you want to call any scripts directly, they need to be above the sitefolder. Other than that, you can do whatever you want. Feel free to add as many include folders and name files however best suits your workflow. I haven't used Drupal so I may not be the best person to comment, and maybe you can do this is Drupal too. It's on the roadmap: http://processwire.com/about/roadmap/
  4. Just include this in your selector: id!=1031|1032 eg: $reisen = $page->find("parent=$parents, id!=1031|1032, sort=reise_abfahrt"); Be sure to check out the selector test module from Nik - very helpful in figuring these things out: http://modules.processwire.com/modules/process-selector-test/
  5. Ryan is pretty diligent at viewing all forum posts, but your safest bet is to file an issue over at the GitHub repository: https://github.com/ryancramerdesign/ProcessWire/issues
  6. What about using $image->width and $image->height to get the size of the image. Although I am not sure if you are defining this in the template already anyway, or if you are grabbing it from the original uploaded image. Anyway, thought it might be of some help.
  7. Hi cork and welcome to PW. I believe all you need to do is this: $body .= $page->comments->renderForm(); The $body variable is built with the various pieces of content that you want to show in the template and is echo'd here in the _main.php file: https://github.com/ryancramerdesign/FoundationSiteProfile/blob/master/templates/_main.php#L113 Or if you want to keep things clearer you could do: $comments = $page->comments->renderForm(); and then echo $comments somewhere else in the _main.php file. So much flexibility in PW which can be daunting initially, but you'll come to love it very quickly Let us know how that goes for you.
  8. I am getting the same behaviour. Probably obvious, but a simple fix until Ryan takes care of it, is to set the default view to rows. That way if there is only one image, they can't get it into grid view in the first place.
  9. Have you read the pages on repeaters, especially the section on: "Finding pages by repeater value (using selectors)" You should be able to figure it out from there using a selector that finds items with schedule_date > time() Let us know if that gets you on your way, or if you need more specific help.
  10. I am sure I am missing something about what you want to do, but this works for me: $target_page = $pages->get(xxxx); $target_page->files->add("full url to file"); $target_page->of(false); $target_page->save(); I haven't looked to see what PW is using in the background (maybe file_get_content with a fallback to cURL), but there might be an issue with file_get_contents if you have allow_url_fopen off in your server config.
  11. Just to tie this issue back to the support board for the module. This issue has been reported, starting with this post: http://processwire.com/talk/topic/421-helperfieldlinks-field-and-template-edit-shortcuts/?p=48416
  12. Wow guys - what an amazing set of answers to this question. Glad I wasn't around and didn't try to answer this - I would have felt quite inadequate. Gotta love this community
  13. Do you have debug set to true in your config.php? Anything showing up in assets/logs? Also check your dev console as the error might be ajax related as it grabs the page list.
  14. Same menu issue here on Android 4.3. And testing on iOS, I see the mobile version of the menu, but it only really works at the top level. Once you tap Setup, you still don't get the option for the other menu levels, it goes straight to the setup page, but maybe that is intentional.
  15. Not sure I completely follow, but it might be better to just send the page ID to the login form: ?pageid={$page->id} It is cleaner and easier to send a number in a "get". Then you can do: $pageid = (int) $input->get->pageid; to make sure it is only an integer that was sent to the form. Then on the page that displays the form you can get the path of the page if you need it using: $page_path = $pages->get($pageid)->path; But depending on your actual code structure and needs, there might even be a cleaner way. You could potential use a session variable - lots of options. If this idea doesn't seem a good fit, let us know and we'll help you get it better optimized.
  16. It sounds to me like you might be running a version of jQuery that is 1.9 or greater which doesn't support .live and needs to be changed to .on
  17. PW caches any image sizes you create with $image->size(), $image->width() or $image->height(). They are all stored in your assets folder and called directly if they already exist.
  18. Why the "deny from all" ? Do you have something overriding that elsewhere for the site specific directories?
  19. Phillip - thanks for a great writeup of your experience. To be honest, I am starting the get the feeling that too many clients/developers don't know/care about image file sizes. It amazes me the number of sites that I visit these days that have images of 500Kb to 1MB, sometimes bigger. I think some have gotten caught up in fabulous full page images, but don't realize that they can be made smaller and still look good. Also, I have to say that I think I would have a hard time getting clients to fork out an annual subscription for an image compression service when with a little care they can make sure the images are properly compressed before uploading. Of course this will depend greatly on the client - I am sure some will love the ability to not have to worry about anything when uploading images and would be happy to pay for your service. I hope your new pricing model works out for you - best of luck!
  20. http://modules.processwire.com/modules/audio-mp3/ and also: http://modules.processwire.com/modules/local-audio-files/
  21. Hi gunter and welcome to PW. I am not sure why you are losing fields - perhaps you can elaborate, but regarding template name changes - if you go the advanced tab of the template settings you can rename the template. You can also choose to use an alternate template filename if that is at helpful in your scenario. Hope that helps.
  22. That's weird that you are seeing that. I get the following in this order: <script type='text/javascript' src='/wire/modules/Jquery/JqueryCore/JqueryCore.js?v=183'></script> <script type='text/javascript' src='/site/modules/ProcessPageDelete/ProcessPageDelete.js?v=1'></script> and the confirm alert works fine!
  23. Hey Nico, I am curious why you went back to the old method for loading the js file? The way you have it now referencing an external js file doesn't seem to be causing the issues I was having with your old way of injecting the script code directly, but just wondering why you aren't letting PW handle the js file inclusion? Also, while I think of it, it is using .live which is deprecated and needs to be replaced by .on Thanks
  24. A couple of posts that might help you out: http://processwire.com/talk/topic/3384-search-with-merged-pagearrays-pagination-not-working/?p=33360 http://processwire.com/talk/topic/4257-ordering-by-date-reversed-then-time-normal-order/?p=42365
  25. $modules contains all the loaded modules, so you can foreach through that and echo the $module->name. This returns them in alphabetical order though, so I am not sure how to determine the order they are loaded. Not sure exactly what your requirements are, but if you want to know if a specific module has been loaded at a certain point in the code, this recent post might be helpful: http://processwire.com/talk/topic/5477-check-if-a-module-is-loaded/
×
×
  • Create New...