Jump to content

Frank Schneider

Members
  • Posts

    32
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Frank Schneider's Achievements

Jr. Member

Jr. Member (3/6)

1

Reputation

  1. Danke das hat funktioniert, der Zähler der Authlogs ändert sich nicht ist das Normal?
  2. Meine Seite ist Authlogs (127000 Einträge) mit dem template authlogs. Darin werden Daten gespeichert Authlog mit dem template authlog. Mein Problem ist, dass meine Rest API langsam reagiert, und ich vermute dass die Datensätze zu groß sind. Jetzt will ich alte Datensätze löschen, bei Processwire kann ich das aber nicht so einfach. Ich müsste jeden anklicken, das dauert mir zu lange. Also muss es ein weg geben diese Blockweise oder per Befehl oder tool z löschen. Gruß Frank
  3. I have a table (Authlogs) where the check ins are stored. There are now 130,000 data records there. Wiw can I delete the old ones by date older than 2020? without manually clicking on each record!
  4. from one day to the next (overnight) changes to the PHP file are no longer accepted in the browser. No matter what I change, I update with F5, the view remains the same. None of my changes work. Not until I delete the FileCompiler folder in the catch. But then again the same. Anyone have any advice?
  5. i update my PHP from 7.4 to 8.0 and now i get an error while printing pdf with mPdf -> mPDF error: No font or default font set! i try set define('_MPDF_TTFONTPATH', __DIR__ . '/ttfonts'); in config_fonts.php but nothing change. Did anyone know how to fix this error?
  6. i add this and no changes, $_FILES is empty
  7. I have a Processwire application. In it I have two areas company and their employees. I insert an image in Employees and upload it, it works fine so far, now I do the same in the company and want to use it as a logo, it doesn't work there. When I click save, the $_files field is empty, but not for the employee. So exactly the same as with the employee does not work, same fields, same code. The field is defined in fields as Image and assigned to the template I've searched the whole internet but can't find the reason. my code: $form_fields = array( ..... 'foto' => array('type' => 'file', 'required' => true), ); // --- WireUpload settings --- $upload_path = $config->paths->assets . "files/.tmp_uploads/"; // tmp upload folder $file_extensions = array('jpg', 'jpeg', 'gif', 'png'); $max_files = 1; $max_upload_size = 1*1024*1024; // make sure PHP's upload and post max size is also set to a reasonable size $overwrite = false; $update_page = ($page->url == $pages->get("/firmenverwaltung/edit/")->url) ? $pages->get("id=".(int)$input->urlSegment0) : null; $file_field = "foto"; //HTML <div class="col-lg-6"> <div class="form-group"> <label class="form-control-label">Logo: <?php if ($form_fields['foto']['required']) { ?><span class="tx-danger">*</span><?php } ?></label> <div class="<?php if ($errors["foto"]) { echo "parsley-error"; } ?> custom-file"> <input id="foto" type="file" name="foto[]"> </div> <?php showError($errors, "foto"); ?> </div> <?php if ($firma) { $foto = null; foreach ($firma->foto as $image) { $foto = $image->width(250); break; } if ($foto != null) { echo "<img src='".$foto->url."' />"; } } ?> </div> //Save if($input->post->action == 'send') { // first validate the CSRF token to check if it is a valid request if(!$session->CSRF->hasValidToken()){$errors['csrf'] = "Form submit was not valid, please try again."; } //Look for required fields and make sure they have a value foreach($required_fields as $req) { //print_r($_FILES); //die; // required file upload field if($form_fields[$req]['type'] == 'file'){if(empty($_FILES[$req]['name'][0])){$errors[$req] = "Wählen Sie Dateien zum Hochladen aus.."; } } else if($form_fields[$req]['type'] == 'checkbox'){if($form_fields[$req]['value'] == 0){$errors[$req] = "field necessary.";} // erforderliche Textfelder } else if($form_fields[$req]['type'] == 'text' || $form_fields[$req]['type'] == 'textarea' || $form_fields[$req]['type'] == 'email') { if(!strlen($form_fields[$req]['value'])){$errors[$req] = "Feld notwendig."; } // reqired email fields if($form_fields[$req]['type'] == 'email') { if($form_fields[$req]['value'] != $input->post->$req){$errors[$req] = "Bitte eine gültige E-Mail Adresse angeben.";} } } }
  8. Thanks in advance for the help. But I'm looking for an editor where you don't have to edit the HTML code. I'm looking for an editor like a CMS.
  9. Is there a front end editor or something similar for pw. This html syntax is not my thing. So it's easier to edit.
  10. I've also tried the parameters I, D and F the same. It must be an attitude, but where. WirePDF I installed it via Modules-> Site-> New-> Add Module Manualy
  11. i create a pdf file with WirePdf on PW andand want it download to browser downloads folder. $header = ''; $footer = $pages->get("/einstellungen/")->company_name; $filename = 'Ausgabe.pdf'; error_reporting(0); // E_ALL=Melde alle PHP-Fehler 0=deaktiviert ob_start(); ob_clean(); $pdf = $modules->get('WirePDF'); $pdf->pageFormat = 'A4'; $pdf->leftMargin = 20; $pdf->rightMargin = 20; $pdf->topMargin = 20; $pdf->bottomMargin = 20; $mpdf = $pdf->mpdf; $mpdf->SetHTMLHeader($header); $mpdf->SetHTMLFooter($footer); $mpdf->WriteHTML($content); ob_end_clean(); $mpdf->Output($filename, 'F'); $mpdf->Output($filename, 'F'); works and create in template folder. $mpdf->Output(); not working and the browser shows, annot load file. Know anyone the reason. Ist it a parameter in PW?
×
×
  • Create New...