Jump to content

bernhard

Members
  • Posts

    6,674
  • Joined

  • Last visited

  • Days Won

    367

Everything posted by bernhard

  1. I was tired of adding 6 different fields to an event-template just for storing the time range of the event... ?
  2. Hey @adrian just using the tracy console a lot gain for testing/developing a module. It's absolutely brilliant! Thx again! Do you have an idea of a quick solution for having dumped objects always unfolded? This is what I'm doing: I always have to unfold the object dump to see the results. For that I have to use the mouse - which is slow and tedious. If there where a checkbox "automatically unfold all dumps" it would speed up my process even more. Looking forward to hearing your thoughts about this, thx. Maybe there is already an option somehwere?
  3. Would be very interested to get some details on this! ?
  4. So why not let them all enabled by default?
  5. I haven't tried snipwire yet, but regarding the uninstall I have two suggestions/ideas: 1) Maybe SnipWire could state clearly before installation, that it is not trivial to uninstall this module and it might be the best option to restore a backup in case you want to get rid of snipwire. That would of course be not possible on a live system when some data has changed. In that case it might be the easiest solution to provide step by step instructions to uninstall everything manually. 2) Maybe https://github.com/BernhardBaumrock/RockMigrations have some helpful code snippets that you can use for the uninstall routine? RockMigrations are built in a way that they do NOT ask for any confirmations. That means if you delete a template all related pages that use that template are also deleted. That can be too destructive in some situations but can be exactly what you want in others... Thx for all your efforts @Gadgetto - as I said I haven't tried it yet, but it seems you are doing a great job!
  6. I guess a Page Autocomplete combined with that nice VEX-modal-PageListSelect that Robin shows in his screencast would be a great addition in general for PW ?
  7. Hi @renobird (and others) I'm trying to develop a daterange fieldtype using the core timepicker as shown in your example, but it looks like this: The only docs I found where this one: https://trentrichardson.com/examples/timepicker/ not sure, if that are the correct docs for the timepicker PW uses? Any ideas how I can get rid of the "choose time" button and the "time" line above hour and minut (it's unnecessary because it is also shown in the input) Thx! PS: I thought of hiding it via CSS, but it seems that the whole timepicker markup is loaded directly under <body> so I cant target only the timepickers that are loaded from my Inputfield, or can I?
  8. Can't you just save the currency in the user's $session ?
  9. Hi @netcarver thx for the great module! Would you mind renaming the title of the module to "Time" only without the Fieldtype? It would make selecting it easier (I'm using the keyboard most of the time and it would be nice (and consistent) to type "time" instead of "fieldtype time"). Another little glitch: The field is set to this format: After selecting a time, the format is correct (eg 18:30), but initially it displays seconds (which is not wanted).
  10. Hey @tpr just wanted to ask if there is any harm in having all config inputfields toggled visible? AOS has so many options, it's always hard to remember where an option is hidden. Using the browser search this would be a lot easier (eg find "middle" when you want to activate some middle click magic)
  11. Yeah, I was talking about PW guides ?
  12. Usually guides from 2014 work just well and are still valid ?
  13. ?‍♂️ ?‍♂️ ?‍♂️ ?‍♂️ ?‍♂️ Thx, that explains it ? I've also linked to your explanation in this old justify walkthrough that I was following all the time, not knowing that it was overly complicated ...
  14. thx to @wbmnfktr I learned that it is actually a lot easier to use some plugins that ship with the PW core: Just add the name of the plugin in the CKEditor Toolbar textarea and you are done! No extra download, no copying of any files, nothing ? I was always avoiding adding plugins because it seemed so complicated... I'll start using them more often now ? I think this does only work if you have AdminOnSteroids installed ?
  15. Thx, that's an interesting point and exactly what I was talking about: Docs are bad or misleading. Justify did also work without adding any files - I don't know why. Does anybody know why? I've just found that there are several plugins in the AdminOnSteroids folder. I thought maybe that's the case why Maximize works out of the box (and so does Justify). But I renamed both maximize folders to maximize2 and the plugin does still work. But there are definitely no other maximize folders... @tpr any hints for us?
  16. Hi everybody, I'm doing some CKEditor optimizations and as I'm not doing that often it's bringing quite some trouble with it... For example today I wanted to add the maximize plugin and it didn't work - the docs of CKEditor are slightly different to what we need at ProcessWire, so I thought we could share our findings in this thread! See here:
  17. Yeah, thx for your links, but as I said what I actually tried to do was to add a new paragraph format, not an inline style ? I've managed to add an inline style already. I think that option should also work fine. It's actually a little bit more flexible, because then the client can apply the special font to any tag (H2, H3 and P)... CKEDITOR.stylesSet.add( 'mystyles', [ { name: 'Handschrift', element: 'span', attributes: { 'class':'tm-fancy' } }, ... Extra Allowed Content also needs to be set when ACF is active:
  18. Hi @tpr, I've just tried to do what you suggested, but I failed ? My first try was to set a custom style, but that is not exactly what I want, because these are inline styles that are applied to the current selection. I want to add a new TAG to the list of format tags: Eg Heading 2 FANCY which would add <h2 class="tm-fancy">...</h2> This did unfortunately not help/work: https://stackoverflow.com/questions/17230809/how-to-add-a-custom-paragraph-format-in-ckeditor Has anybody ever added a custom paragraph format (block element) instead of a custom style? I'll try the inline style solution though...
  19. Just installed it. Really simple. Really useful. Thx a lot! ?
  20. PageListSelect in a VEX modal - very nice ? Looks great!
  21. How can I center that headline?
  22. Hi everybody, I want to share what I came up with. Background: The goal was to get a color-accent to every headline on my new project. First thought was to use CSS-only with ::before pseudo element, but the problem is, that the headline is a either a block element (then position absolute left 0 leads to the accent being on the very left even for text-align:center headlines). Or if the headline is inline-block I had some other weird problem that I can't remember right now. Also multiline headlines where tricky. That's why I wanted to add a real element at the beginning of every headline. Wrapping the first word was actually not necessary. I'm adding an empty <i></i> now right behind the opening <h2> or <h3> tag, so the regex get's even simpler. Here's the result: Here's the LESS if someone is interested: // apply style to all elements with tm-fancy attribute // this attribute is added to all h2+h3 via textformatter *[tm-fancy] { font-family: @tm-font-fancy; i:first-of-type { position: relative; } i:first-of-type::before { content: ''; position: absolute; left: -15px; bottom: 5px; width: 120px; height: 20px; background: @tm-secondary; z-index: -1; border-radius: 2px; } } // adjust width and height for h3 h3[tm-fancy] i:first-of-type::before { width: 100px; height: 15px; } And here's the very simple textformatter that I can apply now an every textarea field: <?php namespace ProcessWire; class TextformatterFancyHeadlines extends Textformatter { public static function getModuleInfo() { return array( 'title' => 'FancyHeadlines', 'version' => 100, 'summary' => "Add <i></i> to headlines for color accents.", ); } public function format(&$str) { // early exit if there are not h2 or h3 elements if(strpos($str, "<h2") < 0 AND strpos($str, "<h3") <0) return; // add attribute and inline element via regex $re = '~(<h[23][^>]*)(>)~ism'; $str = preg_replace($re, "$1 tm-fancy$2<i></i>", $str); } } Thx for your help ? PS: If anybody knows a better solution please share it ? Maybe there's a CSS-only way of doing that?
  23. Thx @ukyo, it is, as I thought, a windows problem. I've tried the "next" branch - no change. It works on my linux server. Would be great to get a fix for this. As you can see in my screenshot the strange thing is that the FilenameArray is populated on line ~118 but it is empty on line ~174 (where the select field on the input tab of the pw field should get populated).
  24. Hi, I want to wrap the first line of every H2 and H3 in a <span></span> tag so that I can do further CSS styling on that element. The problem is that the markup comes from a CKEditor field, so it can have different versions: <h2>This is a headline</h2> <h2><span>This</span> is a headline</h2> // result <h2 foo="bar">This is a headline</h2> <h2 foo="bar"><span>This</span> is a headline</h2> // result <h2 foo="bar"><strong>This is a headline</strong></h2> <h2 foo="bar"><strong><span>This</span> is a headline</strong></h2> // result Any tips for me? Domdocument? Any 3rd-party dom parser? Or Regex? Thx for your help! ?
×
×
  • Create New...