Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. Looking at the languages site profile, there is no _head.php file: https://github.com/processwire/processwire/tree/dev/site-languages/templates Maybe you are combining files from different profiles? Regardless, the key thing is that $homepage is null so you need to define it somewhere before the line that calls the getLanguageValue on it. Currently the languages site profile does this in the _init.php file: https://github.com/processwire/processwire/blob/e12095e622555fe79cd792dea1ed7d671e37d9d4/site-languages/templates/_init.php#L26
  2. Hi @Ivan Gretsky - I've added some options for controlling the automatic backup (not committed yet) and I am thinking about the guest user access for making calls to actions via the API. I am considering a couple of different options and will put together something in the next couple of days. Hope that works for your timeframe?
  3. I think you are much better off defining distinct "styles" for Ckeditor rather than allowing full manipulation - if you give editors free reign to change colors, you're likely to end up with a really ugly site. You can read more about setting up styles here: https://github.com/processwire/processwire/blob/dev/wire/modules/Inputfield/InputfieldCKEditor/README.md#custom-editor-css-file
  4. I am not a big multi-language user, but what I have done previously is to add this to the ajax URL: &lang=es and then in the file that is called: $user->language = $languages->get($sanitizer->selectorValue($input->get->lang));
  5. Another update which now also fixes bd() and all other calls from the Console Panel when the SessionHandlerDB module is installed - the AJAX bar will be immediately updated now. I think we can now declare that there are no outstanding issues with that module, but please let me know if any of you come across anything I have missed!
  6. For those of you who like using the SessionHandlerDB module, I have just implemented a fix (thanks to David Grudl over at Nette) for the whitescreen issue that was happening with a Modules > Refresh and some other actions when your php.ini had output_buffering set to off / 0 As far as I can tell the only outstanding issue with SessionHandlerDB is calling bd() from the Console panel - this still doesn't work, but in most cases d() is better from here anyway.
  7. Yes, I think you are correct that it's only in 2.8 and 3. Personally I would recommend upgrading. You are missing out on lots of great functionality. If it's a legacy site without much of a budget for maintenance go with 2.8. Otherwise go with 3.x - I have upgraded many sites from 2.7 to 3.x without any problems.
  8. I am not a twig or latte user, but if you figure out some changes to Tracy that are needed to work well with these, please let me know - happy to help support them. I would expect there is an easy way with latte given that they are both by the Nette guys.
  9. @gmclelland and @Zeka - sorry about that - should be fixed in the latest version. Please let me know if you have any other troubles!
  10. Hi @Ivan Gretsky I think I would store the options in a textarea in json format so you can easily convert to an array to pass to the action via the API call. Are you planning on having the security string in the link from the email and handling the authentication in the logic on your pages? Currently the automatic backup can't be turned off, but I agree that this should be possible. I'll do it as a configurable option and also add an option to turn it off via an API call. Let me know if you come across any issues once you start setting this up and I'll see what I can do to make AdminActions work as needed for you.
  11. Fixed by: https://github.com/processwire/processwire/commit/622896e028aba214a5431b34606f94518b35953d
  12. On the Input tab of the field's settings: PS - what's the website? That's the first time I have seen someone on the forums, besides myself, need to enter Ammonium
  13. Just for reference: https://github.com/processwire/processwire-issues/issues/130 If you want a quick fix until @ryan gets this sorted, just add the $options argument to the User version of the method, eg. public function editUrl($options = array()) { on this line: https://github.com/processwire/processwire/blob/e8b9f1294311a9e57d05b5cb5b7395b7685e951b/wire/core/User.php#L448
  14. This functionality is now built into the core so you can use with ML textareas:
  15. No problem at all - glad you decided to stick around - it's nice to have some more Canucks here!
  16. $thumbnail = $page->image->first()->size(600,480); Although if I have an images field that is named to sound like a single image, eg "image" then I always make sure to set the max to 1, rather than 0 so I don't get confused about whether it's going to be a single image or an array.
  17. The problem is that PDO is outside the PW namespace, which is why the "\" is necessary to get you to the global namespace. That change definitely works for me. But then you'll get an error with the way you have your execute([$limit]); I would go with this version instead: function getKappers($limit = 10) { $rs = wire('database')->prepare("SELECT * FROM appointment_kapper WHERE (actief = '1') ORDER BY volgorde LIMIT :limit"); $rs->bindParam(':limit', $limit, \PDO::PARAM_INT); $rs->setFetchMode(\PDO::FETCH_ASSOC); $rs->execute(); return $rs->fetchAll(); } Note that I also used FETCH_ASSOC so you automatically get an array back without needing to iterate the results to build it up.
  18. Is that the entire contents of your contact.php file? I would say you'd probably just want to add that echo statement (wrapped in PHP tags) somewhere above or below your address block. You will also need to add the google maps script tag on the page - you could likely do it with your angular script code, but depending on how this template file is used are where the <head> and <body> tags are defined, it might be better to place it in that other file: _main.php perhaps? You could add some additional logic that checks the template of the page before adding it.
  19. That just goes into one of your template files, like: site/templates/home.php or basic-page.php, or perhaps contact.php if you are putting this map on a contact page that uses a template named "contact". Do you have a PW site up and running with one of the initially installed site profiles? You should have at least a home.php template file - try there to start to get yourself going. It sounds like it might be worth reading through some of the tutorials: http://processwire.com/docs/tutorials/ We're here to help, but you should do a little reading first to make life easier on yourself!
  20. Take a look at the Google maps example pages: https://developers.google.com/maps/documentation/javascript/examples/map-simple Remember that with PW your template files are what is used to output the HTML. It depends on how you have your template structure/logic setup - Direct vs delayed output. They key thing is to have the script output on the page where the maps needs to be displayed. I still think it would be easier for you to use that MapMarker module I linked to - it will take care of all of this for you!
  21. If you're using ryan's MapMarker module (http://modules.processwire.com/modules/fieldtype-map-marker/) you can add the API key in the module config settings. If not, this page explains how to add it when you manually add the script: https://developers.google.com/maps/documentation/javascript/get-api-key <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap" type="text/javascript"></script>
  22. Thanks @mel47 and @Klenkes - I have pushed that version to Github. Happy holidays to all!
  23. Thanks @tpr - I have implemented that, although I was a little hesitant. I certainly like the look, but I was worried about the consistency of the interface compared to what we're used to with ASM Selects. Curious why you haven't done this for the roles settings in AOS?
  24. Are we talking children of pages or the children that make up the repeater field (that live under the Admin branch). If the latter, then I think my idea sounds good, but again, sorry I really haven't read through this thoroughly. I really am just thinking from the experience I had with that Pagetable to Repeater(matrix) converter. I didn't recreate the child pages, I just moved them from the page table parent to a repeater parent location and then renamed them using the repeater naming scheme. There was lots more to it than just that, but this way it turned out completely reliable, whereas copying resulted in all sorts of problems with there were complex sub-field types involved. Anyway, I think I should bow out from this now as I really am not following properly
  25. You like to keep me busy don't you How's this? That along with a few tweaks/fixes has been committed. Don't forget to fork and contribute
×
×
  • Create New...