Jump to content

diogo

Moderators
  • Content Count

    4,209
  • Joined

  • Last visited

  • Days Won

    72

diogo last won the day on September 29 2020

diogo had the most liked content!

Community Reputation

4,743 Excellent

4 Followers

About diogo

  • Rank
    Hero Member
  • Birthday 08/09/1978

Contact Methods

  • Website URL
    http://ed-works.com

Profile Information

  • Gender
    Male
  • Location
    Frankfurt am Main

Recent Profile Visitors

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

  1. 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";
  2. Kind of unrelated with the topic, but this is pretty funny ๐Ÿ™‚ https://pudding.cool/2020/12/judge-my-spotify/
  3. And one more http://youmightnotneedjquery.com/
  4. 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.
  5. 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();
  6. 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 ๐Ÿ™‚
  7. 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/
  8. @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 ๐Ÿ™‚
  9. diogo

    PHP 8 released

    $country = $session?->user?->getAddress()?->country; love it ๐Ÿ™‚
  10. 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>
  11. 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.
  12. 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.
  13. 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.
  14. @desbest The answers to your questions are on that very same post: and
  15. As an alternative to the image tags, you could use the new image custom fieds https://processwire.com/blog/posts/pw-3.0.142/
ร—
ร—
  • Create New...