Jump to content

tires

Members
  • Posts

    258
  • Joined

  • Last visited

Everything posted by tires

  1. I solved this warning (PHP 8.4, ProcessWire 3.0.255, MarkupSimpleNavigation 1.3.7😞 Warning: Undefined array key 1 in /homepages/site/assets/cache/FileCompiler/site/modules/MarkupSimpleNavigation/MarkupSimpleNavigation.module on line 313 With this change in MarkupSimpleNavigation.module on line 312 - 316: if($this->iteration == 1) { $out .= "\n" . ($this->outer_tpl[1] ?? ''); } else if(count($children)) { $out .= "\n" . ($this->inner_tpl[1] ?? '') . "\n"; }
  2. This is the source code at the bottom of the frontend page: <script src="/site/assets/aiom/js_418c8cd8c559810255e3250d05446d9c.js" async defer></script><script>var emo = emo || {}; emo.key = '.C1vql2a5RcPeJomwFrx7puhYLKgINntH0s9WZbAMiyDOXjE6TVS8GkB_1111Qfz';</script><link rel="stylesheet" href="/site/assets/aiom/css_6b89ca87ab7d885667358c0a046f5836.css"><link rel="stylesheet" href="/site/assets/aiom/css_1111a5003457ed863af5db2e9421e88.css"><script type="text/javascript" src="/site/assets/aiom/js_b363b432e18b7d69fccac9f9ef11116d.js"></script><div id="adminbar" data-adminbar='{"classes":{"link--modal":"adminbar__link--modal"},"urls":{"modules":"\/wire\/modules\/"}}' class="adminbar adminbar--auto-padding"><ul class="adminbar__list adminbar__list--left"><li class="adminbar__list-item adminbar__list-item--item-logo"><a class="adminbar__logo" href="/pwbackend/"><img class="adminbar__logo-img" src="/wire/modules/AdminTheme/AdminThemeUikit/uikit-pw/images/pw-mark.png" alt="" /></a></li><li class="adminbar__list-item adminbar__list-item--item-browse adminbar__list-item--active"><a class="adminbar__link adminbar__link--item-browse" href="#"><svg class="adminbar__icon" aria-hidden="true" width="16" height="16" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 960q-152-236-381-353 61 104 61 225 0 185-131.5 316.5t-316.5 131.5-316.5-131.5-131.5-316.5q0-121 61-225-229 117-381 353 133 205 333.5 326.5t434.5 121.5 434.5-121.5 333.5-326.5zm-720-384q0-20-14-34t-34-14q-125 0-214.5 89.5t-89.5 214.5q0 20 14 34t34 14 34-14 14-34q0-86 61-147t147-61q20 0 34-14t14-34zm848 384q0 34-20 69-140 230-376.5 368.5t-499.5 138.5-499.5-139-376.5-368q-20-35-20-69t20-69q140-229 376.5-368t499.5-139 499.5 139 376.5 368q20 35 20 69z" fill="#fff"/></svg>Ansicht</a></li><li class="adminbar__list-item adminbar__list-item--item-edit"><a class="adminbar__link adminbar__link--item-edit adminbar__link--modal" href="/pwbackend/page/edit/?id=8305&modal=1&ab_modal=1"><svg class="adminbar__icon" aria-hidden="true" width="16" height="16" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z" fill="#fff"/></svg>Bearbeiten</a></li><li class="adminbar__list-item adminbar__list-item--item-new"><a class="adminbar__link adminbar__link--item-new adminbar__link--modal" href="/pwbackend/page/add/?parent_id=8305&modal=1&ab_modal=1"><svg class="adminbar__icon" aria-hidden="true" width="16" height="16" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1344 960v-128q0-26-19-45t-45-19h-256v-256q0-26-19-45t-45-19h-128q-26 0-45 19t-19 45v256h-256q-26 0-45 19t-19 45v128q0 26 19 45t45 19h256v256q0 26 19 45t45 19h128q26 0 45-19t19-45v-256h256q26 0 45-19t19-45zm320-64q0 209-103 385.5t-279.5 279.5-385.5 103-385.5-103-279.5-279.5-103-385.5 103-385.5 279.5-279.5 385.5-103 385.5 103 279.5 279.5 103 385.5z" fill="#fff"/></svg>Neu </a></li></ul><ul class="adminbar__list adminbar__list--right"><li class="adminbar__list-item adminbar__list-item--item-admin"><a class="adminbar__link adminbar__link--item-admin" href="/pwbackend/page/?open=8305"><svg class="adminbar__icon" aria-hidden="true" width="16" height="16" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1152 896q0-106-75-181t-181-75-181 75-75 181 75 181 181 75 181-75 75-181zm512-109v222q0 12-8 23t-20 13l-185 28q-19 54-39 91 35 50 107 138 10 12 10 25t-9 23q-27 37-99 108t-94 71q-12 0-26-9l-138-108q-44 23-91 38-16 136-29 186-7 28-36 28h-222q-14 0-24.5-8.5t-11.5-21.5l-28-184q-49-16-90-37l-141 107q-10 9-25 9-14 0-25-11-126-114-165-168-7-10-7-23 0-12 8-23 15-21 51-66.5t54-70.5q-27-50-41-99l-183-27q-13-2-21-12.5t-8-23.5v-222q0-12 8-23t19-13l186-28q14-46 39-92-40-57-107-138-10-12-10-24 0-10 9-23 26-36 98.5-107.5t94.5-71.5q13 0 26 10l138 107q44-23 91-38 16-136 29-186 7-28 36-28h222q14 0 24.5 8.5t11.5 21.5l28 184q49 16 90 37l142-107q9-9 24-9 13 0 25 10 129 119 165 170 7 8 7 22 0 12-8 23-15 21-51 66.5t-54 70.5q26 50 41 98l183 28q13 2 21 12.5t8 23.5z" fill="#fff"/></svg>Backend</a></li><li class="adminbar__list-item adminbar__list-item--item-logout"><span class="adminbar__html adminbar__html--item-logout"><form class="adminbar__form" action="/pwbackend/login/logout/"><button class="adminbar__button" type="submit"><svg class="adminbar__icon" aria-hidden="true" width="16" height="16" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1664 896q0 156-61 298t-164 245-245 164-298 61-298-61-245-164-164-245-61-298q0-182 80.5-343t226.5-270q43-32 95.5-25t83.5 50q32 42 24.5 94.5t-49.5 84.5q-98 74-151.5 181t-53.5 228q0 104 40.5 198.5t109.5 163.5 163.5 109.5 198.5 40.5 198.5-40.5 163.5-109.5 109.5-163.5 40.5-198.5q0-121-53.5-228t-151.5-181q-42-32-49.5-84.5t24.5-94.5q31-43 84-50t95 25q146 109 226.5 270t80.5 343zm-640-768v640q0 52-38 90t-90 38-90-38-38-90v-640q0-52 38-90t90-38 90 38 38 90z" fill="#fff"/></svg>Ausloggen</button></form></span></li></ul></div></body></html> <!-- Generated: Fri, 15 May 2026 16:43:44 +0200 // Powered by AIOM+ v4.1.0 --> And this is what the top of the frontend looks like while you're logged out: When I click "Empty cache," the frontend looks normal again and the admin bar disappears.
  3. I've noticed some strange behavior on two ProcessWire & AIOM+ installations now. When I make a change in the module and click "Save," the backend page apparently gets cached. When I open the frontend in a different browser, the admin bar appears. When I click "Empty Cache," the admin bar disappears again. But with every change in AIOM+, it reappears in the frontend. I’ve only made the default settings and haven’t changed anything in the templates themselves ...
  4. This code creates a grayscale image as png: $project->img->pim2Load('gray2_')->grayscale()->pimSave(); This code saves an jpg in the assets directory but the file is not displayed in the image field of the page: $project->img->pim2Load('myjpg', array('outputFormat'=>'jpg'))->pimSave(); or: $project->img->pim2Load('myjpg')->setOutputFormat('jpg')->pimSave()->url; ( ProcessWire 3.0.255, PHP 7.3.33)
  5. Is there now a solution in Processwire that does not require additional modules? Unfortunately, this code does not work, although one might assume that it would: <?=$project->myimg->size(580,580,[ 'quality' => 90, 'format' => 'jpg','cropping' => 'north' ])->url?>
  6. Thank you very much! It was really quite easy with ProcessAdminCustomPages and a foreach loop! $logentries = $log->getEntries("my-email-log", ["limit"=>"20"]); echo "<ul>"; foreach ($logentries as $logentry) { echo "<li>"; echo $logentry["user"]; echo " <br> "; echo $logentry["date"]; echo " <br> "; echo $logentry["url"]; echo " <br> "; echo $logentry["text"]; echo "</li>"; } echo "</ul>"; With chart.js, I was even able to implement a diagram.
  7. I have a log file for sent emails. The log file is structured as follows: 2025-11-24 18:00:37 guest /contact/ Email request sent Is it possible to display this log in the backend on a separate page and perhaps even as a diagram? Or is there a module for this? I would be grateful for any advice!
  8. Is there a solution in the meantime for ckeditor and manual wordbreak like: <wbr> &shy; I have the feeling that things always get complicated when it comes to CKEditor and special configurations.
  9. @virtualgadjo Thank you very much for your reply. The “select” fields you mentioned do not appear in my image field when I add them as custom fields. Apparently, not all fields can be used.
  10. How can I use a radio button with multiple options (as shown below in the image under “license”) in an image field? Is this also possible with a select field? Which fields can I use?
  11. I disagree. As a designer and developer, I think the new design is much more professional, contemporary, and appropriate. Compare it to the Dupal or WordPress website. Do you think they are better positioned? What information do you think is missing for customers?
  12. Thank you!!! So you just have to put the code at the end of the htaccess file? Is that the only trick?
  13. tires

    SeoMaestro

    In my backend the following error is displayed: Error upgrading module (SeoMaestro): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db123456_1.field_SEO' doesn't exist Is this a known issue or is there a problem in my templates or fields?
  14. Thank you for your answer. I had already seen the module. Nevertheless, I would prefer a simple solution directly via the htaccess file. If there is a solution?
  15. I need a very simple htpasswd protection for my staging installation. So I inserted these lines into the processwire .htaccess at the very beginning: AuthType Basic AuthName "protected" AuthUserFile /usr/home/dev/.htpasswd Require valid-user The file .htpasswd contains the following code (i.e. admin / admin): admin:$2y$10$yuBaR6xKApq7F1BmOXyzbeEz3kQBpuI5p4TJCvRD4VXP2MRmIoBFy For some reason i get a 404 after login.
  16. Ok, I have now found out that you can create a Consent banner with button, with the attributes: class="require-consent" data-src="https://www.youtube-nocookie.com/embed/abcd" data-category="external_media" data-ask-consent="1". This also works wonderfully, BUT only for 1 element. I have a YouTube video (iframe) and a google map (div) on my website. Unfortunately, a banner with a consent button is only displayed for the first element. Only when I comment out the iframe, the banner for the div #standortmap is displayed. echo '<iframe class="require-consent" data-src="https://www.youtube-nocookie.com/embed/123" data-category="external_media" data-ask-consent="1" data-ask-consent-message="Externere Inhalte von google.com und youtube.com werden aus Datenschutz&shy;gründen erst nach expliziter Zustimmung geladen." data-ask-consent-button-label="Video laden" id="youtube-video" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen width="100%" height="100%" ></iframe> <br><br>'; echo '<div id="standortmap" data-lat="11.123" data-lng="1.123" data-zoom="12" data-category="external_media" data-ask-consent="1" data-ask-consent-message="Externere Inhalte von google.com und youtube.com werden aus Datenschutz&shy;gründen erst nach expliziter Zustimmung geladen." data-ask-consent-button-label="Karte laden" style="height: 300px;"></div>'; Is this an error? Or can the module only display one banner at a time?
  17. I embed youtube videos and google maps into my site in various ways. To make the site privacy compliant, I would like to display an overlay above each video and map with a button “Load content” (loads the content once) and “Always load content” (sets the corresponding privacy wire cookie an loads the contents always). Is there already a solution for this? What is the best way to do this?
  18. Thanks a lot Gideon!
  19. How can I make the trash in page tree visible for certain user roles and give them the option to restore pages from the trash?
  20. Thank you for your answer. I'll give it a try then.
  21. Are there any disadvantages or would you advise against duplicating pages that contain matrix repeater content? Can this cause problems or is it safe to do so?
  22. Is there a way to automatically create the title and the name of a page from the content of two fields? I have the problem that the editor usually has to enter the same thing in the title field as in these two fields. What is the easiest way? Or is there perhaps a module?
  23. It seems to continue there! Great!!!
  24. I have just realized that the module is still running with my new mailboxes. The problem was that I have several mailboxes that I retrieve. And since there is only one field for the password, this must be the same for all mailboxes ...
  25. With my new mail server, this module no longer works for me either. That's a real shame, because it's a great and helpful module. I assume that you only have to replace the flourish components with the imap_open function. Most of the code should remain untouched. I also lack the technical expertise. The AI suggests the following code: <?php /** * ProcessEmailToPage.module * Module to fetch emails from a mailbox and convert them into ProcessWire pages */ class ProcessEmailToPage extends WireData implements Module { public $moduleHash; public $emailHost; public $emailPort; public $emailPassword; public $emailType; public $forceSecure = false; public $categoryData; // Module info public static function getModuleInfo() { return array( 'title' => 'Process Email to Page', 'version' => 1, 'summary' => 'Fetches emails from a mailbox and creates pages from the messages.', 'author' => 'Your Name', 'requires' => 'ProcessWire 3.x' ); } public function init() { // Set the hash for security to ensure only authorized requests are processed $this->moduleHash = wire('config')->hash; // Example category data (JSON) $this->categoryData = '{"categories": [{"emailAddress": "your-email@example.com"}]}'; // Set connection parameters $this->emailHost = 'imap.example.com'; // Example IMAP server $this->emailPort = 993; // SSL port $this->emailPassword = 'your-password'; // Your email password $this->emailType = 'imap'; // Protocol type (imap/pop3) } public function execute() { // Process emails if the correct hash is provided if(wire('input')->get('hash') && wire('input')->get('hash') == $this->moduleHash) { // Decode category data from JSON into an object $categories = json_decode($this->categoryData); // Iterate through each email category foreach($categories as $category) { // Set up email connection $this->emailType = empty($this->emailType) ? 'imap' : strtolower($this->emailType); // Default to 'imap' $server = '{' . $this->emailHost . ':' . ($this->emailPort ? $this->emailPort : 993) . '/imap/ssl}INBOX'; // IMAP server with SSL $username = $category->emailAddress; $password = $this->emailPassword; // Connect to the mail server using imap_open $mailbox = imap_open($server, $username, $password); if (!$mailbox) { echo "Error connecting to the mail server: " . imap_last_error(); continue; } // Search for all emails (can be adjusted to 'UNSEEN' for unread emails) $emails = imap_search($mailbox, 'ALL'); if ($emails) { rsort($emails); // Sort emails with the newest first $messages = []; // Iterate through each email ID foreach($emails as $email_id) { // Fetch the email header information $overview = imap_fetch_overview($mailbox, $email_id, 0); $messages[] = $overview[0]; // Store header information // Optional: Output more header fields such as "From", "Subject", "Date" // echo "Subject: " . $overview[0]->subject . "\n"; // echo "From: " . $overview[0]->from . "\n"; // echo "Date: " . $overview[0]->date . "\n"; } // Now process the emails, for example, create a page for each email foreach ($messages as $message) { $page = $pages->add('email'); $page->title = $message->subject; $page->body = "Email from: " . $message->from . " on " . $message->date; $page->save(); } // Delete processed emails from the server foreach ($emails as $email_id) { imap_delete($mailbox, $email_id); } // Expunge to permanently remove the deleted emails imap_expunge($mailbox); } // Close the connection to the mail server after processing imap_close($mailbox); } } } }
×
×
  • Create New...