Jump to content

Juergen

Members
  • Posts

    1,394
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by Juergen

  1. Juergen

    Chrysemys nl

    Great site! Maybe you have to correct (adapt) the breakpoint value for the navigation. The main menu has 2 lines in my case before switching to the mobile view. Best regards Jürgen
  2. This little tipp is not especially for PW, its for all usages. There is a little class called php-store-hours which can be used to easily format opening hours. It is also possible to group days with the same hours like in schema.org markup. There are a lot of render functions available to get the markup that you want. Just take a look. Maybe it is something you are looking for. Best regards Jürgen
  3. Here is a little Hook that I use to add the last date of recurring events to the end of publication field. Please copy this piece of code into your ready.php file. //dates = name of your recurring field - please change it to your field name //publish_until = name of your end of publication field - please change it to your field name // hook to add the publish_until date according to the last event date $pages->addHookAfter('saveReady', function($event) { $page = $event->arguments[0]; if ($page->hasField('dates')) { $dates = $page->getDates(); if($dates){ foreach($dates as $key=>$date){ if ($key === key($dates)) $enddateunformatted = $date; } $page->publish_until = $enddateunformatted; $enddateformatted = date('d-m-Y', $date); $this->message($this->_("The end date of the publication was set to {$enddateformatted}.")); } } }); In my case I use the the SchedulePagesModule to unpublish pages after a certain date. In this case the date field for unpublishing pages is called "publish_until". My recurme field in this case is called "dates". You have to add both fields to your template. Now I want to copy the last date of the recurring events to the "publish_until" field, so that the article will be unpublished after the last recurrence. For this purpose you have to add the code above to your ready.php file. If you have named the fields differently than "publish_until" and "dates" you have to replace this by your names. In a first step I check if the template has the recurme field "dates". If yes then I check if there are events generated. The last step is to grab the last occurence and add this date to the end of the publication field ("publish_until") - finished! After pressing the save button the last ocurrence date will be saved in the publish_until field and the article will be unpublished after this date. Best regards
  4. Sorry, but I cannot confirm this behavior. Do you have set $config->timezone correctly in your config.php? In my case the dates will be calculated correctly.
  5. Hello @Robin S the problem is still there in version 0.0.3. Argument 2 passed to ProcessWire\InputfieldWrapper::insertAfter() must be an instance of ProcessWire\Inputfield, null given, called in /home/.sites/24/site1275/web/site/assets/cache/FileCompiler/site/modules/CustomInputfieldDependencies/CustomInputfieldDependencies.module on line 156 and defined Best regards
  6. Only just a thought: It would make more sense to offer only the possibillity to enter just a start date without a time. If there is a start time, there should also be an endtime. So if you remove the time setting from the inputfield for the date it means there is an event on that date which is all day long. If there is a need to restrict an event via a start and end time we can add 2 PW time fields to the template. This is the case if there is fe a course the starts and ends at a certain time. This looks better than using the time field from the module field for the starting time and another time field from another PW field type for the endtime (2 different fieldtypes with different looks). Another case would be that a store is fe closed on that day (inventory or something else). The shop is closed the whole day. So there is no need to enter a start time - it is an all day event. We dont need a start time in this case. Conclusion: I think a date only field without the possibility to add the time would be a better fitting solution in this case. If you want you can add 2 time fields to the template or not (depending on your needs). No mixin of 2 different fields necessary. Best regards
  7. Looks really amazing. One question: Is there the possibility to limit an event to a certain endtime or to a certain date? Fe event starts at 6am and ends at 9am or an event goes over midnight (multiple days event) From the images above it seems that it will always be a whole day event. Best regards and respect for this work.
  8. No, this piece of code doesnt exist in the module file. I have added it at the top after the namespace and now it works. Thanks!!!! If a problem occurs once more I will post it here. Best regards
  9. Hello @sunlix I have installed version 1.0.1 but this is where the error occurs.
  10. Hello @modifiedcontent, my code above works in PW3 dev. I have modified a if function and this makes the problem. Removing the if statement makes the code working again, so this is an working example. Of course. This is only a temporary storage folder and the image will be deleted after this command: unlink($upload_path . $files[0]);
  11. Wow! Just that simple!! Thanks a lot - works as expected!!
  12. Hello @ all, it is possible to get the parameters of min and max dimensions of an image upload field set in backend via API on the frontend. I use an image upload field on the frontend and I want to show a hint for users that the uploaded image should be at a certain size. For this purpose I want to output the min and max sizes that I have set in the backend. Does anyone know how to get this values via API calls on the frontend? Best regards
  13. Hello @bernhard, no it was independent if they were in a repeater or not. Image upload doesnt work at all. But as written above it works again without any interaction from my side.
  14. Thanks for your response. I dont know why but today the image upload works as expected without changing everything. Yesterday I have been working on a frontend user template with image upload and afterwards I have tried to upload an image in the backend which didnt work. Maybe there is something strange going on afterwards. Anyway! It works now
  15. Hello @ all, today I have discovered that the image upload in backend no longer works after upgrading to the latest dev. It seems that after the progress bar is full the image upload stops and will never get finished Aufnahme #6.mp4 Does anyone has discovered the same issue?
  16. In my case I also had the problem that the map was not rendered. I found out that a javascript (in my case fullcalendar) for initialization was responsible for this behavior. So I decided to put it inline only on that page where I needed it and not in an external javascript file which is included in every page load. Another point was that if I turn template cache on the map will not be rendered too, so I disable the cache on the template where the map is included. So if you have problems, please check this 2 points. Maybe this solves your problem.
  17. Hello @sunlix I get the following error after activation of the automatic markup of abbreviations. My site is multilingual and I use the lates PW dev version. Maybe a namespace/file compiler problem? Best regards
  18. Juergen

    Rockpool Painting

    Great site! One recommendation: use an internal anchor after form submission to get back to the contact form if there are errors. At the moment you get to the top of the page and have to scroll down to the contact form to see the errors. Best regards
  19. From the marketing point of view there is a strategy called "product bundles" which means you put at least one product which is very well selling into a bundle with lower selling products to increase the sales in general. Maybe thats the idea behind this. But its only a thought. I am also interested in buying just on or two modules, which I am really interested in. I am not ready to buy the whole stuff at the moment.
  20. Great design, cool filter functionality and it loads really fast here in Austria. Good work!
  21. If you write "bce_adminDataTableSelector.length instead of ($(bce_adminDataTableSelector).length) it will return 41 instead of 0 after clicking the tab. It seems that $ before causes a problem.
  22. What I have found out is the following. In the JS-file there is the part where the additional function will be created (approx. at line 218) function addBceColumnControls() { //this timeout is a bit of a hack that should be improved in the future setTimeout(function () { if (bce_isColumnControlsAdded) { return false; } if ($(bce_adminDataTableSelector).length === 0) { return false; } // do not add controls if there is no more than 1 row if ($(bce_adminDataTableSelector + ' tbody tr').length <= 1) { return false; } //$(bce_adminDataTableSelector + ' tbody').on('click', 'input[type="checkbox"], i.InputfieldChildTableRowDeleteLink', function () { $(bce_adminDataTableSelector + ' tbody').on('click', 'input[type="checkbox"]', function () { setColumnControlStates($(this)); }); // add new controls for (var i = 0; i < bce_allowedColumnControls.length; i++) { var currentControl = bce_allowedColumnControls[i]; // skip non-existing elements if (!$(currentControl).length) { continue; } // get index of first checkbox in the first row var index = $(bce_adminDataTableSelector + ' ' + currentControl + ':eq(0)').parent().index(); // do the add $(bce_adminDataTableSelector + ' th:eq(' + index + ')').prepend($(bce_toggleControl)); // set initial checkbox states setColumnControlStates($(bce_adminDataTableSelector + ' th:eq(' + index + ') input')); // add event addColumnControlEvent(bce_adminDataTableSelector, currentControl, index); } // disable thead break to multiline $(bce_adminDataTableSelector + ' thead').css('white-space', 'nowrap'); bce_isColumnControlsAdded = true; return true; }, 1000); } There are a lot of if-statements depending on the length of a variable. It is not possible to log the variables inside this function. Fe. if I want to check the variable length of the second if statement if ($(bce_adminDataTableSelector).length === 0) { return false; } with console.log(bce_adminDataTableSelector.length); or console.log($(bce_adminDataTableSelector).length); nothing will be returned, so maybe the if-statements doesnt work in this case.
  23. Of course Here is what I have added: a = "test"; console.log(a,length); console.log(bce_fieldID,length); // add column controls (top, bottom and replace modes) $(document).on('loaded', '#' + bce_fieldID, function () { addBceColumnControls(); }); And this is what I got: As you can see the variable "bce_fieldsetID" consist of 23 letters (= ProcessPageEditChildren) So this variable of the if statement is there!!!
  24. OK I have tried the following: I have added the following script to the admin.php file <script type="text/javascript"> a = "test"; console.log(a.length); obj = bce_toggleControl; console.log(obj.length); </script> The variable a with the content "test" is only to check if the console.log works. I got the following output: As you can see the variable "a" has a length of 4 - this is correct. But the variable "bce_toggleControl" which is responsible for the checkbox doesnt return anything. I have also tried it with bce_fieldID depending on this snippet // add column controls (top, bottom and replace modes) $(document).on('loaded', '#' + bce_fieldID, function () { addBceColumnControls(); }); Same result
×
×
  • Create New...