Jump to content

Ralf

Members
  • Posts

    144
  • Joined

  • Last visited

Posts posted by Ralf

  1. @Jan Romero,

    thank you for your answer. For the Field template, do you mean the setting under the Details tab? or more specifically, this one?

    Yes, here I have already played through both options (Yes and No).

    image.png.e683b0392adfc4dca4c594db60afeb0d.png

    Furthermore, in the Details tab under Text settings - Text formatters I have played through the options with and without "HTML Entity Encoder" (also with the point from above) and unfortunately, when I save, I ALWAYS get the error message from my first post... 😢

    Do you or others have any other ideas??
    Or could you try the teams link from above to save in an installation what happens then? Then it would be at least already clarified whether it is a fundamental problem or it is only on my installation?

    Thanks in advance
    Ralf

     

    Postscript:

    Strange ... despite error message it saves me the meeting URL. And if I then click a second time on "Save", then I get this hint ...

    image.png.7cf060a8592663112d7d0e23fe08c3a9.png

    🤔 this is a bit confusing now.

  2. Hello together, have any of you ever tried to insert a Microsoft Teams meeting link into a URL field???

    A site I maintain would like to provide meeting URLs via Processwire. I have created a URL field for this but now when I insert such a Microsoft Outlook generated URL in the backend, I get this error:

    image.png.35287c388edf5604a3bcc3f97a34c26f.png


    Is this a bug or a feature? or can anyone confirm this?

    For example, a URL looks like this:
    https://teams.microsoft.com/l/meetup-join/19%3ameeting_OTY0NjAwYmUtOGIxNy11OGI5LWExMWMtNThlMmRmZGU5YTZl%40thread.v2/0?context={"Tid"%3a"36cabc20-3b53-4a0d-be6d-1fb3a94f9786"%2c"Oid"%3a"a508db2a-aff9-475e-9cf2-e51581a58320"}

    Thanks Ralf

  3. @Stefanowitsch

    thanks for your input here...

    After I worked for years with the combination "setlocale" & "strftime", I realize today through my intelephense that strftime is DEPRECATED. So I went looking for a successor and ended up here with your article.

    I like the one-liner very much! I had to adapt it only a little, because I got otherwise errors with the classes and with the format of the date...

    Therefore here my adapted version...

    echo \IntlDateFormatter::formatObject( new \DateTime(date("d.m.Y", $page->getUnformatted('date'))), "EE dd.MM.YYYY", 'de_DE' );

     

    • Like 2
  4. @thausmann I can understand your reasoning and for individual dates that is fine.

    But I have in a nonprofit association only the issue that until now just the complete events are output in a list and in addition again all dates are maintained in a Google calendar. The whole thing is always double work and leads to great joy for the people who are allowed to maintain it ...

    Therefore I wanted to replace the Google calendar and not only create an output on the homepage from the data in Processwire but also offer a *.ics file.

    With the "LAST-MODIFIED:" Specification (which I fill via the modified date of PW) the whole thing would then even still updateable!

    Concerning the problems with Outlook I agree with you, this is not quite trivial but I solved it in such a way that a) I wanted a separate calendar in Outlook explicitly and b) I simply put a small instruction on the homepage, how one must proceed with Outlook integration.

    Instructions for Outlook:
    1. mark one of the links from above (ATTENTION please don't click on the link, otherwise the calendar will be opened in Outlook as a calendar snapshot, which will NOT be updated).
    2. now click in Outlook in the menu Tools on Account Settings (from Outlook 2010 -> File - Details - Account Settings - Account Settings).
    3. click on the tab Internet Calendar on New.
    4. Paste the link into the field with a right click - Paste.
    5. Click on Add.
    6. Now enter the name of the calendar you want to display in Outlook in the Order name field and click OK.


    Recurring events would also be a great addition, but in my current case I don't need them.

     

  5. Hello all,

    I have a strange behavior here on a system.
    I have PW Dev 3.0.204 (PHP 7.4 & Chrome latest version for Windows) and the Fieldtype Decimal enabled.

    If I now create a field (default settings except for Numeric Input type = Number (HTML5)), assign it to a template and then open a page with the template the following happens:

    I enter e.g. 12345,67 (German notation or English 12345.67 doesn't matter!) into the field and then click Save. PW saves the page and the field now suddenly says only 12345,00 ....
    And in the database it also says "only" 12345.00 

    What is going wrong here? I don't remember any hooks. Have I shot something? Is it a bug?

  6. Hello all,

    I have a question about the spell checker SCAYT of CKEditor.
    How do you manage that it is always switched ON automatically and you don't have to click "Enable SCAYT" for every input field?

    I found the following post in the ckeditor forum
    https://ckeditor.com/old/forums/CKEditor-3.x/ScaytAutoStartup-CKEditor

    but if I enter the code from there in my Field "Body" under Input -> CKEditor Settings -> Custom Config Options like this
     

    config.scayt_autoStartup: true


    it doesn't work ... ?

    Now my question, how do you do it?

  7. Hello Community,

    I am currently working intensively with roles on a site (with Admin Theme Uikit) and the "problem" with the sorting of roles in the user template came up again.

    Does anyone of you know a workaround for sorting the roles in the user template alphabetically?
    By default, they are sorted according to the time of creation, which is quite annoying if you have a lot of roles that were not created in alphabetical order.

    I hope I am in the right part of the forum?

    Thanks Ralf

  8. Hello Community,

    Could someone please help me with the input field type "AsmSelect"? I have a field "select_group" (Type: Page Reference) that loads all roles as a selection. Here my customer would like to have a certain role ALWAYS preselected and be able to select additional roles.
    For this purpose, I have entered the page ID number of the role - 1053 - in the field "Default value" (under Settings specific to "asmSelect").

    However, this entry is somehow completely ignored...!

    Am I misunderstanding something in the description or is it possibly because it does not work with "roles" or is it a bug/feature?

    For your information, selecting and displaying otherwise works wonderfully.

    Thanks Ralf 

    image.png

  9. @androbey

    Thanks for the tip, I think that's exactly what I'm looking for. BUT unfortunately I can't get it to work like in the example...

    If I use the code from @Edison above, it basically works.

    But if I extend the if-line - like this

    if($page->template->name === 'user' && $page->isChanged('roles')) { // >>> APPLY ONLY TO USER TEMPLATE

    and if I can't address roles directly but have to iterate, I also tried it with a "normal" textfield e.g. like this

    if($page->template->name === 'user' && $page->isChanged('surname')) { // >>> APPLY ONLY TO USER TEMPLATE

    OR the if-statement also separately after the if-statement of the template "user"...

    if($page->template->name === 'user') { // >>> APPLY ONLY TO USER TEMPLATE
    	$changes = user()->getChanges(true);
    
    	if($page->isChanged('surname')){
    		// LOG & send email from @Edison
    	}
    }

    But with all my attempts I don't get an email anymore ?

    Is this related to the user template or have I simply implemented the code incorrectly?

  10. Sorry to reopen this old topic, but I have a question about this exact topic.

    How can I restrict the sending of emails even further and ONLY if there has been a change to the template user (see code above) AND ONLY for the roles, for example?

    In other words, please send an email if there is a change in a role (or a field xy) for a user and DO NOT send an email for all other changes for a user!

  11. Hello @bernhard,

    I'm trying to do exactly the same thing as Mr. NiceGuy and I think I understand what you are trying to tell us with this statement.

    On 5/20/2020 at 11:02 PM, bernhard said:

    You need to init() the panels again. This is usually done when the dom is first loaded. So panel-links don't work on ajax loaded markup. See this request + workaround: https://github.com/processwire/processwire-requests/issues/176

    However, I do not understand how I have to implement your workaround - from the two issues on Github - if I have in a module a "MarkupAdminDataTable" with many pw-panel links and then after editing a panel it updates the MarkupAdminDataTable automatically? Could you possibly help me here?

  12. Hello @adrian,

    I have found the problem or what setting is related to this error with the failed download.

    Namely it is because of the "access controls" for this field!
    Because if I right click on the video element in the template and then in the Modal "Edit Field" on the "Access" tab at the first question "Do you want to manage access control for this field?" on "NO" the setting is, then EVERYTHING WORKS!!! It loads the thumbnail and everything is fine!

    BUT if I set this setting to "YES" and then give all roles ONLY the page view rights - so that actually "only" the superuser is allowed to edit this field (is actually so desired here) - THEN and exactly THEN the module suddenly does NOT work or gives the error from above and NO image is loaded.

    Hmmm whether this is now an "error" of PW or of your module? Or is it not a bug but a feature?

    It's just strange that with a PDF field the whole thing works exactly the same - with the settings regarding visibility and editing only for superuser...

  13. Hello Adrian,

    you're right, I'm actually using pageFileSecure on the project .... is that a problem?
    And come to think of it, on the other installation I'm not using it and the second installation is still on an old PW version 2.7 ? so probably not quite as comparable.

    Can I give you more details to get to the bottom of the error?

  14. On 1/31/2016 at 9:22 PM, adrian said:

    Completely wrong - it does already support repeaters - you just need to specify the template of the repeater in the "Templates to search" config setting. 

    The problem with the module on your site was due to fopen not working on files at external URLs. The current version should now work on your server.

    Hello Adrian,

    I can't get this wonderful module to work on a PW page...
    I always get this error:

    PagesEditor: Fehler beim speichern von Feld "Videos" — fopen Fehler für Dateiname: /www/htdocs/xxxxxxxx/site/assets/files/-1329/hqdefault.jpg

    You have already fixed the problem here in this thread 2016 and actually it should work now.... but unfortunately it does not work for me for reasons unknown to me.
    What else can I do?

    My settings look so actually right (have two older projects running with it - without problems) ?

    809883035_Screenshot2021-12-11172746.thumb.png.9f58b7a361cc4f74d299431dd4e6946b.png

     

    Thanks Ralf

  15. On 11/9/2015 at 11:25 AM, horst said:

    I'm using it with insertBefore the image field and it works fine, regardless of PageStatus.

    I also have added two lines to the AdminCustomFiles/AdminThemeXXXXX.css files to move it to the right:

    
    #wrap_hook_sort_images { float: right; }
    #wrap_hook_sort_images:after { clear: both; }

     

    @horst

    are you still using this hook with the latest PW version?
    I'm trying to display the button on the right like you, but it's just not displayed on the right. ?

    I must confess I do not use the module "AdminCustomFiles" now however it should go with this Hook nevertheless also?

    $wire->addHookAfter('AdminTheme::getExtraMarkup', function (HookEvent $event) {
    	$parts = $event->return;
    	$parts['head'] .= '<style type="text/css">
    		#hook_sort_images { float: right; }
    		#hook_sort_images:after { clear: both; }
    	</style>';
    	$event->return = $parts;
    });

    But it does not currently...

  16. On 1/25/2021 at 11:02 AM, LostKobrakai said:

    The HTML5 number input should handle that already.

    Yes with the HTML5 input type the issue of a comma or dot for the "decimal places" is solved.

    However, I then have the issue in the admin area that large values are as good as no longer readable, because I can now no longer capture points.

    grossprice.png.e5a1c9c45d384b958744fd4649de3483.png

    With the input type text I can enter commas and dots, but as bernhard has already explained in this issue report, PW then stores no value in the DB.
    And now?

  17. Hello all,

    I am just thinking about building a small accounting tool with processwire for my club. Background, I'm tired of doing everything with excel and constantly picking out the accounts and co.

    The whole thing should be nothing special, but I have a question for you experts that is bothering me right now.

    I need the possibility to specify several lines (debit to credit) per "posting". E.g. for different tax rates in an invoice or for different areas on which I want to distribute the booking.
    My question now, what would be the "easiest" or best way to solve this?
    With my current knowledge, I would probably solve it with repeaters, but is that the easiest/best solution?

    The longer I think about it, it is probably the same as with an invoice tool, there you also need partly several positions. Maybe one or the other of you has already solved this problem for yourself?

    I look forward to your ideas / suggestions.

     

    @bernhard on the search for solutions for this contribution, I also became aware of your tool RockPrice, are you there with the evaluation after tax rates already progressed? this would of course also be a requirement of mine for the advance return for sales tax ("Umsatzsteuervoranmeldung")...

     

     

  18. On 2/21/2021 at 12:14 PM, dotnetic said:

    Your example pdf.php looks absolutely fine. Please try to save the PDF file via $pdf->save() or $pdf->download() and then take a look if the PDF is generated.

    @dotnetic

    I have tried and the result is that 
    $pdf->show() => does not work
    $pdf->download() => does not work
    $pdf->save() => works, puts the correctly generated PDF on the server

    so it seems to be rather a problem with the output method "markup regions" which I use, respectively that I still have a wrong code structure here or?

     

    On 2/22/2021 at 8:53 AM, bernhard said:

    I'd suggest the following:

    First, disable markup regions to confirm that it works when markup regions are disabled. Then enable markup regions and to this:

    
    // replace this
    include 'pdf.php';
    
    // by that:
    echo "include PDF here";

    Then load your page that should create the PDF and inspect the HTML (right click -> show sourcecode). What does the source code look like?

    Thanks bernhard, I went through the points one by one
    1. I deactivate markup regions in config.php => output in browser works now! (However, the design no longer fits)

    2a. I enable markup regions again and test the change from above (I'm not quite sure now if I should really just put the "echo" in the "case 'pdf': "? I do it, and it outputs my design (up to the header, then a white body, and the footer again at the bottom). The only thing it outputs to me at the bottom of the pw-region-debug line is "No regions" and the time of generation, nothing else.

    2b. I interpret your echo to mean that I should paste the code from my pdf.php file here instead of the include command. Unfortunately the result is again the same as above with dotnetic's suggestion. The only code that works to create a PDF is save().

    3. "... what does the source code look like?" => Unfortunately there is no real HTML code to look at or parse (except for the one in point 2a, but there it doesn't process anything....) so I can't share anything.

    Sorry if I'm a bit clumsy here.... I am therefore very grateful for any help.

  19. 2 hours ago, bernhard said:

    I don't understand why you want to use markup regions for rendering HTML of the pdf??

    you misunderstood me then, i don't want to use markup regions to render html.
    I just thought that because I use the template "Regular" and this is based on markup regions, it is probably because of that? Because the same code works for another project where I have chosen a direct output. See in this thread on page 2.

    I will shown below my actual structure....

     

    2 hours ago, bernhard said:

    Are you trying to render a regular page HTML as PDF??

    actual in my output-pdf.php File I have only this code

    $pdf = $modules->get('RockPdf');
    $pdf->set('SetHeader', 'This is my header text');
    $pdf->write('Hello World ' . date('H:i:s'));
    $pdf->write('<!-- my custom comment -->');
    // Output
    $pdf->show(); // to directly show your file in the browser

    so I think if I understood the question correctly, the answer is no?

     

    ok maybe it's easier if i just post my code to show what i'm trying to do


     

    Spoiler

     

    management.php
    (with activated URL segments in the backend to the "management.php" template)

    
    <?
    // Login protection for this page by LoginRegisterPro
    if($user->isLoggedin() != true) $session->redirect($config->urls->root.'user/', false);
    
    // Checking the authorization to display the administration page
    if($user->hasRole("editor") != true) $session->redirect($config->urls->root, false);
    
    if(strlen($input->urlSegment2)) throw new Wire404Exception();
    
    switch($input->urlSegment1) {
    	case '':
    
    		// Output to the content-body ?>
    		<div id='content-body'>
    
    
    			<? // The following code will later control the content that will appear on the PDF ?>
    
    			Please select an entry:<br>
    			<form class="uk-form-stacked" action="<?=$page->url;?>pdf/" target='_new' method="post">
    				<input type="hidden" name="check" value="PDFdruck">
    				<div class="uk-margin">
    					<div class="uk-form-controls">
    						<select class="uk-select" id="form-stacked-select" name="assignment"><?
    							foreach($pages->find("template=lesson, date_from<=today, sort=-date_from, sort=-date_time") as $lessonID){
    								echo"<option value='". $lessonID->id ."'>". $lessonID->date_from ." ". $lessonID->date_time ." clock</option>";
    							} ?>
    						</select>
    					</div>
    				</div>
    				<input type="submit" class="uk-button uk-button-secondary uk-button-small" value="Output status as PDF">
    			</form>
    
    		</div>
    		<!-- content-body -->
    
    		<?
    
    	break;
    
    	case 'pdf':
    		// Display PDF in Browser
    		include 'pdf.php';
    
    	break;
    
    	default:
    		// Anything else? Throw a 404
    		throw new Wire404Exception();
    }
    
    ?>

     

    actual for testing (but even that unfortunately does not work...)

    pdf.php

    
    <?
    /**
     * Outputs a PDF for independent printing
     * Version 2021-02-xx
     */
    
    
    // Code for the creation of a PDF
    $pdf = $modules->get('RockPdf');
    $pdf->set('SetHeader', 'This is my header text');
    
    $pdf->write('Hello World ' . date('H:i:s'));
    $pdf->write('<!-- my custom comment -->');
    
    // Output
    $pdf->show(); // to directly show your file in the browser
    
    ?>

    And that's it, with these specifications come the errors from above....

     

     

×
×
  • Create New...