Jump to content

dotnetic

Members
  • Posts

    1,037
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by dotnetic

  1. @BitPoet I just edited my post. It has to do with the length of the title. Because my title was more than 78 chars.
  2. Do you use the WireMail Class from dev Repository with bitpoets fixes? My problem happens only because it is a multipart message and not a plain text message. I added this to my post.
  3. @BitPoet´s fix for quoted-printable mails is merged into dev. I updated my WireMail class and tried sending an E-Mail with the new class. Now the HTML Part of the message with umlauts in it displays fine, but the title with german umlauts in it still does not display correct. I tried all sorts of conversions and adding headers to the mail but nothing worked. EDIT: This happens with multipart messages because they have no header like Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable But if I add those headers the rest of the mail is unreadable. How do I get correct umlauts in the title? Edit: I found the solution, attached it to the end of my post. Here is the some of the code I used: $betr = 'öäüß testmail' $mail = new \ProcessWire\WireMail(); // $mail->header('Content-Transfer-Encoding','base64'); // $mail->header('Content-Type', 'multipart/alternative; charset="utf-8"'); // $mail->header('charset', 'utf-8'); $mail->to('info@jensmartsch.de'); $mail->from('info@jensmartsch.de); $mail->fromName("Jens Martsch"); // $mail->subject(("$betr")); $mail->subject ('=?UTF-8?B?' . base64_encode($betr) . '?='); // $mail->subject(base64_encode('$betr')); // $mail->subject = "?utf-8?Q?" . quoted_printable_encode("öäüß The ï, ö, ë, ä, and é work, but when adding the ü it doesn't") . "?="; $mail->bodyHTML(($text)); if (!$mail->send()){ echo 'Fehler'; } This is the E-Mail header that I receive if I am using $mail->subject($betr); To: info@jensmartsch.de Subject: =?utf-8?Q?=C3=B6=C3=A4=C3=BC=C3=9F Bewerbung Berechnungsingenieur / Messtechniker Aut= omotive (m/w)?= X-PHP-Originating-Script: 0:WireMail.php From: =?utf-8?Q?Jens Martsch?= <info@jensmartsch.de> X-Mailer: ProcessWire/WireMail MIME-Version: 1.0 Content-Type: multipart/alternative; What I see as the title in my mail programm is exactly the same as the Subject SOLUTION: It seems that the length of my title was the problem. Now I try to find a solution for this as well. Maybe I just shorten the title.
  4. @MadeMyDay Haha, in Oelde hab ich sogar mal gearbeitet. Liegt aber n bisschen weitab von deiner Heimat.

  5. @MadeMyDay Haha, in Oelde hab ich sogar mal gearbeitet. Liegt aber n bisschen weitab von deiner Heimat.

  6. I really love this module and think its features should be in core. So much flexibility. You can customize the backend to your preference.
  7. @processwire @cmscritic In my eyes you already won!

  8. Seems like the variable isn´t available. So I used pages.get('/').url instead.
  9. @Wanze Another problem: When I try to use config.urls.root in a hyperlink in a .twig file <a href="{{ config.urls.root }}login/">Anmelden</a> I get an error: Exception: An exception has been thrown during the rendering of a template ("Method Paths::root does not exist or is not callable in this context") in "main.twig" at line 135. If I use another config variable like config.urls.templates it works (but with the wrong path, as I need the root). What is wrong? Is this a bug?
  10. #isnichwahr https://t.co/1pVw0QrU1S

  11. I am using PW 2.8 so there is no namespace. Also I have the function testfunction which should just return a string but also doesn´t work.
  12. I modified my module as you wrote and installed it again, but I still get the error Exception: Unknown "wireRelativeTimeStr" function in "logspot_profile.twig" at line 107
  13. @Wanze @Gazley I can´t get it running. I even tried to write a module but I don´t know which class to extend. Gazley could you send me your module as a reference? Here is the code of my module: <?php class TwigFunctions{ public static function getModuleInfo() { return array( 'title' => "TwigFunctions", 'version' => "0.0.1", 'summary' => "", 'author' => "Sir Aceman", 'href' => "", 'permission' => array("page-view"), 'autoload' => true, 'singular' => true, 'permanent' => false, 'requires' => array("PHP>=5.4.0", "ProcessWire>=2.5.28", ""), ); } public function init() { $this->addHookAfter('TemplateEngineTwig::initTwig', $this, 'hookInitTwig'); } function hookInitTwig(HookEvent $event) { $twig = $event->arguments('twig'); $twigWireRelativeTimeStr = new Twig_SimpleFunction('wireRelativeTimeStr', function ($date) { return wireRelativeTimeStr($date); }); $twig->addFunction($twigWireRelativeTimeStr); $function = new Twig_SimpleFunction('testfunction', function ($string) { return 'testfunction'; }); $twig->addFunction($function); } }
  14. @Gazley I tried adding a modified version of your code to my prepended _init.php. It looks like this: function hookInitTwig(HookEvent $event) { $twig = $event->arguments('twig'); $twigWireRelativeTimeStr = new Twig_SimpleFunction('wireRelativeTimeStr', function ($date) { return wireRelativeTimeStr($date); }); $twig->addFunction($twigWireRelativeTimeStr); $function = new Twig_SimpleFunction('testfunction', function($string) { return 'testfunction'; }); $twig->addFunction($function); } But when I try to use a function in a twig template like {{ wireRelativeTimeStr('1469455438') }} I still get Exception: Unknown "wireRelativeTimeStr" function in "logspot_profile.twig" at line 107 What did I do wrong?
  15. @bernhard Sure. Provide me with details / login and I will have a look. We can also communicate in german if you like.
  16. @Pete Back in 2013 @Nico Knoll asked for a "Mark as solved" button for the forums, so user could see which questions are still unsolved, which was a great feature for this forum. Now with the new version this button is missing. Could you please let it return?
  17. Thank you @bernhard. Have to test it a little more, but first try worked fine.
  18. So you found the answer yourself. Yes, you need to assign your variables to the view variable like this: $view->set('login', $login); All processwire API variables (page, input, config etc.) are available (per setting in Template Engine Twig). So you can use {{ page.title }} directly.
  19. Hi Manaus, which Template Engine Module do you use? Template Engine Factory or Template Twig Replace, or something different? Please post the code of the twig file here. Please give more information about your setup (ProcessWire Version, etc). Normally you would call a function in twig with {% myFunc(params) %}
  20. As rating is included in Comments Fieldtype in the core now I deleted the files.
  21. Hi there, I know there is a possibility to open the Front-End Editing window with one click if if change the class of the containing div from "pw-modal-dblclick" to "pw-modal-click". So how can I have a button/link that opens the frontend editor with a single click? I want to use a code similar to this: <edit field="title,user_image,facebook_url,description"> <a href="#" class="waves-effect waves-light btn pw-modal-click">edit this page</a> </edit>
  22. I have an issue with the z-index of the UL with the id="notices". When I scroll it overlays the mainmenu as seen on screenshot. Z-Index should be lower. PW 3.0.25
  23. @sindresorhus Truly addictive. Love it. Also wanted to recommend Kung Fury. If you like the music check out Kavinsky - Testarossa Autodrive

  24. @felix pointed me to the following post which provides a possible solution for avoiding multiple session_starts, but I don´t get it to work. When I use Zend_Session::start(); I get an error Uncaught Error: Class 'Zend_Session' not found because Shopware or Zend is not included in ProcessWire. I try to include ProcessWire into Shopware.
  25. This seems to be answered here
×
×
  • Create New...