Jump to content

adrian

PW-Moderators
  • Posts

    10,912
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. 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.
  2. 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.
  3. 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!
  4. 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; }
  5. 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!
  6. @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.
  7. 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
  8. 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
  9. 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.
  10. @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:// ?
  11. 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.
  12. @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?
  13. 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
  14. What version of PW are you running? I have no problem editing the name of the superuser in 2.6.10 via the GUI.
  15. 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!
  16. What does the Response tab show for that POST request? Most likely an error that can help figure out the problem.
  17. 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
  18. Might be a memory limit issue - check out this thread: https://processwire.com/talk/topic/901-file-upload-problem/
  19. Maybe this module with a custom "class" field added to each image? http://www.kf-interactive.com/blog/adding-custom-fields-for-images-in-processwire/
  20. I just pushed an update to BatchChildEditor that fixes the issue with setting a custom field separator - I made some variable name changes after my final testing for that feature and didn't change all as needed. Everything should be working on that front now if you really feel the need to use tabs. I just tested again with a tab separated setup like in your example above and it is working fine - although I see that you got the patch for supporting MapMarker in CSVImport to work also, so you may not need my module anymore anyways. I would like to point out one advantage though - the ability to predefine csv column to field pairings so that you can make it easier for your site editors to import future addresses.
  21. Sorry it seems like rocket science - there are definitely a lot of config options - this module is obviously about a lot more than just importing CSV files The double quote enclosures allow you to have commas inside the address subfield as well as between the other fields - no need to use tabs as the field separators. There does seem to be a current issue with the module making use of separators other than the default comma - I am looking into it now and should be able to fix fairly quickly. But, again if you use the quote enclosures for the address subfield this won't matter. I guess you aren't actually defining the lat and lng fields, but rather relying on the geolocation? What is the 111111 at the end of the address?
  22. @Mikel and everyone else, Sorry for the hassles - this has obviously been a pain for you and taken up other folk's time as well. I am trying to duplicate here, but can't and also can't figure out how it could be an issue - if you are logged in, the first line inside the module's init() returns before any it does anything else. I'd love to be able to see a test installation where the problem is happening? Any chance you might be able to set up something on lightning.pw or elsewhere?
  23. I see that you aren't following either topic so not sure if you will see these responses, but I posted a detailed response about how you can use Batch Child Editor for importing CSV files into pages with MapMarker fields in response to your post in the other thread. Hope that helps.
  24. @theoretic - welcome to the forums. I haven't used this module for importing data into MapMarker fields, but I just tested my BatchChildEditor (https://processwire.com/talk/topic/6102-batch-child-editor/) and it is working great for MapMarker fields. You will need to configure the following to get it to work: Module config: Where editing tools are available and separately configurable > Configurable Pages - choose the parent page of the children you want to create with the map marker field. Settings tab of the parent page > Batch child editor settings: Data entry / CSV Import Settings > CSV Field Pairings: 1:title 2:map.address 3:map.lat 4:map.lng This of course should be modified as required, but it worked perfectly for me with a template that had just two fields: title, map The format of the CSV I imported was: Page One, "1 Smith St, New York, NY", 40.691049, -73.98734379999996 Page Two, "5 Brown St, Los Angeles, CA", 34.03673800000001, -118.26510000000002 Please let me know if you have any troubles getting it to work.
×
×
  • Create New...