tires
Members-
Posts
258 -
Joined
-
Last visited
Everything posted by tires
-
Wiremail SMTP module outputs "Error in hnsmtp::send"
tires replied to tires's topic in General Support
Thanks for your answer! May be its blocked. But where? At the user or on the server? Or is it the bcc? -
Hi! I've got an issue with the Wiremail SMTP module. The settings test in the module works without problems. But not the mails send via the website. In the logs "wiremailsmtp_errors" i always got this strange message: Error in hnsmtp::send : 250 OK What does that mean? Where or how can i get more infos or details errors? The background: I send mails everytime a page is published to all users via the ready.php . The mail are sent to my mail adress with all the user mail adresses in bcc. Thanks for any ideas & cheers!
-
Hi! I need an alternative rendering for my pages for printing. In this case i can't do it with css but i need a special template or something for the print view. How can i achieve this? THANKS!
-
Thank you! Didn't know that. I thought that were just the allowed hosts.
-
O wait, is this the first adress under "$config->httpHosts" in the site/config.php? Could this be?
-
Hello! I just moved a website from the development to the live server. Now there is a strange behavior. If i output the page->httpUrl as well as i click on "view" in the page tree the development server url is shown. I have no idea where this comes from. Do you have?
-
Thanks a lot! That helps me! I recognized that the secure directories now looks like this "-myfolder". But if i echo the file-url the path is without the "-" i.e. "myfolder/myfile.pdf". Is that how it should work? And is there a solution for this problem: Thanks!!!
-
BTW. Is there a way to check if a file is secure or not? Or to check if there are insecure files on my website? Thanks!
-
Hey! I just added this line in my config.php $config->pagefileSecure = true; I've got two questions: Is there a way to change existing files to secure ones? Do i necessarily need the line: $config->pagefileSecurePathPrefix = '-'; Thanks and greets!
-
Hi! Is there a way to save the full name (i.e. another user field) instead of the username as the "cite" for a comment? Or isn't that recommended for some reason? Thanks!
-
I chose the Operator: ~= (i.E. All given words appear in compared value, in any order. Matches whole words. Uses “fulltext” index.) But if i enter "everything 2021" i am not finding the page with the titel "everything is great in 2021".
-
Need to send email notification after a page has been published
tires replied to Lars282's topic in Modules/Plugins
Thanks for your answer! I tried it without success. It seems that this line is responisble for the error. If i delete the if statemant the mail is sent (twice and after every change of the page). if($page->template =="mytemplate" && $page->id && $page->isChanged('status') && !$page->is(Page::statusUnpublished)) { -
Need to send email notification after a page has been published
tires replied to Lars282's topic in Modules/Plugins
Thank you for the answer! I still tried the doubble ampersand. Without success. Any other suggestion? BTW. Is this line correct? $numSent = $this->mail->subject($subject) -
Need to send email notification after a page has been published
tires replied to Lars282's topic in Modules/Plugins
Hello! I tried to make my own module using the code above. But unfortunately no mail is been sent. If i delete the if statement that starts with "if($page->template ..." it works. But then a mail is sent after every page modification. Here is my module code. Do you see any error? <?php class MailNotificator extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'MailNotificator', 'version' => 1, 'summary' => 'Hook the saving of pages to add own processes.', 'singular' => true, // Limit the module to a single instance 'autoload' => true, // Load the module with every call to ProcessWire ); } public function ready() { $this->pages->addHook('saveReady', $this, 'afterSaveReady'); } public function afterSaveReady(HookEvent $event) { $page = $event->arguments[0]; if($page->template =="mytemplate" && $page->id && $page->isChanged('status') && !$page->is(Page::statusUnpublished)) { $result = $this->db->query("SELECT status FROM pages WHERE id={$page->id}"); list($status) = $result->fetch_row(); if($status & Page::statusUnpublished) { $to = "your@email.com"; $from = "my@email.com"; $subject = "New page: ".$page->title; $body = $page->text; $bodyhtml = "<html><body><p>".$page->text."</p></body></html>"; $numSent = $this->mail->subject($subject) ->to($to) ->from($from) ->body($body) ->bodyHTML($bodyhtml) ->send(); } } } } Thanks and good night! -
Is there really no way to get a simple "download as pdf" button?
-
I want to offer a download function to the website visitors ... not only for myself.
-
I am still using a css with "@media print". What browser feature do you mean?
-
Hi! I just want to have a simple "download this page as pdf" button on my page. The created pdf should use the print.css. How can i get it? Thanks!
-
Is there a way to get this running with php 7.3? How can i upgrade the mpdf version? The files that i can download here https://github.com/mpdf/mpdf/releases doesn't look very much like the ones i got in my /site/modules/Pages2Pdf/mpdf folder. Or is this module not usable anymore? Thanks!
-
Thanks for your answer! But it outputs nothing although there are about 10 versions. When i do a "print_r" it outputs a "1": print_r($page->versionControlRevisions) Any ideas?
-
Pager (Pagination) Navigation: Multiple values for whitelist
tires replied to tires's topic in General Support
Yes! That seems to work! Thank you once again! This is my code that works: $input->whitelist('q', $q); $input->whitelist('tag', $tag); $input->whitelist('sort', $sort); $pagination = $mypage->renderPager(array( 'nextItemLabel' => "next", 'previousItemLabel' => "prev" )); -
Pager (Pagination) Navigation: Multiple values for whitelist
tires posted a topic in General Support
Hi! I want to use a few values for pagination whitelist, so i can submit all values to the next page. The code of the "next" link should look like this: https://mywebsite.com/search/page2?q=mysearchquery&tag=mytag&sort=desc How can i add this values to my the whitelist: $pagination = $mypage->renderPager(array( 'nextItemLabel' => "next", 'previousItemLabel' => "prev", $input->whitelist('q', $q) )); Thanks! -
Is there an easy way to echo the number of page edits / versions? Thanks!
-
That's easy! Thanks a lot! $mypages= $pages->find("template=mytemplate, sort=mycomments.count, limit=10");
-
Hi! I want to sort pages by the number of comments that where made to a page. $mypages= $pages->find("template=mytemplate, sort=mycomments, limit=10"); What is the best way?