Jump to content

adrian

PW-Moderators
  • Posts

    11,185
  • Joined

  • Last visited

  • Days Won

    372

Everything posted by adrian

  1. Hi Peter, Glad you are liking the module. I haven't looked at this for a while, but at the time I built this it seemed like all the options were not always available with all videos which I why I built in the "First Available" option - that way you can list all, but only grab one. Would your needs be suited by reordering the list so that "default" was listed first? That way if it is available, it will grab that one, saving you the bandwidth of downloading the maxresdefault if you don't really need it.
  2. I am not sure what version of PW you were running before, but the current stable requires PHP version 5.3.8 or newer with PDO database support. That error is saying that you don't have PDO support. So you will need to correct that (your host should be able to deal with that for you), or you will need to revert to an older version of PW that worked with mysqli. Best of luck sorting it out.
  3. Sorry, I didn't read properly. I am still not exactly sure the scenario you have, but if I understand correctly, it is easy to get all the comments for a series of pages like this, without needing to hack core code: $selectedPages = $pages->find("id=4287|4304|4307|4314"); foreach($selectedPages as $p) { foreach($p->comments as $c) echo $c->text; } Maybe that isn't exactly what you need, but maybe it will be helpful. If not, can you explain a little more about how and where you want to output the comments.
  4. Try id instead of pages_id
  5. I assume this was directed at me, and not @arjen? I am trying to replicate your issue here but can't at the moment. Just quickly, I am wondering if that might be a bug in InputfieldWrapper.php Could you please try to replace that line 245: } if($this->getChildByName($item->attr('name')) && $item->parent) { with: } elseif($this->getChildByName($item->attr('name')) && $item->parent) { I am not sure this is the problem, but it's weird to me the styling Ryan has with the "if" starting on the same line as the closing curly brace, so I think it might be meant to be an "elseif". Anyway, let me know if that fixes things - if not can you narrow down a particular setup that results in the new error.
  6. I don't know what's going on with the extra output, but you have issues with your page saving. You should be doing: $nr->save() or $p->save(), not $page->save() I guess your first example will probably work as is, but the second one won't save the new page you have created - it will be save the current page that is being viewed, which is always $page.
  7. Simply add start=0 to the selector in your other queries.
  8. Would anyone else like to see the ability to make use of PW variables to build up dynamic descriptions and notes for fields? This is a very simplistic example and not that useful, but I do have some use cases where the ability to do something like this would be very handy: $f->description = __('Please make sure you fill out this field based on the content of the {page.parent.title} summary field.'); As I said - a bad example, but I think this could be a powerful addition in some scenarios.
  9. Keep in mind that the maintenance mode and protected mode modules only limit access to the front-end of the site, not the admin panel, so won't work for your needs anyway.
  10. Good point - I hadn't noticed this before as I guess I have never entered a relative URL in a FieldtypeURL field before. I guess the difference for me is that in an RTE field you always need to insert a URL, but in the case of a field that is just storing a link to a page, it might be better to store the page ID - I think if you do go this route, you want to store the ID, but always return the page object so in the template you could choose ->url, ->id, ->title, etc I think that looks much cleaner!
  11. I would suggest PM'ing Ryan about this.
  12. If you are happy with a quick hack, try this in your templates/admin.php file. if($user->isLoggedIn() && !$user->isSuperuser()) { echo 'Sorry, login is temporarily disabled'; return; }
  13. Hi @wumbo - thanks for this - looks pretty handy, but a few thoughts for you. If you manually enter a URL it automatically adds the http://, forcing it to be an absolute URL, but if you choose a page, it populates a relative URL - this will be problematic when outputting this field's contents in something like an emailable template. When selecting a page from the site, I would rather the field stores the ID of the page, just in case the path (and therefore the URL) is changed down the road. The module could handle outputting the URL of that page automatically, so if an absolute URL is stored, then echo that, otherwise echo the URL of the page, maybe with an option to force an absolute URL just in case you are using this field in something like an email template. I think this would be a very useful addition. Just visual stuff, but I'd like to see the "Open Link Assistant" a little LOT smaller - perhaps a small icon or something. Also, the width of the text input is not quite right. Thanks again!
  14. @kixe - does your revised version handle the issue I mentioned here: https://processwire.com/talk/topic/6555-module-currency-conversion-service/?p=74890 EDIT: Nevermind - sorry I see that your module is different It would be nice to have a fix for the double entries issue though.
  15. Hi @hyldig and welcome to PW. To upload other file types, make a new field for your template that has type "File". You can control the file extensions that are allowed on the Details tab. EDIT: beaten by @sergio
  16. Short answer: Yes Attached is a revised version of the module I posted here: https://processwire.com/talk/topic/8406-set-multiple-templates-role-access/?p=81711 This new version adds support for changing "View" access and includes the Guest role (the original version didn't have these options). I haven't tested all scenarios thoroughly with this new version, but hopefully it works as expected. Once installed, go to Setup > Template Setup Batcher PS Don't forget the SHIFT+Click trick for selecting all 50 templates. ProcessTemplateSetupBatcher.module
  17. I am baffled why a text field containing http(s):// would throw a 404 error - maybe Ryan has some ideas. What is the URL in the address bar that is throwing the 404 after saving the page? It still might make more sense to use a URL field type for this purpose, assuming this field is always for URLs and is not more general purpose.
  18. @Tyssen - sorry for the issues with my module - I have just pushed a new version to exclude PW admin pages - its hook on ProcessPageView::pageNotFound won't be added if not viewing a page on the front-end. This should be a nice improvement in general, but should also solve part of your issue. Please let me know how it goes. Now onto the bigger issue of the google map link causing a 404 - can you please give us more details - what field type are you using for the url? Rather than removing the https:// entirely, what happens if you change it to http:// ?
  19. My heart bleeds for you Whenever you get the chance to look it will be greatly appreciated - turns out to be pretty painful to replicate all the checks in all scenarios - hopefully I have everything covered.
  20. @LostKobrakai - I just pushed a new version that adds a lot of new allowed template checking logic - can you please see if this fixes the issues you were having?
  21. Try: id!=2, id!=7, has_parent!=2, has_parent!=7 That will exclude everything under the "Admin" page tree as well as trashed pages. You may also want to exclude the http404 page with: id!=27
  22. What version of PW are you running? I have no problem editing the name of the superuser in 2.6.10 via the GUI.
  23. Nice article by our own Guy Verville (https://processwire.com/talk/user/1691-guy-verville/) http://www.innobec.com/en/blog/websites/processwire-light-powerful-elegant Thanks for the writeup Guy!
  24. What does the Response tab show for that POST request? Most likely an error that can help figure out the problem.
  25. Actually, that is not true - you can use a URL to an image - even from an external website. The Error: Call to a member function add() on null error suggests to me that the picture template may not have a field called "images". Have you checked this? If you are adding from a local path it needs to be the full server path to the image, starting at the very root of the directory structure - it could be something like /var/www/myimagesfolder/myimage.jpg
×
×
  • Create New...