Sten
-
Posts
58 -
Joined
-
Last visited
Posts posted by Sten
-
-
Hello,
How do I get the next Monday after the next Monday?
I have that, that works and then I don't find how to add 7 days to it :
$str = datetime('Y-m-d', 'next monday');
-
Thank you BitPoet, you saved me much time on it.
-
Although my php.ini is upload_max_filesize = 1000M and I reloaded php fpm, I can't upload files above 2M. I looked at every post on this topic in the forum but could not solve the problem.
My error line is
error] 32540#32540: *1592 client intended to send too large body: 22592569 bytes, [...] request: "POST /exploration/page/edit/?id=1114&InputfieldFileAjax=1
Thank you for any help. -
-
1 hour ago, teppo said:
Anyway, one way to resolve this would be to replace "$moment=strtotime($event->moment)" with $event->getUnformatted('moment'). This will return a timestamp, so strtotime is no longer required.
Thank you very much Teppo, it worked fine.
- 1
-
Hi,
I have strange bug :
Minutes in a date field are not fine in my repeater field.
If I display 2023-04-03 18:30:00 it shows the minutes as 06 instead of 30.- I checked up the date in the database it is fine.
- I checked up replacing the result in my page by the string, it works.
- I tried with strftime then I formatted with the date function for hour and minutes I still have 06mn
Thank you for any help
-
Thank you AndZyk, I will remove it and refresh.
- 1
-
Hi,
I copied the modules from an other installation. As I want to install the module, I have this message:
Cannot declare class ProcessWire\FieldtypeRepeater, because the name is already in use
Do you have any hunch about it?
Thank you
-
A problem of HTML entities.
-
Hi,
I am perplex as I compare the content of a description field of a file ($page->parent()->formulaires_papier) and the option chosen in an other page ($page->categorie_de_formation->title). When I have a real string it is OK but when I compare the two fields they never match although I checked up the string perfectly matches. The choice is only for one option.Here is my code
<?php $cat=trim($page->categorie_de_formation->title); foreach ($page->parent()->formulaires_papier as $formulaire){ $description=trim($formulaire->description); if ($cat==$description OR $description=="Réglement intérieur"){ echo "<a href='$formulaire->url'>$formulaire->description</a>"; } } ?>
I tried many things but it still bugs...
Thank you -
Thank you @bernhard nice solution!
- 1
-
@Gideon So and @3fingersWell in fact I create a field in my admin board. So I added this field to the template and so when I create a page with this template, I insert a category to this field using input text. But It would be better to have a selection field populated by all the children of category. That is why I want to populate this field. Thank you
-
Hi,
I need to populate a multi selection field with all the children of a template. How would you proceed?
Thank you -
-
Hi MoritzLost,
That is just for the interface (menus, formulas...) the body field contains each post in any language. I have a default language and an URL segment to get the chosen language. The translators complete the files once only per language.
- 1
-
Hello MoritzLost,
Thank you for your answer. I found an other solution and I'll tell you my system.
I got rid of TwigExtension and replace its function inside twig by using fuction in my php files.
In my system, I find useful and simple. I have translations files : fr.php, de.php...
Inside them I have the translations strings with constants. I call them in my init file after getting the language from the url, the transform the constant into variables for commodity. At last each varialbe is in the twig files. I have 8 languages and so translators just write in the file, I feel it simple. Ask me if you're interested and want precisions.
Have a nice sunday.
-
Hello
Till now I hacked something with the twig template but it works no more with new PW versions so I look forward to create a module. I am working on a site in multiple languages : French, English, Italian, German, Spanish, Portuguese, Hebrew, Russian. The new posts are entered in any language with a field for language. Till now, I got twig files to get the translations with constants defined for each part of the pages.
So I'd like to create a module to include theses files added according to the url /fr/en/...
Have you some observations to do before I begin about the direction to take ?
Thank you
-
Thank you Kongondo, this a bug from me, I am testing my site on another server, removing my templates engine extensions that cause problems when upgrading.
This is definitely not a PW bug. I found my file template had a remnants of the twig template engine.- 1
-
Hi Kongondo,
Yes sure
3.0.156 version and I have not any save button. The file was the template file permission.Thank you
-
I can't explain it as I just transfered everything on an other server for a test. I used an other way through the database directly.
-
Sorry I can't find any submit button to save my configuration on a template in the admin interface. The file is fine.
-
Hi,
I change my server with the same debian version, moving my site to it. I have now a Undefined variable: view in the site.
Thank you. You could save me some time.RESOLVED
-
Hi Regesh,
Do you have the latest version of ProcessWire ? Did you try to install a previous version ?
-
Thank you Tarkvsg, I will try. Eventually I reinstalled my PW.
[SOLVED] How to get the next monday of the next monday
in General Support
Posted
Thank you @netcarver, it works fine, @cwsoft, thank you but next next monday it is not always 14 days.