Jump to content

adrian

PW-Moderators
  • Posts

    10,902
  • Joined

  • Last visited

  • Days Won

    349

Everything posted by adrian

  1. What an awesome writeup - great find kongondo!
  2. Some more info on that error: The error is coming from PW itself because it looks like every DB field needs a value for the entry to be successfully saved. You should be able to replicate by removing one of the fields from the comma separated list of extra fields, or by simply uninstalling image extra and then trying to upload an image.
  3. Another critical issue - when using an image extra field within a PageTable, the extra fields show up under the image and appear to be editable. You can make changes to the content of these fields, but of course they don't get saved when saving the main page which is very confusing for the user.
  4. Thanks for the details. I have also been using Admin Page Hider ( since I built it ), and it is working well at my end. However I am tempted to make it optionally work in reverse so that all pages are hidden from all users unless the user's role is listed in the Admin Page Hider settings for that parent page - or something along those lines. Would make it much more efficient than having to hide all new branches as they are added. Any thoughts on this?
  5. Hi @tpr - I am curious how you set this up - I have a similar situation and went with the Dynamic Roles module, but I am not super happy with this approach, so I'll probably end up with a custom hook to further limit access to specific page trees (given that each page tree shares the same templates). Anyway, I'd like to hear how you accomplished this, as I am sure would others.
  6. Check out the latest version of PW - 2.7 just released. EDIT: Sorry, just read that you want it limited to specific pages. For this you might be better off with the dynamic roles module. I haven't checked if it can do exactly what you want, but worth a look: https://github.com/ryancramerdesign/DynamicRoles Be aware that it does have a critical bug right now that might or might not affect your use: https://github.com/ryancramerdesign/DynamicRoles/issues/14 Alternatively if none of these work as needed, you should be able to create a simple hook to check if the page matches you rules and prevent the title from being changed. No time for an example right now, but maybe someone else will chime in.
  7. return $page->parent->parent->children();
  8. Depending on your setup, you could probably make use of the "Custom PHP code to find selectable pages" option and reference the $page->parent or $page->parent->parent - hopefully you get the idea.
  9. If my screenshot is what you want to achieve, then it's very easy. Here are the settings for the details tab of the field: And here is the page tree that is being referenced:
  10. That is basically correct, but the timestamp will also be included in the filename of the cropped version. Is it important that the timestamp is updated to match the exact time the image is actually cropped? The "Rename on Save" option might work - haven't tested.
  11. I am not sure if this helps you or not, but CustomUploadNames (https://processwire.com/talk/topic/4865-custom-upload-names/) allows you to add a timestamp to the filename of an image using code like this: [Y-m-d_H-i-s] in the module's config settings.
  12. Is this what you want to see? The other option would actually be to use the ImageExtra module and the link option - it will work like a pagelistselect, rather than a select dropdown, but would avoid the need for repeaters.
  13. Sorry for the delay in getting back to you regarding the error - I still need to look at this again, but for now I have a new problem for you It looks like the Page Link option isn't working properly - it just shows a text input with "0" as the value. If I load "InputfieldPageListSelect.min.js" in the module, then it works as expected.
  14. Zahari - if you need to work with more than one tag, then this approach will work: foreach($page->images as $image) { if(!$image->hasTag("exclude")) echo $image->url;
  15. Maybe I am not understanding, but it should be as simple as returning this: $homepageImg->url Just make sure that the homepageImg field is set to "PageListSelect" without the "Multiple" and that the "Dereference in API as" is set to Single. That should then return the URL to the page they selected.
  16. We really need to see some code, but the general principle is to set up a counter and and if it equals 0 (the first loop), then add the "checked", eg: $items = $pages->get(1)->children(); $i=0; foreach($items as $item) { echo '<input type="radio" name="items" value="'.$item->name.'" ' . ($i==0 ? "checked" : "") . ' /> ' . $item->title; $i++; } Note the ternary operator checking to see if $i == 0 before outputting checked. EDIT: Well and truly beaten by Kongondo
  17. Once you have installed Migrator and MigratorWordpress you will use the XML from WP and upload it. It will create all the pages, templates, and fields required. It will even create users in PW based on the names of the authors of the blogs in WP. Hope that helps.
  18. Be sure to check "Import Created / Modified Dates" when running the import.
  19. What about adding a Font Awesome plugin to Ckeditor: http://ckeditor.com/addon/ckeditor-font-awesome
  20. Hey kongondo - small bug for you. When editing a page in a modal window - eg through Lister, the Export Data button is ending up at the bottom of the modal. The PW modal code grabs some buttons and forces them to be in the footer, but I am not sure why "export data" is ending up there, but "clear data" isn't - likely a class that has been applied to the export button - but I haven't investigated. Thanks!
  21. Is the WP site still being updated? If you are closing it down and would prefer to move all the posts into PW, we have an importer: https://github.com/NicoKnoll/MigratorWordpress If not, you might try using the RSS feed from the WP site and use this module to render it: http://modules.processwire.com/modules/rss-feed-loader/ - not sure about this - just a quick idea
  22. Module Toolkit does exactly this, and more! https://processwire.com/talk/topic/8410-module-toolkit/ It's still not in a release worthy state - some functionality needs some tweaking - it's on my list, but you know how it goes Still worth checking out though as I think it should handle your needs very well. PS Welcome to PW and the forums!
  23. HTTrack (at least how I have used it) just downloads the served HTML pages - it doesn't need any access to your server for this - it just grabs the pages that any browser can view. How do you know that the copy isn't just serving static HTML pages? If that is the case, then there really isn't anything that can be done. Even if they have duplicated some dynamic functionality from your site, that doesn't necessarily mean anything was hacked. This does seem a bit weird though. I assume you mean the same IP CIDR block, rather than the exact same IP address?
  24. Beautiful work! I think I might have said this just recently to some of your other new features, but it is true - this has become one of my favourite field types. Now go spend some time on some of those commercial modules you have cooking
×
×
  • Create New...