Jump to content

August

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

4 Neutral

About August

  • Rank
    Newbie

Recent Profile Visitors

240 profile views
  1. <?php// include_once("./browse.php"); /* if I uncomment these include, the items (cities) are not shown ..*/?> <?php echo region('mainHeader'); ?> <div class=''> <div id='content' class=''> <?php echo region('content'); ?> </div> <div id='sidebar' class=''> <?php echo region('sidebarHeader'); include("./includes/search-form.php"); echo region('sidebar'); include("./includes/sidebar-links.php"); ?> </div> </div> Hi elabx, of course, I checked the files for the pw-namespace. Thank you. In the _main.php I mix: <nav id='masthead-navbar' class="uk-navbar-container" uk-navbar> <div class="uk-navbar-center uk-visible@m"> <?=ukNavbarNav($home->and($home->children), [ 'dropdown' => [ 'basic-page', 'categories' ] ])?> </div> </nav> together with <?php// include_once("./browse.php"); /* if I uncomment these snippet, the items (cities) are not shown */?> <?php echo region('mainHeader'); ?> <div class=''> <div id='content' class=''> <?php echo region('content'); ?> </div> <div id='sidebar' class=''> <?php echo region('sidebarHeader'); include("./includes/search-form.php"); echo region('sidebar'); include("./includes/sidebar-links.php"); ?> </div> </div>
  2. I play around with it a bit because I think it's possible. So one Site -Setup for Regular and Skyscraper (from https://github.com/dadish/pw-skyscrapers-profile). After that I merged some things. On the 3rd Site I put in everything, adjusted the pages, especially the _init.php to include the _func.php, search etc. After that, the regular Profile is working fine, the search-forms are shown and a few additional cities are available (just Testing). The first try to list all available cities ends with an error on count, which I solved like here: Now I get the following Errors, I would be very happy if you could help me on the jumps, getting further ... cities-list (template) looks like that: <?php foreach($items as $item): ?> <li><a href='<?=$item->url?>'><?=$item->title?></a> <small class='uk-text-muted'><?=$item->numChildren?></small></li> <?php endforeach; ?> A Tick on List All: And code within other templates - like in the following snippet, works fine .. <p>Test: <?php $prefix = $itemList = ''; foreach(page()->set_test as $item) { $itemList .= $prefix . $item->title; $prefix = ', '; } echo $itemList; /* getting id - only <?=page()->set_test?> */ ?> </p> ProcessWire 3.0.123 in usage.. Thanks on any hint!
  3. Has anyone already successfully integrated mpdf QrCode Library? I am currently testing bernahrds solution RockPDF including mpdf. I think it would be optimal, but I have problems with some basic things. In this context, what does a proper implementation look like? Many thanks in advance
  4. Hey Guys, I have one more question, in the hope of solving PDF creation problems. How would you create a download/store -link for a PDF-File from Page using RockPDF/mpdf library on action (may like pages2pdf) ?
  5. Hey Guys, thanks a lot for your replies. Back after work, I have just checked your answers and I'm closely suprised. It is the indication of the absolute path that the image outputs immediately. Bernhards snippet - an excerpt, I took again. Then I only changed one line as in the code-snippet below, that solved the problem. . $mpdf->WriteHTML('<div>Showing image ' . $img->filename . '</div>'); As in the Screenshot beside, the seond Path(last line) is the right one. Thank you bernhard, horst and jens - your all commitment is just great!
  6. Hi bernhard, unfortunately, no. Thank you. The reason for this could be the URL path, the image is only accessible via the complete path (localhost). This adress in the browser does not work: "file:///www/home/in..."
  7. Hi again, after trying pages2PDF, RockPDF and mpdf I'm not sure which of them I should use. Of course, there is also wirePDF. I merged mpdf with rockPDF, add a footer and a page in Landscape and that works, like in the code-snippet below but be am I on the right way? After that I tried a couple of times rendering an image. Nothing happend, the same with Pages2PDF too. I also copied an Image-URL within processwire and tried further getting an Image within the PDF-Document, but it still display only the red marked placeholder. I simply would like create an PDF on click from some Pages including the Images. Are there special requirements on Debian 10 with Apache and php 7.3 using Processwire 3.0.123.? Is there a guide that I didn't found? Is somebody out there who has a similar issue solved and would you be so kind to explain? $pdf = $modules->get('RockPdf'); $mpdf = $pdf->mpdf; # $mpdf->showImageErrors = true; $pdf->set('SetHeader', 'header text'); $mpdf->AddPage('L'); # $mpdf->Image(urlencode('site/assets/files/1845/image-2.275x200.jpg'), 0, 0, 210, 297, 'jpg', '', true, false); $pdf->set('SetFooter', ' <table width="100%"> <tr> <td width="33%">{DATE j.m.Y}</td> <td width="33%" align="center">{PAGENO}/{nbpg}</td> <td width="33%" style="text-align: right;">whatever</td> </tr> </table>'); $pdf->show(); // generate pdf
  8. Hi elabx, thank you for spending time on it. This way I tried before, but without success. The Question, maybe a bit more precise: I searched for the existing entries, such as the displayed "data" column (image of the table), where the pages of the "Group" field are assigned, just to get the title once from the Field "field_group".
  9. Thank you Ryan for this great open-source Software and - of course, hello to the processwire-community! I follow some guides here in the Pws forum and have many great impressions of you. Firstly I started on www.pwtuts.com because it was just convenient to me, indeed. Here I using url-segments-and-the-page-reference-field. Building things up in order to, gave me the reason to ask now for a way, that uses the full processwire API - without amongst things . . . So, the point here is a code snippet for rendering links in a navigation, depending only on the given IDs (found no better way getting the IDS by col "data") In the snippet below, which is not part of the tutorial on "pwtuts.com", is my solution getting the relations succesfully: <?php // get entries depends on having an item in it $rows = $db->query("SELECT DISTINCT data FROM field_group WHERE 1"); while ($row = $rows->fetch_assoc()): $string_rows = $row['data']; $data_ip = preg_split('/\s+/', $string_rows); foreach ($data_ip as $real): $navItem = $pages->get($real); $focusGroup = ( $titleProp == $navItem->title || $navItem->name == $input->urlSegment1 ) ? " active" : ""; ?> <li class="nav-item"> <a class="nav-link<?php echo " " . $navItem->name . $focusGroup; ?>" href="<?php echo $homepage->url."example/{$navItem->name}/"; ?>"><?php echo $navItem->title; ?></a> </li> <?php endforeach; ?> <?php endwhile; ?> Sure, its not really nice, but it works. Does anyone have a tip for optimization? Thanks for Suggestions.
×
×
  • Create New...