Jump to content

adrian

PW-Moderators
  • Posts

    10,786
  • Joined

  • Last visited

  • Days Won

    346

Everything posted by adrian

  1. I don't actually see how your revised find would work, but this will: $id = $this->pages->get("include=all, sort=-id")->id + 1;
  2. Haven't needed this myself, but from the PHP date page: "To format dates in other languages, you should use the setlocale() and strftime() functions instead of date()." EDIT: Given the way this module uses dateFormat, it might not be possible easily without hacking the core of the module. Perhaps it would be better to implement a new way of defining the date format in the module by using strftime instead of date here: https://github.com/ryancramerdesign/MarkupLoadGCal/blob/master/MarkupLoadGCal.module#L351 If you have the time and skills this should be pretty easy and might be a nice pull request for enhancing the module. Perhaps someone more language savvy will chime in too.
  3. @darrenc The way you submit enhancements/fixes to a project on github is to first fork the project, then make the changes to your forked version, then submit a pull request to the original project. Ryan will receive notification of your PR and he can then review and accept the changes as is, or modify them as needed. Obviously it's hard to know whether your changes will be coded the way Ryan would prefer or not. Depending on the change it might be just as productive to simply submit an issue asking for the enhancement. You could look through some of the previous PR and issues and see if you think your enhancement suggestion and your coding quality would make it better suited to one approach or the other. Sorry, not a definitive answer, but hopefully helpful.
  4. The instructions for this module say to use the path relative to your templates directory, eg: styles/mystyles.css or scripts/myscript.js There is a setting in the module config: "Allow Directory Traversal: Enable the directory traversal option to make it possible to add files from outside of the template folders. (../)" which you can use if you need to access css and js files above the templates directory, but otherwise they should all be in subfolders of "templates" and linked to with a path relative to templates. Make sense? EDIT: not relevant to this module, but path vs url - depends on what is being done with the file being linked to. If it's a css or js file, typically you are going to want the url option. The path option is the full server path to the file which is useful for php operations on files, but no good for front-end display/calling of files.
  5. Wow @cstevensjr - I am feeling the love from you tonight
  6. Nico - this reminds me (not that I had really forgotten, but have been REALLY busy), that I need to do a little work associated with this for you. I really will try to get to it shortly!
  7. Ok, so I have added support for automatic populating the video title into the image description field for both Youtube and Vimeo. Not sure how much longer this method will work with Youtube, but I think it's simpler to keep using v2 of their API for the moment. I implemented both cURL and file_get_contents methods for Youtube and simplexml_load_file for Vimeo. Let me know how it works for everyone and I'll tweak methods if needed.
  8. Yeah, that is still working, but from a quick read I get the feeling it won't be in the future, but not certain. I did read something that suggested that maybe basic info like the title will still be available this way. Maybe I should just go with this for now and adapt later if needed. I might go with curl though to avoid issues with get_file_contents and those on hosts with allow_url_fopen disabled.
  9. So the only catch seems to be that google has deprecated v2 of the youtube data api and v3 requires an API key. I haven't investigated much, but do you have any ideas?
  10. Seems simple enough - would it suit your purposes if I stored the video title in the image description field, or do you have another preference?
  11. I have just updated this module with better support for video links that have a start time and other additional parameters in the url. It also now supports embed links and other variations. Please let me know if you find any issues with this new version.
  12. I had that 404 issue with the last module I submitted. Not sure why the "master" is missing from the filename. Don't know whether github changed something that is messing with Ryan's code for getting the name or what. It's obviously an easy edit, but maybe something we should bring to Ryan's attention.
  13. It's right there in the cheatsheet OK, so your turn to beat me this time!
  14. @pwFoo, Not sure exactly what you need - are you after admin or front-end notifications for users? If the latter, then I described a solution a while back that might take of what you need without a module: https://processwire.com/talk/topic/5534-new-articles-to-users-with-cookie/?p=53935 Obviously not exactly how you want it set up, but might be easily adaptable. Anyway, not sure if it is what you are after, but thought I'd see
  15. all you need is: echo $child->createdUser->name; assuming you have already set $child to the page in question. For the current page: echo $page->createdUser->name;
  16. No issues here on Mac Chrome - maybe teppo is just having a bad day
  17. You can add: include=hidden to the selector in your foreach.
  18. Hi Ralf, Glad you are enjoying using it. I just tested it with: and it works fine for me. See attached screenshot Can you see anything different that you think might be affecting things?
  19. We're going to need more than that to help you Any errors with debug mode on? Post your final code so we can a look.
  20. Thanks for the explanation. I am sure you've seen it, but this looks promising: https://github.com/tedivm/JShrink Anyway, thanks again for this module - it's a real time saver. On an unrelated note - I did notice something yesterday when using the loadOn option. It worked fine for CSS, but it didn't seem to work properly with JS. Before you go delving too deep, I should do some more testing and see what I can find - might have been an issue at my end. I'll try again soon and let you know how it goes.
  21. Soma, I think he is talking about this setting: https://github.com/somatonic/ImagesManager/blob/master/ImagesManager.module#L36
  22. Thanks for cleaning things up, although you might have gone too far - now we don't know where $u comes from Actually with it cleaner I did notice something new - your check for: if (count($u->avatar)){ If you want to go with the count approach don't you want it to be: if (count($u->avatar) == 0){ since you are trying to find a case when there is no avatar? Of course I think you should be using $user->avatar directly, but you get what I am saying.
  23. Have a read of this: https://processwire.com/talk/topic/2194-flie-upload-max-file-size/ It should help you with your php.ini settings.
  24. Hi Cairan and welcome to PW. Of course: <img src="{$child->nav_image->url}" /> Although depending on your image settings, you may need to use: $child->nav_image->first()->url Have a read of: http://processwire.com/api/fieldtypes/images/
×
×
  • Create New...