Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. For a custom fieldtype/inputfield that contains two datetime variables (start + end) I want use two datetime inputfields in the render method. Everything works, except the datepicker does not appear... does anybody know why? public function ___render() { $name = $this->attr('name'); $value = $this->attr('value'); //getting values for start and end $start = $value->data["start"]->toDateTimeString();; $end = $value->data["end"]->toDateTimeString(); //preparing inputfield $field = $this->modules->get('InputfieldDatetime'); $field->set("label", __("Date")); $field->attr("class", "uk-form-width-medium "); $field->required = true; $field->datepicker = InputfieldDatetime::datepickerClick; $field->dateInputFormat = 'Y-m-d'; $field->timeInputFormat = 'H:i'; $field->timeInputSelect = 1; //setting first inputfield $field->attr("id+name",$name."_start"); $field->attr("value",$start); $renderedFieldStart = $field->render(); //setting second inputfield $field->attr("id+name",$name."_end"); $field->attr("value",$end); $renderedFieldEnd = $field->render(); $out = $renderedFieldStart.$renderedFieldEnd; return $out; }
  3. Using CTRL + SHIFT + V instead of just CTRL + V (on Windows), you can still paste the content and CKEditor will recognize basic stylings such as line-breaks and bold/italic, lists etc. without all the extra MS-Word proprietary stuff that @bernhard mentioned. That is intentional, since MS-Office documents and your website don't use the same styling, and you really don't want to end up with strange-looking parts in your website because of such author actions.
  4. You're right in that it's nearly impossible to tell which page to edit just from the URL. I think the only reliable way of getting the correct edit link is to render the admin bar server-side using wire('page'). No need to make it overly complex, I guess, by going the JS route. If somebody decides to do partial content replacement in their frontend, I feel like that's just something they have to take care of themselves by including the admin bar in the list of replaceable containers. The more I think about it, the more I feel like my case applies to that rule as well. If I want the links to force a full reload instead of a replacement, I need to configure my frontend accordingly. My only remaining gripe is probably the logout button that shouldn't be an anchor 🤡 As far as I know, it wouldn't make a difference since most libraries don't care too much about accessibility and tend to define their own cancellation methods (data-no-turbolinks="true", etc.).
  5. Hi @iipa, here are some useful links: I use the hook from Ryan since a few weeks and it works really good: Maybe one can this adapt to match more than inline styles. (?)
  6. Thank you! The module is this one by @David Karich https://modules.processwire.com/modules/page-hit-counter/
  7. It was like that on the previous version and I didn't implemented it yet on the new. Some small details like that I'm still working on. For instance, just upload a change do add PMI's logo at the top nav (the CEO requested it).
  8. ok... I am answering my own (stupid) question in case it's of any help to somebody. To add a class in the ul of each submenu. Use the 'submenu_css_class' in the $option array.
  9. @Sergio Why are you using anchors for the FAQ headings? Is it supposed to be used as toggle / show-hide? Because if yes, then that is not working as intended. Everything is visible, and you can't toggle anything (at least not with Chrome).
  10. Impressive site! Which "page hits"-module did you use?
  11. Hi iipa Does the user use the "Paste from Word"-button?
  12. You're right that browse isn't really a link – that's definitely one that shouldn't be represented by <a> tag 👍 Logout is a border case: technically it can be a link, just like it is right now, but you're right that it probably shouldn't be. On the other hand even changing it to a form isn't, in my opinion, quite enough – it should also provide and validate some sort of nonce/token, just to be sure that it can't be abused. There's no redirect after logout at the moment either, so that's not a major problem. Anyway, I'll figure something out for the next minor release of the module. Create is one of the cases where a link usually makes sense: it should be a link to the "new page" view in Admin in case the modal mode is disabled or JavaScript is for whatever reason out of equation. That being said, I've almost never used the "name format" option, so I didn't even think of that – that behaviour is indeed problematic and needs to be addressed somehow 🙂 It just occurred to me that my earlier explanation was flawed 😞 If you reload, say, just the <main> element within your <body>, and Admin Bar remains as-is, the links/buttons there will point to the wrong page. As such using such plugins you probably would need to reload Admin Bar as well. I could add support for modifying target/parent IDs with JavaScript, but that would still require extra steps for the developer anyway. Also thought about using URL in this case, but that wouldn't help, as Admin Bar can't know for sure if you're using "real" URLs or some custom format (via URL segments, History API, or something else.) Currently I'm thinking that an option for reloading / re-rendering Admin Bar via JavaScript might actually be the best option here: in most situations the module would work right out-of-the-box, but if you do use some sort of front-end routing / transition code, you could somehow tell it to update. Not a perfect solution, so any suggestions are welcome. -- By the way, if – and only if – it turns out that one/some links can't be easily switched to buttons without sacrificing something else, do you know if role="button" would help at all? I wouldn't use that unless I really have to (reinventing <button> with ARIA attributes is almost always just plain dumb), but this might be one of those cases where it's actually the most sensible approach – it would be an improvement in terms of accessibility, but I've no idea if it would help with preload/prefetch/etc. features 🙂
  13. Thanks. Yes, I have also purchased ProFields. This is great.
  14. @teppo Those are some good points. I agree the admin link itself and the edit link should stay anchor tags. Create, browse and logout, however, aren't semantically speaking links since they potentially have side effects (create, logout) or only trigger module JS (browse). There is one case that will create pages by merely following a link: when a template is configured to use the »Name format for children« setting in order to skip the page-add step. In that case, a new empty page is created every time the link is opened. I use that setting on most templates, that's probably why I noticed. The logout could be implemented using just a form and a submit button, using the form action for the logout URL. Not sure if ProcessWire currently supports custom redirect URIs after logout or if you might have to hook into the logout process for that. Turbolinks in particular switches out the whole body, but the problem here is that since there's no actual reload, stylesheets and scripts stay active on the page, so you mostly need to make sure that you don't cross between frontend and backend with any of these libraries, whatever part of the HTML they switch out. I've found a hacky solution by canceling any AJAX page visits if the URL matches the ProcessWire admin URL, but that means the frontend code needs to have a 3rd-party backend module in mind, which feels wrong.
  15. Hey folks – a quick update: Wireframe 0.5.0 was released couple of days ago. Compared to 0.4.x this version mainly fixes bugs and improves performance – nothing particularly major, but if you're using Wireframe, it's a recommended update. On a loosely related note, Tracy Debugger has been really helpful in figuring things out, identifying bottlenecks, etc. Brilliant module 🙂
  16. Hey @chrizz. I'm moving this thread to the "Module/Plugin Development" area of the forum. Please post all module development related questions there – the main "Modules" area is only intended for support threads of existing modules. Thanks!
  17. Hey @kaz. Just a heads-up: I'm moving this thread to the "Getting Started" area of the forum. The "Modules" section is only intended for support threads of existing modules.
  18. Hey @opalepatrick – just a heads-up that I'm moving this thread to the Module/Plugin Development area. The main "Modules" area is only intended for support threads of existing modules.
  19. Thanks for the feedback! Replacing <a> tags with buttons was originally on my list, but I've been pushing it back as there are some additional considerations here: There are some "proper links" (such as the admin link) that should remain that way. As such, this wouldn't apply to all links automatically. When the modal ("slide overlay" in module settings) mode is disabled, almost every item should be a regular link – except for browse, which technically shouldn't do anything there, as in that case it's just an indicator of your "current state". Admin Bar should work regardless of JavaScript. This makes it more robust, and as such more accessible. That last point isn't an argument against using buttons, just something to keep in mind when making changes: everything should remain functional regardless, which could mean links by default (when JS isn't available, or working as expected) and buttons otherwise. Since default styling is now based on BEM, it should make this easier in some respects, though; technically what element is used shouldn't matter anyway. I don't actually see (m)any notable issues in the current behaviour. None of the built-in Admin Bar features will create any content without user actually submitting a form – and I'd be very surprised if a plugin did that on itself. The logout link is problematic though, you're absolutely right on that one – I've added this on my todo list, but not entirely sure yet how to handle it. I'm not familiar with Turbolinks, but the way Barba.js usually works is that you define a container, which you then switch with new content. I'm not particularly experienced in this regard, but to my best understanding you wouldn't usually define your entire <body> element as a container, and since AdminBar attempts to place itself as the last element right before </body> closing tag, normally this shouldn't be an issue – though again, this is just based on my (quite likely lacking) understanding of such libraries 🙂
  20. Anyone new to this module, please be aware of this unfixed issue: https://github.com/ryancramerdesign/ServiceCurrencyConversion/issues/1
  21. @dragan Thanks! That was easy. It worked.
  22. Yesterday
  23. HI there, Very nice module thank you. I would like to put a class in each of the ul of the sub menus I have in my menu. It seems that through the admin interface or the $option of the render() function I can't achieve this. Is this correct ? Then would the only way to do this is the getMenuItems() function and coding the menu's markup ? Thanks
  24. https://www.comedywildlifephoto.com
  25. ProcessWire added WebP image support this year and many have been adopting it enthusiastically in existing projects. In this post we’ll look at a process used for migrating an existing website to use WebP images. We’ll cover everything from preliminary considerations to implementation and testing, with lots of tips and tricks along the way— https://processwire.com/blog/posts/webp-images-on-an-existing-site/
  26. @teppo I just installed the module but noticed all links are anchor tags, which is a bit problematic since these links can be triggered involuntarily by scripts or browsers prefetches. When combined with frontend link preloaders (e.g. InstantClick) or browser prefetching (e.g. Google Chrome Page Prefetch), this results in newly-created orphan pages or mystery logouts. Is there a way the module can be updated to use buttons instead? This would also make it work better with libraries like Turbolinks or Barba.js which intercept link clicks to load them via AJAX and switch out the response body. I'd gladly create my own theme to do that, but figure this is also a security issue, so it might be best to tackle this at the root level 🌝
  27. antpre

    SeoMaestro

    Thanks a lot Wanze, I actually thaught I was running this site on php 7 but it was not !!! Thanks again have a great day
  1. Load more activity
×
×
  • Create New...