Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


diogo last won the day on March 25

diogo had the most liked content!

Community Reputation

4,751 Excellent


About diogo

  • Rank
    Hero Member
  • Birthday 08/09/1978

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Location
    Frankfurt am Main

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Reopening the offtopic for a moment πŸ™‚ I guess life takes people in other directions. That's not my case though (the older ones must remember me a bit πŸ˜›). Still working with ProcessWire every day, and I'm hugely thankful to Ryan for this. Just not posting much lately. I have a bunch of sites to add to the directory and have to find a bit of time and will to do it. Aside from Processwire I'm also exploring Svelte and the very new (still in Beta) SvelteKit. They don't replace Processwire though, and can even be complementary if Processwire is used as a headless CMS. I started a new thread, so the discussion can go on without getting on and off topic all the time
  2. Where do you want to import the captions to? To the description of the image, to a custom field on that image, or to a separate field in that repeater item? For the first and second you would just add this line before saving the new item: $newItem->post_image->description = "whatever"; or: $newItem->post_image->custom_field_name = "whatever"; For the third you would add something like: $newItem->field_name = "whatever";
  3. Kind of unrelated with the topic, but this is pretty funny πŸ™‚ https://pudding.cool/2020/12/judge-my-spotify/
  4. And one more http://youmightnotneedjquery.com/
  5. Try: $pages->count("has_parent=$child, template=tops, projekt_top_vermietet=1") notice that I changed the single quotes to double quotes, so the variable inside them can be evaluated.
  6. You couldn't use that action anymore, since you're not be adding each file to an image field, but instead you'll be adding a new item to a repeater field AND adding the image to a field in that newly created repeater item. You can copy that action to create a new action that does that. Looking at the code of that action https://github.com/adrianbj/ProcessAdminActions/blob/master/actions/FtpFilesToPage.action.php, in the defineOptions() function, and assuming that the existing 'field' option would hold the repeater field, you'd need to create a new 'image_field' option to hold the image field inside the repeater. Then you'd need to update the code inside the executeAction() function to create the repeater items. In line 78 you'd have something like (written on the knee and not tested): $newItem = $destinationPage->$fieldName->getNew(); $newItem->$imageFieldName->add($item->getPathname()); $newItem->save();
  7. I was thinking: "Ideally you would be able to drop all images in a repeater field, and it would a repeater page for each image, and upload each of them to a predefined field in that repeater"... then I just decided to google for it, and found this https://processwire.com/modules/repeater-images/ I'm surprised that I never came across this module by @Robin S, but it looks just awesome πŸ™‚
  8. Have a look at Media Manager, by @kongondo. It has a cost, but it manages images as pages so you'll be able to add ant kind of field to an image. https://mediamanager.kongondo.com/
  9. @fruid I'm glad the module was useful for you πŸ‘ I'm not planning to update the module, since I offered an alternative that I consider superior: I think you solved the situation well for your use case. I would advise you to simply change the class and file names of your customised version to prevent any unwanted update. I don't have time to look at it at the moment, but you could also add one more optional parameter to the short tag for the size of the image, and trigger the resizing with the passed value only if it exists. If you wish to share your changes, feel free to create a fork or submit a pull request. Whatever you prefer πŸ™‚
  10. diogo

    PHP 8 released

    $country = $session?->user?->getAddress()?->country; love it πŸ™‚
  11. Is Counting a text field? I imagine you want to do something like: "some text $articles some more text". If so, you can use the Hanna Code module, or even a simple string replace, by preparing the text in the field with a placeholder tag: "some text {articles count} some more text", and in your code: <h3><span class="counter"><?=str_replace("{articles count}", $articles, $counter->Counting)?></span><span class="plus-icon">+ </span></h3>
  12. Quite a late answer, sorry. Yes, the module doesn't interact at all with access control. You would have to do that yourself inside the template file, by creating a new permission, and throwing a 404 or printing a custom message to unauthorised users. Dealing with the menu is a bit more tricky, since, the nav uses $page->viewable(), and that's at template level, being that our template would always be "admin". I guess you could simply clone the admin template and set the permissions on that one.
  13. Hi @antpre, The module doesn't do anything concerning this, it only works from the moment you are looking at that page. The place where those pages are shown in the menu is only dependent on where you place them in the tree. Try moving the page from inside the "setup", one level up, into the "admin" page. Now it should be showing as a main item in the nav. If you now place in inside the "pages" page, it will show as a subpage of that manu item. I hope I understood your problem correctly.
  14. You can find all the elements that are wider than the window by adding the code here to the console https://gist.github.com/cuth/c1ddf2b1ce2fb07e512a. One of those should be the cause for the scrollbar.
  15. @desbest The answers to your questions are on that very same post: and
  • Create New...