Jump to content

Martijn Geerts

PW-Moderators
  • Posts

    2,769
  • Joined

  • Last visited

  • Days Won

    31

Everything posted by Martijn Geerts

  1. You can, but it need some additional scripting. The below could be inside the init() of an autoload module. That would hide the pages you wish for the role my-role. Ps, the code here is not tested. $this->addHookAfter('Page::viewable', function($event) { if (!$this->user->hasRole('my-role')) return; $exclude_ids = array( 1234, 2345, 2323, ); if (in_array($event->object->id, $exclude_ids)) { $event->return = false; } });
  2. @LostKobrakai, I think he points to orphaned files and images and probably variations of images.
  3. Can I ask you the reason you want to add a class to images ?
  4. When SimpleForms use wireMail you only have to install this module and create a template. On the place you want to have your markup place the {bodyHTML} tag.
  5. WireMailBranding Add email templates to wireMail From this: $mail->bodyHTML("<h1>Hello</h1><p>I'm WireMailBranding</p>"); To this: (or whatever template you create) How it works? Create an email template without content. On the spot where you wish to have your content place the tag {bodyHTML}.The markup you've set with $mail->bodyHTML('<p>Markup</p>'); will replace that tag. You could set the defaults in the Module configuration or set the properties with the API. (See below) The API will overwrite the default settings $mail = wireMail(); $mail->to('user@some-domain.ext')->from('you@own-domain.ext'); $mail->subject('Mail Subject'); // Set path to template (overwrites default settings) $mail->template('/site/templates/template_wrapper.php'); // Enable/Overwrite the Emogrifier CSS inliner. (0, bodyHTML, wrapper) $mail->inlineCSS('bodyHTML'); $mail->bodyHTML('<p>This paragraph will replace the {bodyHTML} tag in the mail template.</p>'); $mail->send(); CSS inliner We have added the beautiful css inliner Emogrifier to inline the CSS styles. When using the Emogrifier CSS inliner applying it on the bodyHTML only is the most efficient way. We recommend you to write the inline styles for the wrapper manually. The module is sponsored by Calago.nl. Thanks guys ! Updates 0.1.2 Bug fixes : - Fixed redeclare Emogrifier bug. Improvement - Added error logging for Emogrifier - Added inputfield error for the lack of PHP's mbstring in the module configuration. - Some code cleaning and other cosmetics 0.1.3 Bug fixes : - Fixed bug when module couldn't grab bodyHTML (resulted in doing nothing at all). GitHub https://github.com/Da-Fecto/WireMailBranding Modules directory http://modules.processwire.com/modules/wire-mail-branding/
  6. I would also love to see the ability of using unordered and ordered lists.
  7. Ryan should consider this to be included in the core I think.
  8. Is it the superuser who made the search ? If that's yes, it is working properly. I don't see issues except when you do stupid things with the results.
  9. Most popular frameworks have inflexible grids as they are based on floats and need row markup. I would go for a inline-block grid in most / all cases. Inline-block grids don't need rows to function but you can use them when you wish. Full browser support ie8 and up. Here's a grid made by Nicolas Gallagher (Writer of the micro clearfix) http://necolas.github.io/griddle/
  10. Now I get you... sorry. That's a nice one for a feature request. $allDataBack = json_decode(file_get_contents('php://input'));
  11. This has nothing to do with WireMailSmtp but I have a question: Can't wrap my head around this... The module is not autoloading, only extending WireMail, but it loads on demand... I'm lost
  12. Maybe I don't get what you want, but you receive via $input->post or $input->get, Or when you need associative nested use $_POST or $_GET. (as PW $input is not multi dimensional) Communication back you could do with the WiteHttp class.
  13. Have you seen https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/core/WireHttp.php?
  14. perfectly valid HTML5: <!DOCTYPE html> <title>pw</title> <p> Time to drop your <head> ?
  15. What is the reason you don't know if the page has the field 'adr_rubrik'? Are you sure that the PageField adr_rubrik is set to Multiple?
  16. You've a complicated setup , the below is written in the browser. <?php $out = ''; $rubrik = false; if ($page->template->has('adr_rubrik')) { $rubrik = $page->adr_rubrik; } if ($rubik && count($rubik)) { $list = $pages->find("template=adress_daten, adr_rubrik=$rubik, include=all"); if (count($list)) { $out .= '<table id="myTable" class="tablesorter adressliste display">'; // ..... etc. etc. foreach($list as $l) { // ..... etc. etc. } } }
  17. Bernhard is right about that ID. When somebody deletes that page your code is broken. Another thing: // needs to load all children $pages->get(1019)->children->first() // better $pages->get(1019)->child
  18. It's a syntax error. // This is without the syntax error (note the dots and the single quotes) echo "<a class='link prev' href='" . $page->prev->url . "'>"; BTW: // Potential memory hog $pages->get(1019)->children->first() // This doesn't need to preload all children. The property boolean `true` is to count only the visible. $pages->get(1019)->numChildren(true)
  19. Then don't use _main.php, you could use include.
×
×
  • Create New...