-
Posts
495 -
Joined
-
Last visited
-
Days Won
4
Posts posted by totoff
-
-
Hi and many thanks for your contribution to Processwire! I've PageimageSrcset running on some sites. Is there anything particular to consider regarding the migration to the new module?
-
@Robin S excellent, thank you. That's what I was looking for.
- 1
-
Dear all,
I need to provide some links to PDF downloads from within body fields with textformatter Markdown/Parsedown extra. What is the best way to realize that? I link to images from an image field with textformatter image tag. Is there a similar solution for FieldtypeFile?
Thanks
-
@monollonom That's great, thanks for pointing me to this. Exactly what I was looking for.
- 1
-
Dear all,
tomorrow I'll have to introduce some editors on how to upload and edit images in image fields in Processwire. The site in question is quite image rich and I've spent some time to serve the appropriate images via scrcset already cropped for different screen sizes.
However, the backend offers a lot of possibilities to manipulate images and most of them I'm not familiar with because as a developer I've never spent much thinking on what all the features might be good for … Yet I'm concerned that my editors work on images in the backend may interfere with my optimization strategies in the templates.
Is there a general rule of thumb what content editors should do or not do with images in order not to break srcset strategies etc.? Maybe there is already a source of information you could point me to?
Your recommendations are much appreciated!
-
36 minutes ago, BillH said:
I've done some tests, and the issue is a result of page->save() not working for custom image fields.
That's good news for me, felt like a complete noob … Thanks for letting me know.
-
@BillH Man, you saved my live. I had a nightmare last night, seeing myself migrating dozens of entries manually but your code came to the rescue. It works! Here is my code:
page()->of(false); foreach (page()->images as $image) { $image->artist_name = $page->title; if($image->description): $image->title = $image->description; $image->image_caption = $image->description; endif; // first save inside loop saves the field value $page->save('images'); } // saves the page $page->save();
Yesterday I had the output formatting statement inside the loop and I assume this was the mistake. Thanks for helping me!
- 3
-
Hi elabx,
thanks, really appreciate your help. Unfortunately that doesn't work either. I've tried all kinds of variations including setting the image title as this is a mandatory field. This is where I currently am:
foreach (page()->images as $image) { page()->of(false); $image->title = $image->description; bd($image->title, 'title'); $page->save('images'); }
But it doesn't work. The value for $image->title is assigned (as I can see with Tracy) but doesn't get stored to the database. ?
-
This is driving me nuts! I managed to set the value for a single image description field and saving it using page->save(); but no luck with values I set for the custom fields inside the foreach loop. They are not saved to the database. Im sure this has a super obvious reason but I'm lost finding it.
Any help is much appreciated.
-
59 minutes ago, elabx said:
Try setting the page's output formatting to false before saving.
page()->of(false);
Thank you, unfortunately that doesn't work either. Same problem.
-
Dear all,
I'm upgrading an older side with the new custom fields for images feature as of 3.0.142. My image field is set to "Automatic" and holds a bunch of images together with their respective description on each page. New custom fields include "caption" among others and to make my live easier I I'm trying to populate "caption" with the value from the (default) description field. But unfortunately I can't seem to find out how to save the newly set values. This is my code:
<?php foreach (page()->images as $image) { $image->set('caption', $image->description); bd($image->caption); echo files()->render("markup/views/view-card-image-fancybox.php", array('image'=>$image)); } ?> <?php $page->save(); bd($page->save()); ?>
This sets the value as intended (see screenshot) but doesn't save it permanently to the database. What am I doing wrong?
Thanks!
-
Eine super Seite - nicht nur das Design, auch der Content // Awesome Site Marc!
- 1
-
On 12/21/2020 at 9:35 PM, OrganizedFellow said:
How do you do live reloading?
cmd+r on my mac. works great!
- 1
- 3
-
hey @schwarzdesign, so pleased to see you finally found your way to processwire! awesome work i enjoy frequently on my mobile.
- 1
-
i wonder why one should want another editor than sublime …?
- 1
-
5 hours ago, Juergen said:
Sorry, @totoff,
my fault. It mean the Fullcalendar. I use it with Uikit markup (badges,..) so I always call it "UiKit calendar". This was a mistake. Anyway, you can use it with recurme. Here you can find the Bootstrap calendar. Both are available on Jsdelivr CDN. So no need to include the files locally.
Best regards
would you mind share some code of your uikit implementation? sounds very interesting. if so, please pm me. thanks.
-
13 hours ago, Juergen said:
Works also with UiKit calendar and Bootstrap calendar if you are using a framwork. If you are using UiKit calendar you can make fe a template which outputs all the calendar dates in a json array. Then you can load this template (or lets say the event dates) via ajax into the UiKit calendar template engine. Its very easy.
@Juergen Sorry if I miss something, but where do you find a calendar component at Uikit (https://getuikit.com/docs/introduction)?
-
14 hours ago, joshuag said:
Great question. You could actually use Recurme with full calendar if you like.
actually, I set up a fullcalendar yesterday after my post here
- 1
-
-
I wonder if there is a possibility to switch views in the frontend, say a weeks or days calendar instead of month and/or list?
Thanks
-
Hi SamC,
here is what you are looking for:
http://hsrtech.com/wordpress/backup-projects-mamp-using-dropbox/
- 1
-
hi horst,
mac os (mamp). move has been done twice: 1. pull it off the server, import db, see if it works. 2. super-clean and fresh install, re-import db, replace templates folder, see if it works.
i'll give the cache thing a try and report back.
many thanks!
-
Hi Forum,
we moved an installation from the live server to localhost for further development. Unfortunately now PW doesn't find files in the /templates/ directory anymore (e.g. css, js and so on). Functions testing for existing files abort with an error and the console throws 404 for the files in question.
Two developers have checked (so far several times):
- site/config.php $config->httpHosts
- .htaccess
- file permissions on /templates/ and all subdirectories (set to 777 just to be on the safe side)
- our own php functions
Our version is 3.0.22 devns.
We are running out of ideas. Any help is appreciated. Thanks.
-
Hi all,
I'm getting an error with this module when trying to perform a core update:
Method WireHttp::setTimeout does not exist or is not callable in this context
PW 2.5.3 in shared hosting running smoothly apart from that. Any ideas?
Thanks
PageimageSource
in Modules/Plugins
Posted
Hi @nbcommunication,
thanks for your reply. I'll stick with PageimageSrcset than. Never change a running system ?
Best, C.