Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Hello Maybe this was already asked, but could't find anything on the forum. Is it possible to merge two menus together somehow. I have a header menu with logo in between and now Im using two separate menuesbuilders for this. I also need to have another one for mobile. So everytime I update one menu I have to update mobile separately. Any chance I could combine two menues together so I wouldn't have to update the mobile everytime? So it would show both left and right in the mobile automaticaly. my code: (mobile menu) <?php $menu = $modules->get('MarkupMenuBuilder'); $options = array( 'wrapper_list_type' => 'ul',// ul, ol, nav, div, etc. 'list_type' => 'li',// li, a, span, etc. 'menu_css_id' => '',// a CSS ID for the menu 'menu_css_class' => 'dl-menu',// a CSS Class for the menu 'submenu_css_class' => 'dl-submenu',// CSS Class for sub-menus 'has_children_class' => 'menu-item',// CSS Class for any menu item that has children 'first_class'=>'',// CSS Class for the first item in 'last_class' => '', 'current_class' => 'active', 'default_title' => 0,// 0=show saved titles;1=show actual/current titles 'include_children' => 4,// show 'natural' MB non-native descendant items as part of navigation 'm_max_level' => 1,// how deep to fetch 'include_children' 'current_class_level' => 3,// how high up the ancestral tree to apply 'current_class' 'default_class' => '',// a CSS class to apply to all menu items ); echo $menu->render(2146, $options); ?> ID Left of the logo Right of the logo I tried something like this: echo $menu->render(2018|2019, $options); but ofc. not working. I hope I'm making sense here Thank you R
  3. Today
  4. RockCalculator Add a calculator to any Inputfield in the ProcessWire backend. Setup At the moment there is no UI for defining fields that should support the calculator. You have multiple options: Tracy Console // show rockcalculator and round result to .00 $field = $fields->get('yourfieldname'); $field->set('rockcalculator', 2); // 2 digit precision $field->save(); RockMigrations $rm->setFieldData('yourfield', ['rockcalculator' => 2]); Hook buildForm $wire->addHookAfter("ProcessPageEdit::buildForm", function($event) { $form = $event->return; $page = $event->process->getPage(); // edited page if($page->template !== 'yourpagetemplate') return; if($f = $form->get('yourfield1')) $f->rockcalculator = 2; if($f = $form->get('yourfield2')) $f->rockcalculator = 2; if($f = $form->get('yourfield3')) $f->rockcalculator = 2; }); Github: https://github.com/baumrock/RockCalculator Modules directory: coming soon
  5. I got an answer to the issue. It was already fixed: https://github.com/processwire/processwire/commit/4d04aac2a646d6c387d1afff28253225dace8474 – and I can confirm that it works for me now as well.
  6. No news in the issue for now. Did I miss something?
  7. Seeing that example it might make more sense to add different options to pw-panel: One showing the panel on top of the background and one pushing the main page to the side while keeping everything visible. That would also make it possible to support mobile devices... If anybody has time, feel free to improve the module 😉 🙂 Also if we have any JavaScript experts - I'd love to have the Iframe configurable in its width via mouse drag... no idea how that could be done. At the moment it is set to 40vw.
  8. Glad it helps! That's already possible - I've added an example to the readme: $wire->addHookAfter("ProcessPageEdit::buildForm", function($event) { $page = $event->process->getPage(); if($page->template !== 'mypagetemplate') return; /** @var RockIframe $iframe */ $iframe = $this->wire->modules->get('RockIframe'); if($iframe) $iframe->show("http://www.example.com"); });
  9. Yesterday
  10. Hey @bernhard seems to be a very good timing to me, this release! 🙂 One question: how would I tell the Iframe to load a page with urlsegments? I don't need to render a file- or imagefield but a sort of external or sibling page that need to be called with an id of the current edited page. Is this possible?
  11. Are these website all on the same server ? Or on shared hosting ? Or do you also have the issue locally ? I have this issue with one of my websites where sometimes the TTBF drops down. Can't say for sure as I did not investigate much yet but I assume it's because there might be other websites on the shared hosting taking too much power. Sorry I'm not helping much so here's a screen of the timings I had for your website, looks pretty normal to me :
  12. Long time no module 🙂 Github: https://github.com/baumrock/RockIframe Modules Directory: coming soon Problem Sometimes the editor wants to see a preview of a file while editing a page. For example this can be helpful when digitizing invoices. Regular ProcessWire panels can be used for preview but overlap the page editor so the user has to open and close the panel repeatedly while working. RockIframe shows a preview of any content that can be rendered in an iframe and keeps the page editor 100% visible to the user. Usage Simply call $modules->get('RockIframe')->show('path/to/your/file.pdf') anywhere in the admin to show your data in a sidebar iframe on page load. You can also define a Pagefile(s) object as source of the iframe. Example This example shows the first file of the field myfilesfield on the page edit screen of pages having template mypagetemplate: $wire->addHookAfter("ProcessPageEdit::buildForm", function($event) { $page = $event->process->getPage(); if($page->template !== 'mypagetemplate') return; /** @var RockIframe $iframe */ $iframe = $this->wire->modules->get('RockIframe'); if($iframe) $iframe->show($page->get('myfilesfield')); }); Ideas & Notes PDF preview relies on the browser's capability to preview PDFs. Also at the moment there are no checks which content is thrown to the iframe as source. For images for example we could use https://leafletjs.com/examples/crs-simple/crs-simple.html to enable panning & zooming on the image. For better browsersupport of PDF we could use https://mozilla.github.io/pdf.js/web/viewer.html;
  13. mails get sent now, contact form and newsletters. However, I struggle with sending HTML content with ProMailer via WireMailPHPMailer. The issue definitely is with WireMailPHPMailer because HTML emails get sent just fine via regular php. Also, on the newsletter template I have if($input->get('type') === 'html') { ?> <!DOCTYPE html> <html> <head> <!-- <meta http-equiv="content-type" content="text/html; charset=utf-8" /> --> <meta http-equiv="content-type" content="html; charset=utf-8" /> ... etc. And it always enters this block, no matter what is sent, but it always "auto generates" text, I guess, and strips the HTML. Don't know why.
  14. First thanks for your effort building this module. The hreflang for the default language (de) is always empty within the sitemap, e.g. is not populated with the given ISO Code (de) from the module options, s. screenshots. But even though i don't set an ISO Code in the module options at all, i don't get a false hreflang="home" (something like that), but a empty attribute string also. Hopefully i plain doing it wrong. Maybe some someone have a hint for me... Thanks in advance.
  15. Hi @rsi You can setup custom fields for images, take a look at this blog post https://processwire.com/blog/posts/pw-3.0.142/#custom-fields-for-files-images
  16. I'm trying to setup an extended description field for images for a client. It's a portfolio page that has many images with a short description attached to them. I would prefer if i could avoid having to generate a page per image and have a CKEditor as a custom field - it seems that is not possible and I'm guessing it's because of performance!? Maybe I'm missing something here and it is possible. Thanks for clarifications!
  17. Uninstalling and reinstalling LazyCron fixed it for me.
  18. Thx @snobjorn for creating the issue https://github.com/processwire/processwire-issues/issues/1339 Everybody having this problem please give it a thumbs up! I'm locked to v171 due to this issue 😞
  19. Yup, you were spot on Jan, thank you. The blog_tag field had been removed form the template in PW. Once restored the admin started working again. I'll mark this solved and raise a bug report for the module. Thanks again.
  20. This tries to count the items in blog_tags and fails because the field isn’t available. I’m not familiar with the module, but it appears to assume all blog posts (?) to have that field, so just adding the field to the relevant template should fix this particular error.
  21. Hi Jan and thanks for replying. I just checked the site and there is no field in the template with that name. There is one in the site, added by the module, but it is not in use in any template or assigned to any template in PW.
  22. Does your template have a page-reference field called blog_tags?
  23. Hi everyone, PW version 3.0.123 I've recently tried to upgrade the Blog module in an installation from 2.4.0 to 2.4.5 and now get the following errors when trying to visit Blog > Posts in admin: Fatal Error: Uncaught Error: Call to a member function count() on null in /MYSITE/site/modules/ProcessBlog/ProcessBlog.module:1299 Stack trace: #0 /MYSITE/site/modules/ProcessBlog/ProcessBlog.module(1421): ProcessWire\ProcessBlog->renderItemsSummaries(Object(ProcessWire\PageArray)) #1 /MYSITE/site/modules/ProcessBlog/ProcessBlog.module(1989): ProcessWire\ProcessBlog->renderItemsList(Object(ProcessWire\PageArray)) #2 /MYSITE/wire/core/Wire.php(380): ProcessWire\ProcessBlog->___executePosts() #3 /MYSITE/wire/core/WireHooks.php(723): ProcessWire\Wire->_callMethod('___executePosts', Array) #4 /MYSITE/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessBlog), 'executePosts', Array) #5 /MYSITE/wire/core/ProcessController.php(333): ProcessWire\Wire->__call('executePosts', Array) #6 /MYSITE/wire/core/Wire.php(380): ProcessWire (line 1299 of /MYSITE/site/modules/ProcessBlog/ProcessBlog.module) This error message was shown because: you are logged in as a Superuser. Error has been logged. I can see posts in Blog > Dashboard and all seems to work still on the front end. Anyone else seen this or know of a fix?
  24. horst

    WireMailSmtp

    Hi @titanium, I don't have had time to install PHP 8 and test out all my sites and modules under it. I will do so with priority for WireMailSmtp. But it may take 1 or 2 weeks, sorry.
  25. Just tested this out on a very simple site which doesn't use ProcessWire (or any CMS for that matter), and the slowly loading images problem still there. Any clues to this issue greatfully received!
  26. Hi there, I seem to be having problems with me Processwire sites. Page load times are extremely slow. It seems to be slow loading images, but maybe it's just that they are most obvious because they are larger in (file) size. Please can somebody head to: https://douglaswhates.com/ and tell me if the home page takes a while to load? For me, sometimes it is very fast (e.g. 300ms), but sometimes it is very slow (like, 20 seconds or so). I'm struggling to repeat the problem consistently. Only happens with a hard refresh. Loading from local cache is quick. I don't think it's an issue with my router, or DNS, or anything like that, as I have tried it on multiple machines, with different internet connections. Also, same issue accross Chrome, Edge, Safari. Doesn't seem to be a coding issue, because even loading something like this will be very slow (like, 6 seconds or so on a fast 80Mbps connection). https://douglaswhates.com/site/assets/files/2442/jamie-recording-session.1536x1024-pd1-jo.jpg It's not a ping issue, as looking at network tab in inspector, it's the actual download of the file which is slow. Could it be some sort of throttling going on? I don't see this problem on my own maching with other websites. Only my websites, which suggests a clash with ProcessWire somehow?? douglaswhates.com is on PW 3.0.148. Other sites (e.g. https://elevenkinds.com) are on PW 3.0.165. All affected by the same issue. Could it be an apache issue? I recently switched servers. Now running: Server Version: Apache/2.4.43 (Unix). Also, this server is running Varnish. Any thoughts? Douglas.
  27. Omfg, I was blind. 🙂 From... $page->save('redirect_counter') ...to... $page->save() ...did it. Sometimes I cannot see the tree because of the forest... or somehow. 🙂
  28. You aren't saving the redirect_last field. Also, I don't think it is necessary to test the counter prior to redirecting. Try this and see if it fits your needs. if ($input->urlSegment(1) === 'redirect') { $page->of(false); $page->redirect_last = time(); $page->redirect_counter += 1; $page->save(); $session->redirect($page->website_url, 302); }
  1. Load more activity
×
×
  • Create New...