Jump to content

sandimilohanic

Members
  • Posts

    8
  • Joined

  • Last visited

Posts posted by sandimilohanic

  1. Hi All,

    Does anyone know how to implement (configure dashboard chart panel) the chart.js bar like the picture below ? Thanks a lot!

    I need to show in chart this data, example for one month.

    Car1
        TotalDrove: 5
        SuccesDrove: 3
        UnsuccessDrove: 2

    Car2
        TotalDrove: 10
        SuccesDrove: 8
        UnsuccessDrove: 2

     

    KNnGi.png

  2. Hi All, I'm using FormBuilder Pro. Can I set an administrator email to be set dynamically from a page field? 

    I want to set up an email on a page, and if there is, take it as an administrator email.

    I tried to add a hook, but it's not working...

    Thanks all.

    $forms->addHookBefore('FormBuilderProcessor::renderReady', function($e) {
        $processor = $e->object; // FormBuilderProcessor instance
        $form = $e->arguments(0); // retrieve argument by number (zero based)
        $form = $e->arguments('form'); // OR retrieve argument by name
        $processor->emailTo = $e->wire('page')->admin_email;
      });
  3. 15 hours ago, adrian said:

    Hi @sandimilohanic - unfortunately that's just not possible with the way this module works. Restricting to one branch in PW is relatively simple (what this module does), but restricting to more than one requires a completely different approach which is a little more fiddly.

    Perhaps you can build exactly what you need (without the need to be flexible like a publicly released module has to be). This gist might be a helpful starting point: https://gist.github.com/adrianbj/6fd1b770d9ce7a7252b6

    Hi @adrian - big thanks for the reply and direction for further development.

    • Like 1
  4. Hi everyone.

    I have a need for a specific user to add rights to multiple branches (below in the picture with the user selected two branches: branch1, branch2). Is this possible, and what is the best way to do it, and does the current modules need to be modified a lot?

    user_branch_123.jpg

  5. In administration, inside the WirePdf configuration, when I set Mode: "s"  then I get a an exception:

    mPDF Error - cannot find TTF TrueType font file - /.../site/templates/fonts/DejaVuSans.ttf": invalid checksum 26f399eb8 table: FFTM (expected 6f399eb8)

    Can i help me why there is a exception?

  6. Greeting,

    I need help to use a font 'dejavusans'? I have problems with the display Croatian letters š, đ, č, ć, ž.

    I use

    $pdf = $modules->get('WirePDF');

    but I can not set the font 'dejavusans'

    <?php
    
    $pdf = $modules->get('WirePDF');
    
    $mpdf = $pdf->mpdf;
    
    $pdfPath = $config->paths->files . $page->id . "/" . $page->title.'.pdf';
    $stylesheet = file_get_contents($config->paths->templates.'/pages2pdf/styles.css');
    
    $wireSendOptions = array('exit' => false, 'forceDownload' => false, 'downloadFilename' => '');
    
    $mpdf->WriteHTML($stylesheet,1);
    
    $html = "";
    $html .= "<html lang='hr'><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /></head><body>";
    $html .= '<table border=0>';
    $html .= 'text example š đ č ć ž';
    $html .= "</body></html>";
    $mpdf->WriteHTML($html);
    
    $mpdf->Output($pdfPath, 'F');
    wireSendFile($pdfPath, $wireSendOptions );
    ?>

     

×
×
  • Create New...