Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/03/2021 in all areas

  1. Long time no module ? Github: https://github.com/baumrock/RockIframe Modules Directory: https://processwire.com/modules/rock-iframe/ 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;
    8 points
  2. 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); }
    2 points
  3. What we need is really easy ways to contribute and build motivation towards contributions. - slack/discord for real-time Comms - merging PRs in the Processwire repo instead of the weird closing the PR and copy pasting it in. I raised a PR years ago, got no feedback and was told it may have fine in via copy and paste. I closed the PR myself to reduce noise and haven't entertained the idea of contributing since. Unless this has changed, start treating it like a modern open source project - roadmap on the GitHub board - indentified maintainers on the GitHub repo - a backlog / causal kanban style agile setup - monthly maintainer video calls to go over backlog etc. Maybe anyone can join. Maybe video recorded. - a patron or way to donate to the PW project. This pot can be used to pay maintainers to work on critical features etc. E.g. through donations with have enough money to fund 1 week of work, what should Ryan / another maintainer take time off their normal work to work on. - key goals established for the core maintainer team. We should as a whole be marching the same direction. (Though obviously people can work on what they want, but has to pass review) - a plan that @ryan is comfortable with to slowly distribute the reigns. We don't want to move too fast and over burden the core. - some sort of backlog voting system, instead of posts on the forum. - Id really like to modernise the process around Processwire. That scares anybody larger than a sole freelancer away from the project. Bigger users mean more support. More pro modules being sold etc. - on that note. Can we have the shop not just be Ryan's modules but extended to other pais for modules. I don't like that they are strewn across the web. (And Ryan charge a fee.)
    2 points
  4. 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 :
    1 point
  5. Uninstalling and reinstalling LazyCron fixed it for me.
    1 point
  6. 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.
    1 point
  7. Hi @fruid, I've never seen an id attribute on the <title> tag before! Can you please edit line 258 of MarkupContentSecurityPolicy.module to remove the '>'? <?php // Line 258 $node = '<title'; I think that'll fix it. If so I'll push that change to the repo. Cheers, Chris
    1 point
  8. PHP 8 was released a few months ago. I can't get WireMailSMTP to work with PHP 8. The error message is: "Error in hnsmtp::send : cannot connect to smtp-server!" With PHP 7.4, on the other hand, it works fine. Was anyone already successful with PHP 8? Thanks in advance.
    1 point
  9. @jon9china - thanks for the explanation. I think I sort of understand "They were looking for the page that identified the restricted user that was logged in", but if you could provide the selector code you are using it would be helpful - perhaps I can implement something into the ARB module so that you can still use the selector the way you want, rather than changing to the email field. So if you could post the old and new versions, I'll try to replicate and see if I can fix it somehow.
    1 point
  10. @jon9china - sorry you're having problems with the module. You could please clarify what you mean by "the user restricted branch setting" ? Are you talking about the "User Specified Branch Parent" option for the "How to match user to branch" setting? Do you have the same problem if you use one of the option ways to match the branch? I can't replicate the problem here, so I am wondering if you might have some other additional hooks (custom or in a 3rd party module) that are also controlling access. It sounds like you are running out of memory due to an infinite loop. If you can narrow it down to some other code interaction that will help. If it's not that, would you mind trying to debug this module to see where it might be goin awry? Could you also post your other settings for the module? Also, is the error only when viewing the admin with a restricted user?
    1 point
  11. @fruid I'd still test your mail with the mail-tester tool mentioned above to make sure your email doesn't appear "spammy". Depending on your settings and whether you're sending through the mail server of your hosting your mail may appear to be unauthenticated. Anyway, it's curious that WireMailSmtp isn't working but WireMailPHPMailer is, are you using the same settings for both? By the way, I'd be slightly wary when the provider tells you to use port 587. In general, TLS-encrypted mail should use port 465. Port 587 is for STARTTLS, which starts SSL-encryption only after a connection has been established, which means you're susceptible to a man-in-the-middle attack. Your hoster only supports port 25 (plain text) and 587 (STARTTLS), that's a red flag. Anyway, if you're using the suggested settings for SMTP connections by your hoster and they're not working, I'd just talk to them to see what might be the problem.
    1 point
×
×
  • Create New...