Jump to content

tpr

Members
  • Posts

    2,321
  • Joined

  • Last visited

  • Days Won

    44

Everything posted by tpr

  1. What I usually do is adding extra fields to system language pages like language code, locale, etc on multilang sites. This way there is no ambiguity on such things.
  2. I always find that the majority of a webdev work with PW is about front-end stuff and backend work with PW is a minor issue, at least compared to the systems. Of course this probably won't be the case on your first project but it will be soon. So if you know html and CSS (Js?) well, your learning curve won't be that steep.
  3. In the past few days I rewrote FEEL as a module. I can say that it's more usable this way, and will be even more if it gets to the modules directory. Module settings makes it easier to adjust global options. The ability to override options on individual edit link was also kept. There may be some quirks in the module version but it's quite stable as it is. I tested it on 3 sites (single-lang and multilang) and seems to work fine. Notable changes: rewritten as a module, usage mode changed to $page->feel() array format for options (options can be accessed by their names) new option: "Enable module" - toggle module on/off globally new option: confirm iframe close if edit form has changed (only on Pages, uses the built-in admin notification message) fixed: wire("user")->language only available on multi-lang setups JS callback functions (still in WiP status) new: override options on individual edit links The new github repo is here: https://github.com/rolandtoth/FrontEndEditLightbox I'll keep the previous repo for historical reasons, with a big "unmaintaned" warning.
  4. Adrian was just quicker... we probably need more code to help if that snippet doesn't work. Anyways, I always have a good laugh when reading about those dam(n) pages and templates
  5. tpr

    New Logo

    New car? You mean baby buggy?
  6. I'm experimenting with loading the URL in an iframe, sliding in from the right side of the browser window. It works in most cases but fails if the target site's X-Frame-Options is set to SAMEORIGIN, like here on this forum. Unfortunately this is something that cannot be check on the client side. However, I will keep this feature with a note in the readme.
  7. Thanks, but I'm not sure this needs a module. Using "id!=$bigList->id(|)" is also easy to add, or just using ->not($bigList). Note that these are pulled from memory only, untested.
  8. Sure, I just wanted to polish it a bit. Here it is: http://modules.processwire.com/modules/inputfield-urlchecker/ I took the opportunity and made some changes to make it PW 3.x compatible according to the latest blog post. Though I haven't tested if it works fine there, it didn't break anything in v2.6.
  9. Okay, settled with "InputfieldURLChecker" as the module name as I found no better one. In the last few days the module got some major updates: allow button and hotkey modes to be used together asmSelect fields for enabled fields/templates add "placeholder" to asmSelect fields make strings translatable (with __FILE__ textdomain) JS optimizations/fixes Check the github repo for the details - the options page screenshot shows most of them.
  10. For the record, just edited the snippet above and added "[data-asm-placeholder]". The selector now says "If attr must exist & has to have some value...", so selects without the custom "data-asm-placeholder" will be skipped. See: http://stackoverflow.com/questions/10641258/jquery-select-data-attributes-that-arent-empty#answer-23944081
  11. I solved it this way - a bit hacky but as it's only a cosmetic issue, it will do. In the module I needed this feature I added a "data-asm-placeholder" to the asmSelect field in module JS I added a $(function () { ... } inside document.ready() where I set the asmSelect field's first option text to the value set in data-asm-placeholder $(document).ready(function () { // other code here $(function () { $('select[data-asm-placeholder!=""][data-asm-placeholder]').each(function () { var placeholder = $(this).data('asmPlaceholder'); if (placeholder) { $(this).parent().find('.asmSelect').find('option:first').attr('selected', true).attr('disabled', true).text(placeholder); } }); }); });
  12. Seems so... don't know what I was looking. Try var_dump-ing values to spot any difference between empty/non-empty fields.
  13. No idea then, but I think it would be better to match pages using their ID, or by name. Are those Dutch pages active, just to make sure?
  14. I really recommend to do yourself a favor and try one - LESS is for example really easy to set up. I use only a few of its features - nesting, variables, etc - but I won't ever go back to native CSS. When I have to I feel like using pure PHP instead of PW (just to illustrate my feelings ). After all you can write pure CSS but the advanced features are available if you need them.
  15. Have you moved the count check above the whole table? Currently it is inside the body.
  16. Thanks, I will look into them. As for now, I think it's easier to manipulate the select field on document.ready() - of course there might be issues that I can't foresee.
  17. I found no way to add text "Please select..." as the first item to an AsmSelect field. Using PHP I could add a disabled option but an empty first item is always prepended to the options list. I also checked the JavaScript options but found no way to do this. Is there something I overlooked? I can add this feature with a few lines of extra JS but it would be better if there were an "official" way.
  18. Not exactly the one I'm after, but thanks Keeping the first characters is a good idea, I'll go on that route
  19. I was about to ask help here but finally solved things on my own (and looking into other modules). v0.92 allows using the module on all admin pages. So far it was only added to pages where ProcessPageEdit could hook to, so for example now it is available on other modules's settings pages, or the new module install screen: New (default) option was added: button-left - this is handier because the button is not on the far-right end of the input. Also the appearance was changed a bit: colored arrow appears only on hover, otherwise remains gray. The button itself is visible all the time, even if the field is empty. The height of the button was also fixed by adding a dummy url field on start, just to measure its height (and then it's removed). Other measurements were unfortunately buggy. I'm still looking for a better module name, though I kinda like the abbreviation "TUF", which is used heavily in the JS for naming. Locked fields got an underline on hover, just to make them more usable.
  20. $pages->get in first line: Have you tried with ID instead of page name?
  21. v0.9 is up: new option: enabled templates linkify locked field:
  22. Thanks! DIRECTORY_SEPARATOR was indeed unnecessary, I guess it was a victim of a copy-paste operation Unfortunately there were other bugs to fix. Just realized there are ajax-loaded FIELDS too and not only tabs. Now these are covered too (v0.85). Positioning of the links was improved too, and fixed the issue when the field had description or notes. Later I'll add enabled_templates function to make it more versatile, plus make field value clickable if the field is set to "closed + locked". If I knew there are so many field options to take into account I probably won't start this module
  23. It's still a modulette compared to other heavyweight modules The first post contains the link to the GitHub page (v0.8). There was a small code optimization but otherwise it's the same as v0.7.
  24. v0.7 is ready. Download link in the first post. Configuration Changelog fixed link height when URL field is under admin tab (works with ajax-loaded tabs) fixed link height when first tab didn't have any URL field namespaced JS new option: ctrl+shift+click and ctrl+shift+enter modes new option: force http prefix new option: limit module to list of enabled fields What I plan to add in the future is opening links in a lightbox, and perhaps allowing all 3 modes to be used at the same time. But I think I'll do these only if there's a demand.
  25. You overwrite $attachments in the for each, use ".=".
×
×
  • Create New...