Recently Browsing 0 members
No registered users viewing this page.
Here's my Norwegian language pack for ProcessWire. I've been adding translations over some time, to suit my own projects users needs.
Not yet complete. Translations that non-superusers will see is prioritized.
ProcessWire 3.0.77 dev
Number of files:
177 wire files and 68 site files – ranging from just started to completely translated. The site files includes translation some free and some pro modules, see the complete list in the README.md at GitHub.
Available at GitLab:
I want to use the API to duplicate an image from one field to another (on the same page). The duplicated image should be a new file so both fields should not point to the same physical file. The field that holds the image that I want to duplicate is called 'image_front' and the duplicated image should go to a field called 'image_thumb'. Any image that is already attached to image_thumb should be removed because it should hold only one file. The same goes for image_front, it should have only one image. Here's what I have so far:
$original = $page->image_front; $file = $original->getFile($original); $new = $original->clone($file); $page->save(); $page->image_thumb = $new; $page->save('image_thumb'); This works in the sense that the image is successfully cloned but it is attached to both fields so both fields end up have their original image plus the cloned image. 'Image_thumb' should only have the cloned image and 'image_front' should only have the original image. What would be the best way to remove those images and am I even approaching this correctly?
By Eunico Cornelius
Hi, I am new to process wire and I've been trying to change the date time format in my webpage according to its language selection(example: English 'd/m/y' , Deutsch: 'd.m.y'). I know that using
$datetime->getDateFormats(); we can achieve the type of formats in the shape of indexes. Also, by using
$user->language->id we can know which language we are using. How do I combine this two functions so that when I select English/Deutsch, the date will be adjusted accordingly?
Is there a specific function that can do this or is there any provided index in the $user->language somewhere. Thanks in advance :).
By Clément Lambelet
I'm really new to ProcessWire, maybe I missed the solution in the documentation.
I'm working on a site which involves a lot of image upload fields, and I'm always getting many timeout errors. I'm pretty sure it's because I generate too many variations on a single page load (around 20 images with 7 different sizes, for them to be responsive).
I can't use ImageSizerEngineIMagick to help (my host doesn't support it).
I was wondering if there was a way to hook to the process of client-side image resizing (https://processwire.com/blog/posts/processwire-3.0.63-adds-client-side-image-resizing/) to generate the different variations (as it seems really faster). If not, is there a way to generate the different variations on upload and not on page load ?
Any ideas and suggestions are welcome!